summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/glsl/ssbo-2.slang20
-rw-r--r--tests/glsl/ssbo.slang16
2 files changed, 36 insertions, 0 deletions
diff --git a/tests/glsl/ssbo-2.slang b/tests/glsl/ssbo-2.slang
new file mode 100644
index 000000000..11542a539
--- /dev/null
+++ b/tests/glsl/ssbo-2.slang
@@ -0,0 +1,20 @@
+//TEST:SIMPLE(filecheck=CHECK): -target spirv -stage compute -entry main -allow-glsl
+#version 430
+precision highp float;
+precision highp int;
+
+layout(binding = 0) buffer MyBlockName
+{
+ vec4 a;
+ float b;
+ int c;
+} output_data;
+
+layout(local_size_x = 4) in;
+void main()
+{
+ output_data.a = vec4(gl_GlobalInvocationID, 1);
+ output_data.b = 10;
+ output_data.c = 20;
+ // CHECK: OpEntryPoint
+}
diff --git a/tests/glsl/ssbo.slang b/tests/glsl/ssbo.slang
new file mode 100644
index 000000000..47084a823
--- /dev/null
+++ b/tests/glsl/ssbo.slang
@@ -0,0 +1,16 @@
+//TEST:SIMPLE(filecheck=CHECK): -target spirv -stage compute -entry main -allow-glsl
+#version 430
+precision highp float;
+precision highp int;
+
+layout(binding = 0) buffer MyBlockName
+{
+ vec4 data[];
+} output_data;
+
+layout(local_size_x = 4) in;
+void main()
+{
+ output_data.data[gl_GlobalInvocationID.x] = vec4(gl_GlobalInvocationID, 1);
+ // CHECK: OpEntryPoint
+}