diff options
| author | Darren Wihandi <65404740+fairywreath@users.noreply.github.com> | 2025-03-22 00:57:35 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-03-22 04:57:35 +0000 |
| commit | 0d7d6468dfcabb759ec40921e5da3a8598f1c770 (patch) | |
| tree | 13b86dc66318fe95c6f4b0a4f36ea00736f708e5 /tests/glsl-intrinsic/debug-printf.slang | |
| parent | 7f72256bcf3e9a33feec641ce8bc98bc750b6297 (diff) | |
Add debugPrintfEXT support (#6659)
Diffstat (limited to 'tests/glsl-intrinsic/debug-printf.slang')
| -rw-r--r-- | tests/glsl-intrinsic/debug-printf.slang | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/glsl-intrinsic/debug-printf.slang b/tests/glsl-intrinsic/debug-printf.slang new file mode 100644 index 000000000..4146eab04 --- /dev/null +++ b/tests/glsl-intrinsic/debug-printf.slang @@ -0,0 +1,15 @@ +//TEST:SIMPLE(filecheck=CHECK_SPIRV): -target spirv -stage compute -entry main -allow-glsl +//TEST:SIMPLE(filecheck=CHECK_GLSL): -target glsl -stage compute -entry main -allow-glsl + +void main() +{ + debugPrintfEXT("test"); + debugPrintfEXT(R"(test1 "%d %d")", 5, 6); + + // CHECK_SPIRV: %[[SET:[0-9]+]] = OpExtInstImport "NonSemantic.DebugPrintf" + // CHECK_SPIRV: {{.*}} = OpExtInst %{{[a-zA-Z0-9_]+}} %[[SET]] 1 %{{[a-zA-Z0-9_]+}} + // CHECK_SPIRV: {{.*}} = OpExtInst %{{[a-zA-Z0-9_]+}} %[[SET]] 1 %{{[a-zA-Z0-9_]+}} %int_5 %int_6 + + // CHECK_GLSL: debugPrintfEXT("test") + // CHECK_GLSL: debugPrintfEXT("test1 \"%d %d\"", 5, 6); +} |
