yum-mirror/slang

Making it easier to work with shaders

git clone https://git.yummers.dev/yum-mirror/slang

Yong HeUpdate SPIRV-Tools and fix new validation errors. (#6511)4485cf3ea

master
1010 B36 linesraw
1//DIAGNOSTIC_TEST:SIMPLE(filecheck=CHECK_GLSL):  -allow-glsl -stage compute -entry computeMain -target glsl -DTARGET_GLSL
2#version 430
3
4//TEST_INPUT:ubuffer(data=[0], stride=4):out,name=outputBuffer
5buffer MyBlockName
6{
7    uint data[1];
8} outputBuffer;
9
10layout(binding = 1, offset = 12) uniform atomic_uint one; 
11layout(binding = 1) uniform atomic_uint two; 
12
13// Layout qualifiers can be specified in any order.
14layout(offset = 4, binding = 1) uniform atomic_uint three; 
15
16layout(binding = 1) uniform atomic_uint four; 
17layout(binding = 2) uniform atomic_uint five; 
18
19void computeMain()
20{
21
22    outputBuffer.data[0] = true
23// CHECK_GLSL: one_0._data_{{.*}}[3]
24        && atomicCounter(one) == 0
25// CHECK_GLSL: one_0._data_{{.*}}[4]
26        && atomicCounter(two) == 0
27// CHECK_GLSL: one_0._data_{{.*}}[1]
28        && atomicCounter(three) == 0
29// CHECK_GLSL: one_0._data_{{.*}}[2]
30        && atomicCounter(four) == 0
31// CHECK_GLSL: five_0._data_{{.*}}[0]
32        && atomicCounter(five) == 0
33        
34        ;
35
36}