summaryrefslogtreecommitdiff
path: root/tests/diagnostics/uninitialized-fields.slang
diff options
context:
space:
mode:
authorJay Kwak <82421531+jkwak-work@users.noreply.github.com>2025-01-10 11:01:32 -0800
committerGitHub <noreply@github.com>2025-01-10 11:01:32 -0800
commit6437f2d37b08972db5e4515bd124639c2903dda1 (patch)
tree7ac5ab926ff6861af56e264ab62a6a323fe8ee69 /tests/diagnostics/uninitialized-fields.slang
parent54845333858579f66bfa7c42bbf0b8e1317206ce (diff)
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 <yonghe@outlook.com>
Diffstat (limited to 'tests/diagnostics/uninitialized-fields.slang')
-rw-r--r--tests/diagnostics/uninitialized-fields.slang9
1 files changed, 8 insertions, 1 deletions
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)
+{
+}
+