diff options
| author | Yong He <yonghe@outlook.com> | 2023-08-15 20:55:21 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-08-15 20:55:21 -0700 |
| commit | c16f711d83df90f6826a65d61fc56cdbb932c92c (patch) | |
| tree | 3680ff05b91aa4521fd5c5e9caa9de171cbac558 /tests | |
| parent | 0c366bc0a4332ee14d08f2555396a18cb64229fa (diff) | |
SPIRV: debug source and debug line. (#3109)
Diffstat (limited to 'tests')
4 files changed, 13 insertions, 16 deletions
diff --git a/tests/bugs/spirv-debug-info.slang b/tests/bugs/spirv-debug-info.slang index 961f0807e..500299057 100644 --- a/tests/bugs/spirv-debug-info.slang +++ b/tests/bugs/spirv-debug-info.slang @@ -1,7 +1,15 @@ //TEST:SIMPLE(filecheck=CHECK):-target spirv -entry MainPs -stage fragment -profile glsl_450 -g3 -line-directive-mode none +//TEST:SIMPLE(filecheck=CHECK-SPIRV):-target spirv -entry MainPs -stage fragment -profile glsl_450 -g3 -emit-spirv-directly // make sure that the generated spirv has glsl source in it. -//CHECK: #version 450 +// CHECK: #version 450 + +// CHECK-SPIRV: struct PS_OUTPUT +// CHECK-SPIRV: {{.*}} = OpExtInst %void {{.*}} DebugSource +// CHECK-SPIRV: {{.*}} = OpExtInst %void {{.*}} DebugCompilationUnit +// CHECK-SPIRV: {{.*}} OpFunction +// CHECK-SPIRV: {{.*}} = OpExtInst %void {{.*}} DebugLine + struct PS_OUTPUT { float4 vColor : SV_Target0 ; diff --git a/tests/serialization/obfuscated-module-check-loc.slang b/tests/serialization/obfuscated-module-check-loc.slang index 853449995..49251760c 100644 --- a/tests/serialization/obfuscated-module-check-loc.slang +++ b/tests/serialization/obfuscated-module-check-loc.slang @@ -1,11 +1,12 @@ //TEST:COMPILE: tests/serialization/obfuscated-loc-module.slang -o tests/serialization/obfuscated-loc-module.zip -g -obfuscate -//TEST:SIMPLE:-target hlsl -stage compute -entry computeMain -obfuscate -r tests/serialization/obfuscated-loc-module.zip +//TEST:SIMPLE(filecheck=CHECK):-target hlsl -stage compute -entry computeMain -obfuscate -r tests/serialization/obfuscated-loc-module.zip //TEST:COMPILE: tests/serialization/obfuscated-loc-module.slang -o tests/serialization/obfuscated-loc-module.slang-module -g -obfuscate -//TEST:SIMPLE:-target hlsl -stage compute -entry computeMain -obfuscate -r tests/serialization/obfuscated-loc-module.slang-module - +//TEST:SIMPLE(filecheck=CHECK):-target hlsl -stage compute -entry computeMain -obfuscate -r tests/serialization/obfuscated-loc-module.slang-module //TEST_INPUT:ubuffer(data=[0 0 0 0], stride=4):out,name=outputBuffer RWStructuredBuffer<float> outputBuffer; +// CHECK: {{.*}}: error 40020: loop does not terminate within the limited number of iterations, unrolling is aborted. + // This test checks obfuscated source map loc tracking through a round trip, and producing a location correctly from slang-module that has a source map // We *don't* import because if we do we'll get a fresh compilation from source... we want to make sure it's using the -r module diff --git a/tests/serialization/obfuscated-module-check-loc.slang.1.expected b/tests/serialization/obfuscated-module-check-loc.slang.1.expected deleted file mode 100644 index aaf3bfd48..000000000 --- a/tests/serialization/obfuscated-module-check-loc.slang.1.expected +++ /dev/null @@ -1,6 +0,0 @@ -result code = -1 -standard error = { -tests/serialization/obfuscated-loc-module.slang(16): error 40020: loop does not terminate within the limited number of iterations, unrolling is aborted. -} -standard output = { -} diff --git a/tests/serialization/obfuscated-module-check-loc.slang.3.expected b/tests/serialization/obfuscated-module-check-loc.slang.3.expected deleted file mode 100644 index 607d1e2ea..000000000 --- a/tests/serialization/obfuscated-module-check-loc.slang.3.expected +++ /dev/null @@ -1,6 +0,0 @@ -result code = -1 -standard error = { -d1fec486-obfuscated(11): error 40020: loop does not terminate within the limited number of iterations, unrolling is aborted. -} -standard output = { -} |
