forked from shader-slang/slang
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix bug with offset not properly managed from zero'ed position
add test for multiple offset atomic counters and verification adjust tests for syntax; work arounding a bug found (will make issue/and-or fix)
- Loading branch information
Showing
4 changed files
with
242 additions
and
133 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
33 changes: 33 additions & 0 deletions
33
tests/glsl-intrinsic/atomic/atomicCounterTestMultiple.slang
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
//DIAGNOSTIC_TEST:SIMPLE(filecheck=CHECK_GLSL): -allow-glsl -stage compute -entry computeMain -target glsl -DTARGET_GLSL | ||
#version 430 | ||
|
||
//TEST_INPUT:ubuffer(data=[0], stride=4):out,name=outputBuffer | ||
buffer MyBlockName | ||
{ | ||
uint data[1]; | ||
} outputBuffer; | ||
|
||
layout(binding = 1, offset = 12) uniform atomic_uint one; | ||
layout(binding = 1) uniform atomic_uint two; | ||
layout(binding = 1, offset = 4) uniform atomic_uint three; | ||
layout(binding = 1) uniform atomic_uint four; | ||
layout(binding = 2) uniform atomic_uint five; | ||
|
||
void computeMain() | ||
{ | ||
|
||
outputBuffer.data[0] = true | ||
// CHECK_GLSL-DAG: one_0._data_0[3] | ||
&& atomicCounter(one) == 0 | ||
// CHECK_GLSL-DAG: one_0._data_0[4] | ||
&& atomicCounter(two) == 0 | ||
// CHECK_GLSL-DAG: one_0._data_0[1] | ||
&& atomicCounter(three) == 0 | ||
// CHECK_GLSL-DAG: one_0._data_0[2] | ||
&& atomicCounter(four) == 0 | ||
// CHECK_GLSL-DAG: five_0._data_1[0] | ||
&& atomicCounter(five) == 0 | ||
|
||
; | ||
|
||
} |
Oops, something went wrong.