From 6437f2d37b08972db5e4515bd124639c2903dda1 Mon Sep 17 00:00:00 2001 From: Jay Kwak <82421531+jkwak-work@users.noreply.github.com> Date: Fri, 10 Jan 2025 11:01:32 -0800 Subject: Fix potential test failures due to SPIRV validation failure (#6047) There are a few tests that are currently passing but could fail when conditions change little bit. When slang-test runs with `test-server`, the spirv validation fails and the test gets reported as failed even though they are actually passing. To avoid the potential problem, this commit adds an empty entry point. Co-authored-by: Yong He --- tests/diagnostics/uninitialized-fields.slang | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'tests/diagnostics/uninitialized-fields.slang') diff --git a/tests/diagnostics/uninitialized-fields.slang b/tests/diagnostics/uninitialized-fields.slang index c5fa37aad..f3c7b1a36 100644 --- a/tests/diagnostics/uninitialized-fields.slang +++ b/tests/diagnostics/uninitialized-fields.slang @@ -1,4 +1,4 @@ -//TEST:SIMPLE(filecheck=CHK): -target spirv +//TEST:SIMPLE(filecheck=CHK): -target spirv -entry computeMain extern static const int flag; @@ -88,3 +88,10 @@ struct Pass //CHK-NOT: warning 41020 //CHK-NOT: warning 41021 + +[Shader("compute")] +[NumThreads(4, 1, 1)] +void computeMain(int3 dispatchThreadID : SV_DispatchThreadID) +{ +} + -- cgit v1.2.3