summaryrefslogtreecommitdiff
path: root/tests/compute
diff options
context:
space:
mode:
authorArielG-NV <159081215+ArielG-NV@users.noreply.github.com>2024-08-14 13:05:57 -0400
committerGitHub <noreply@github.com>2024-08-14 10:05:57 -0700
commit45b76418f9da2248b069f2058c6a1d52b05a8c74 (patch)
tree1757276c7a2fe295d2b130cd74a42c9b8db8783b /tests/compute
parentd8f63e70719c96044b8f497f7dddb264a7edd560 (diff)
Do not zero-initialize groupshared and rayquery variables (#4838)
* Do not zero-initialize groupshared and rayquery variables Fixes: #4824 `-zero-initialize` option will explicitly not: 1. Set any groupshared values to defaults 2. Set any rayQuery object to a default state (currently invalid code generation) * grammer * disallow groupshared initializers disallow groupshared initializers & adjust tests accordingly * remove disallowed groupshared-init expression * do not default init if non-copyable --------- Co-authored-by: Yong He <yonghe@outlook.com>
Diffstat (limited to 'tests/compute')
-rw-r--r--tests/compute/groupshared-init.slang28
1 files changed, 0 insertions, 28 deletions
diff --git a/tests/compute/groupshared-init.slang b/tests/compute/groupshared-init.slang
deleted file mode 100644
index 5a9758826..000000000
--- a/tests/compute/groupshared-init.slang
+++ /dev/null
@@ -1,28 +0,0 @@
-//TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-cpu -output-using-type
-//TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-dx12 -output-using-type -use-dxil
-//TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-vk -output-using-type
-//TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-vk -output-using-type -emit-spirv-directly
-
-// CHECK: type: uint32_t
-// CHECK-NEXT: 1231
-// CHECK-NEXT: 1232
-// CHECK-NEXT: 1233
-// CHECK-NEXT: 1234
-
-// This is a basic test for Slang compute shader.
-
-//TEST_INPUT:ubuffer(data=[0 0 0 0], stride=4):out,name=outputBuffer
-RWStructuredBuffer<uint> outputBuffer;
-
-groupshared uint myGroupSharedValue = foo();
-
-uint foo()
-{
- return 1231;
-}
-
-[numthreads(4, 1, 1)]
-void computeMain(uint i : SV_GroupIndex)
-{
- outputBuffer[i] = i + myGroupSharedValue;
-}