summaryrefslogtreecommitdiff
path: root/tests/bugs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/bugs')
-rw-r--r--tests/bugs/array-of-array-in-sb.slang25
-rw-r--r--tests/bugs/generic-type-duplication.slang1
2 files changed, 25 insertions, 1 deletions
diff --git a/tests/bugs/array-of-array-in-sb.slang b/tests/bugs/array-of-array-in-sb.slang
new file mode 100644
index 000000000..a449ce671
--- /dev/null
+++ b/tests/bugs/array-of-array-in-sb.slang
@@ -0,0 +1,25 @@
+//TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):
+//TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-vk
+
+struct S
+{
+ int vertices[3][3];
+}
+
+//TEST_INPUT:set cs = cbuffer(data=[1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1])
+ConstantBuffer<S> cs;
+
+//TEST_INPUT:ubuffer(data=[0 0 0 0 0 0 0 0 0], stride=4),name=s_buf
+RWStructuredBuffer<S> s_buf;
+
+//TEST_INPUT:ubuffer(data=[0 0 0 0 0], stride=4):out,name=outputBuffer
+RWStructuredBuffer<int> outputBuffer;
+
+// CHECK: 6
+
+[numthreads(1, 1, 1)]
+void computeMain(uint3 dispatchThreadID : SV_DispatchThreadID)
+{
+ s_buf[0].vertices[1][1] = 5;
+ outputBuffer[0] = s_buf[0].vertices[1][1] + cs.vertices[1][0];
+} \ No newline at end of file
diff --git a/tests/bugs/generic-type-duplication.slang b/tests/bugs/generic-type-duplication.slang
index 9c5a0ae67..4117a7f81 100644
--- a/tests/bugs/generic-type-duplication.slang
+++ b/tests/bugs/generic-type-duplication.slang
@@ -2,7 +2,6 @@
//TEST(compute):COMPARE_COMPUTE_EX:-slang -compute -shaderobj
//TEST(compute,vulkan):COMPARE_COMPUTE_EX:-vk -slang -compute -shaderobj
-//DISABLE_TEST(compute):COMPARE_COMPUTE_EX:-wgpu
struct MyGeneric<let addOne: bool>
{