1
- // TEST:SIMPLE(filecheck=CHECK_GLSL): -allow-glsl -stage compute -entry computeMain -target glsl
2
- // TEST:SIMPLE(filecheck=CHECK_SPV): -allow-glsl -stage compute -entry computeMain -target spirv -emit-spirv-directly
1
+ // TEST:SIMPLE(filecheck=CHECK_GLSL): -allow-glsl -stage compute -entry computeMain -target glsl -DTARGET_VK
2
+ // TEST:SIMPLE(filecheck=CHECK_SPV): -allow-glsl -stage compute -entry computeMain -target spirv -emit-spirv-directly -DTARGET_VK
3
3
4
4
// missing implementation of most builtin values due to non trivial translation
5
5
// DISABLE_TEST:SIMPLE(filecheck=CHECK_HLSL): -allow-glsl -stage compute -entry computeMain -target hlsl -DTARGET_HLSL
8
8
// missing implementation of system (varying?) values
9
9
// DISABLE_TEST:SIMPLE(filecheck=CHECK_CPP): -allow-glsl -stage compute -entry computeMain -target cpp -DTARGET_CPP
10
10
11
- // TEST(compute, vulkan):COMPARE_COMPUTE(filecheck-buffer=BUF):-vk -compute -entry computeMain -allow-glsl
12
- // TEST(compute, vulkan):COMPARE_COMPUTE(filecheck-buffer=BUF):-vk -compute -entry computeMain -allow-glsl -emit-spirv-directly
11
+ // TEST(compute, vulkan):COMPARE_COMPUTE(filecheck-buffer=BUF):-vk -compute -entry computeMain -allow-glsl -xslang -DTARGET_VK
12
+ // TEST(compute, vulkan):COMPARE_COMPUTE(filecheck-buffer=BUF):-vk -compute -entry computeMain -allow-glsl -emit-spirv-directly -xslang -DTARGET_VK
13
+ // TEST(compute, vulkan):COMPARE_COMPUTE(filecheck-buffer=BUF):-wgpu -compute -entry computeMain -allow-glsl
14
+ // TEST(compute, vulkan):COMPARE_COMPUTE(filecheck-buffer=BUF):-metal -compute -entry computeMain -allow-glsl
15
+
13
16
#version 430
14
17
15
18
// TEST_INPUT:ubuffer(data=[0], stride=4):out,name=outputBuffer
@@ -24,15 +27,17 @@ void computeMain()
24
27
{
25
28
if (gl_GlobalInvocationID .x == 3 ) {
26
29
outputBuffer .data [0 ] = true
27
- && gl_NumSubgroups == 1
28
- && gl_SubgroupID == 0 // 1 subgroup, 0 based indexing
29
30
&& gl_SubgroupSize == 32
30
31
&& gl_SubgroupInvocationID == 3
32
+ #if defined (TARGET_VK )
33
+ && gl_SubgroupID == 0 // 1 subgroup, 0 based indexing
34
+ && gl_NumSubgroups == 1
31
35
&& gl_SubgroupEqMask == uvec4(0b 1000 ,0 ,0 ,0 )
32
36
&& gl_SubgroupGeMask == uvec4(0x FFFFFFF8 ,0 ,0 ,0 )
33
37
&& gl_SubgroupGtMask == uvec4(0x FFFFFFF0 ,0 ,0 ,0 )
34
38
&& gl_SubgroupLeMask == uvec4(0b 1111 ,0 ,0 ,0 )
35
39
&& gl_SubgroupLtMask == uvec4(0b 111 ,0 ,0 ,0 )
40
+ #endif
36
41
;
37
42
}
38
43
// CHECK_GLSL: void main(
0 commit comments