From 8306a22a14fb61a100d0302649b9531b2175dd35 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Saffran?= Date: Wed, 18 Mar 2026 13:44:45 -0700 Subject: [PATCH 1/3] add test --- .../overflow-unbounded-array.test | 77 +++++++++++++++++++ 1 file changed, 77 insertions(+) create mode 100644 test/Feature/ResourceArrays/overflow-unbounded-array.test diff --git a/test/Feature/ResourceArrays/overflow-unbounded-array.test b/test/Feature/ResourceArrays/overflow-unbounded-array.test new file mode 100644 index 000000000..9fa76f54b --- /dev/null +++ b/test/Feature/ResourceArrays/overflow-unbounded-array.test @@ -0,0 +1,77 @@ +#--- source.hlsl + +[[vk::binding(0)]] +RWBuffer Buf0 : register(u0); +[[vk::binding(1)]] +RWBuffer Buf[] : register(u1); + +[numthreads(4,2,1)] +void main() { + for (int i = 0; i < 4; i++) { + Buf[1][i] = Buf0[i] * 2; + Buf[2][i] = Buf[0][i] + Buf[1][i]; + } +} + +//--- pipeline.yaml +--- +Shaders: + - Stage: Compute + Entry: main + DispatchSize: [1, 1, 1] +Buffers: + - Name: Buf0 + Format: Int32 + Data: [ 1, 2, 3, 4 ] + + - Name: Buf + Format: Int32 + ArraySize: 3 + Data: + - [ 1, 2, 3, 4 ] + - [ 0, 0, 0, 0 ] + - [ 0, 0, 0, 0 ] + + - Name: ExpectedBuf + Format: Int32 + ArraySize: 3 + Data: + - [ 1, 2, 3, 4 ] + - [ 2, 4, 6, 8 ] + - [ 3, 6, 9, 12 ] + +Results: + - Result: Buf + Rule: BufferExact + Actual: Buf + Expected: ExpectedBuf + +DescriptorSets: + - Resources: + - Name: Buf0 + Kind: RWBuffer + DirectXBinding: + Register: 0 + Space: 0 + VulkanBinding: + Binding: 0 + - Name: Buf + Kind: RWBuffer + DirectXBinding: + Register: 1 + Space: 0 + VulkanBinding: + Binding: 1 +... +#--- end + +# Unimplemented https://github.com/llvm/offload-test-suite/issues/305 +# XFAIL: Metal +# XFAIL: DXC && Vulkan && KosmicKrisp + +# Bug https://github.com/llvm/offload-test-suite/issues/556 +# XFAIL: Vulkan && QC && Clang + +# RUN: split-file %s %t +# RUN: %dxc_target -T cs_6_0 -Fo %t.o %t/source.hlsl +# RUN: %offloader %t/pipeline.yaml %t.o From 898b561270135c28aafa626054515d4160711d3f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Saffran?= Date: Thu, 19 Mar 2026 19:05:56 -0700 Subject: [PATCH 2/3] remove xfail from qc --- test/Feature/ResourceArrays/overflow-unbounded-array.test | 3 --- 1 file changed, 3 deletions(-) diff --git a/test/Feature/ResourceArrays/overflow-unbounded-array.test b/test/Feature/ResourceArrays/overflow-unbounded-array.test index 9fa76f54b..cc51e7fc8 100644 --- a/test/Feature/ResourceArrays/overflow-unbounded-array.test +++ b/test/Feature/ResourceArrays/overflow-unbounded-array.test @@ -69,9 +69,6 @@ DescriptorSets: # XFAIL: Metal # XFAIL: DXC && Vulkan && KosmicKrisp -# Bug https://github.com/llvm/offload-test-suite/issues/556 -# XFAIL: Vulkan && QC && Clang - # RUN: split-file %s %t # RUN: %dxc_target -T cs_6_0 -Fo %t.o %t/source.hlsl # RUN: %offloader %t/pipeline.yaml %t.o From 800464bd8e0810f70acf90e6ce1916b27d33a08c Mon Sep 17 00:00:00 2001 From: joaosaffran Date: Sat, 21 Mar 2026 19:21:00 -0700 Subject: [PATCH 3/3] Update test to remove XFAIL for DXC and Vulkan Remove XFAIL condition for DXC, Vulkan, and KosmicKrisp. --- test/Feature/ResourceArrays/overflow-unbounded-array.test | 1 - 1 file changed, 1 deletion(-) diff --git a/test/Feature/ResourceArrays/overflow-unbounded-array.test b/test/Feature/ResourceArrays/overflow-unbounded-array.test index cc51e7fc8..91319c8c7 100644 --- a/test/Feature/ResourceArrays/overflow-unbounded-array.test +++ b/test/Feature/ResourceArrays/overflow-unbounded-array.test @@ -67,7 +67,6 @@ DescriptorSets: # Unimplemented https://github.com/llvm/offload-test-suite/issues/305 # XFAIL: Metal -# XFAIL: DXC && Vulkan && KosmicKrisp # RUN: split-file %s %t # RUN: %dxc_target -T cs_6_0 -Fo %t.o %t/source.hlsl