blob: ec296968c2e6b1a181c7311e75e754e3c46344cd (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
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: one_0._data_0[3]
&& atomicCounter(one) == 0
// CHECK_GLSL: one_0._data_0[4]
&& atomicCounter(two) == 0
// CHECK_GLSL: one_0._data_0[1]
&& atomicCounter(three) == 0
// CHECK_GLSL: one_0._data_0[2]
&& atomicCounter(four) == 0
// CHECK_GLSL: five_0._data_1[0]
&& atomicCounter(five) == 0
;
}
|