From 9a1e327387ffa8552ac2f0aee8836a0b10a5578f Mon Sep 17 00:00:00 2001 From: Yong He Date: Fri, 1 Mar 2024 15:24:16 -0800 Subject: Make slangc commandline parsing compatible with renderdoc. (#3658) * Make slangc commandline parsing compatible with renderdoc. * Fix tests. --- tests/bindings/multi-file.hlsl | 4 ++-- tests/diagnostics/command-line/duplicate-target.slang | 2 +- tests/diagnostics/gh-38-vs.hlsl | 4 ++-- tests/spirv/renderdoc-cmd.slang | 0 4 files changed, 5 insertions(+), 5 deletions(-) create mode 100644 tests/spirv/renderdoc-cmd.slang (limited to 'tests') diff --git a/tests/bindings/multi-file.hlsl b/tests/bindings/multi-file.hlsl index 73ce181b0..1bf025d9c 100644 --- a/tests/bindings/multi-file.hlsl +++ b/tests/bindings/multi-file.hlsl @@ -1,4 +1,4 @@ -//TEST:COMPARE_HLSL:-no-mangle -profile sm_4_0 -entry main -stage vertex Tests/bindings/multi-file-extra.hlsl -entry main -stage fragment +//TEST:COMPARE_HLSL:-no-mangle -profile sm_4_0 -entry main1 -stage vertex Tests/bindings/multi-file-extra.hlsl -entry main -stage fragment // Here we are going to test that we can correctly generating bindings when we // are presented with a program spanning multiple input files (and multiple entry points) @@ -26,7 +26,7 @@ BEGIN_CBUFFER(vertexC) } END_CBUFFER(vertexC, register(b0)) -float4 main() : SV_POSITION +float4 main1() : SV_POSITION { // Go ahead and use everything here, just to make sure things got placed correctly return use(sharedT, sharedS) diff --git a/tests/diagnostics/command-line/duplicate-target.slang b/tests/diagnostics/command-line/duplicate-target.slang index a9ec96d0f..b1fc8088a 100644 --- a/tests/diagnostics/command-line/duplicate-target.slang +++ b/tests/diagnostics/command-line/duplicate-target.slang @@ -1,3 +1,3 @@ // duplicate-target.slang -//DIAGNOSTIC_TEST:SIMPLE:-target hlsl -target hlsl +//DIAGNOSTIC_TEST:SIMPLE:-target hlsl -target spirv -target hlsl diff --git a/tests/diagnostics/gh-38-vs.hlsl b/tests/diagnostics/gh-38-vs.hlsl index 3e61d7f2e..15dd04847 100644 --- a/tests/diagnostics/gh-38-vs.hlsl +++ b/tests/diagnostics/gh-38-vs.hlsl @@ -1,4 +1,4 @@ -//DIAGNOSTIC_TEST:SIMPLE: -profile sm_5_0 -entry main -stage vertex tests/diagnostics/gh-38-fs.hlsl -entry main -stage fragment -no-codegen +//DIAGNOSTIC_TEST:SIMPLE: -profile sm_5_0 -entry main1 -stage vertex tests/diagnostics/gh-38-fs.hlsl -entry main -stage fragment -no-codegen // Ensure that we catch errors with overlapping or conflicting parameter bindings. @@ -6,4 +6,4 @@ Texture2D overlappingA : register(t0); Texture2D conflicting : register(t1); -float4 main() : SV_Position { return 0; } +float4 main1() : SV_Position { return 0; } diff --git a/tests/spirv/renderdoc-cmd.slang b/tests/spirv/renderdoc-cmd.slang new file mode 100644 index 000000000..e69de29bb -- cgit v1.2.3