summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/spirv/debug-printf.slang11
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/spirv/debug-printf.slang b/tests/spirv/debug-printf.slang
new file mode 100644
index 000000000..cf8bfafa3
--- /dev/null
+++ b/tests/spirv/debug-printf.slang
@@ -0,0 +1,11 @@
+//TEST:SIMPLE(filecheck=CHECK): -target spirv -stage compute -entry main -emit-spirv-directly
+//TEST:SIMPLE(filecheck=CHECK): -target spirv -stage compute -entry main -emit-spirv-via-glsl
+
+void main()
+{
+ printf("test");
+ printf("test1 %d", 5);
+ // CHECK: %[[SET:[0-9]+]] = OpExtInstImport "NonSemantic.DebugPrintf"
+ // CHECK: {{.*}} = OpExtInst %{{[a-zA-Z0-9_]+}} %[[SET]] 1 %{{[a-zA-Z0-9_]+}}
+ // CHECK: {{.*}} = OpExtInst %{{[a-zA-Z0-9_]+}} %[[SET]] 1 %{{[a-zA-Z0-9_]+}} %{{[a-zA-Z0-9_]+}}
+}