summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorArielG-NV <159081215+ArielG-NV@users.noreply.github.com>2024-07-23 16:54:06 -0400
committerGitHub <noreply@github.com>2024-07-23 16:54:06 -0400
commit72f7ea60461df520668de0947f350b85219db577 (patch)
tree72fc9827e2c5e10f1e4fc47472764f04e4db2b23 /tests
parent6216177eb4e57f9574aa840da5d87748a0133fdf (diff)
Fix for `ConstantBuffer<T[...]>` causing a segfault (#4705)
Fixes: #4704 Change the type we assign when getting the member variable of a legalized `ConstantBuffer<T[...]>`.
Diffstat (limited to 'tests')
-rw-r--r--tests/bugs/gh-4704.slang18
1 files changed, 18 insertions, 0 deletions
diff --git a/tests/bugs/gh-4704.slang b/tests/bugs/gh-4704.slang
new file mode 100644
index 000000000..8e8f6fc36
--- /dev/null
+++ b/tests/bugs/gh-4704.slang
@@ -0,0 +1,18 @@
+//TEST:SIMPLE(filecheck=SPIRV): -entry computeMain -stage compute -target spirv
+//TEST:SIMPLE(filecheck=HLSL): -entry computeMain -stage compute -target spirv
+//TEST:SIMPLE(filecheck=GLSL): -entry computeMain -stage compute -target spirv
+
+// SPIRV: OpEntryPoint
+// GLSL: main
+// HLSL: computeMain
+
+
+[[vk::binding(0, 0)]] uniform ConstantBuffer<uint64_t[1000]> addresses;
+RWStructuredBuffer<uint> buffer;
+
+[shader("compute")]
+[numthreads(1, 1, 1)]
+void computeMain(uint3 dispatchThreadID: SV_DispatchThreadID, uint groupIndex: SV_GroupIndex)
+{
+ printf("\nfrom gpu: %llu", addresses[0]);
+} \ No newline at end of file