From 6437c38e0a3c2c1daf36cb5e543dc0b467fa4b15 Mon Sep 17 00:00:00 2001 From: Yong He Date: Wed, 23 Aug 2023 05:49:33 -0700 Subject: Lower all ByteAddressBuffer uses for SPIRV. (#3143) Co-authored-by: Yong He --- tests/compute/byte-address-buffer.slang | 2 +- tests/compute/unbounded-array-of-array-syntax.slang.glsl | 6 ++---- 2 files changed, 3 insertions(+), 5 deletions(-) (limited to 'tests/compute') diff --git a/tests/compute/byte-address-buffer.slang b/tests/compute/byte-address-buffer.slang index 9bba63a1f..715be850d 100644 --- a/tests/compute/byte-address-buffer.slang +++ b/tests/compute/byte-address-buffer.slang @@ -28,7 +28,7 @@ void test(int val) uint4 quad = inputBuffer.Load4(int(tmp * 4)); tmp = (quad.x + quad.y + quad.z + quad.w) & 0xF; - outputBuffer.Store(val * 4, tmp); + outputBuffer.Store(val*4, tmp); } [numthreads(4, 1, 1)] diff --git a/tests/compute/unbounded-array-of-array-syntax.slang.glsl b/tests/compute/unbounded-array-of-array-syntax.slang.glsl index 2ea90e4a6..f426bb55d 100644 --- a/tests/compute/unbounded-array-of-array-syntax.slang.glsl +++ b/tests/compute/unbounded-array-of-array-syntax.slang.glsl @@ -1,4 +1,3 @@ -//TEST_IGNORE_FILE: #version 450 #extension GL_EXT_nonuniform_qualifier : require layout(row_major) uniform; @@ -15,9 +14,8 @@ void main() int index_0 = int(gl_GlobalInvocationID.x); int innerIndex_0 = index_0 & 3; int _S1 = nonuniformEXT(index_0 >> 2); - uint bufferCount_0; - uint bufferStride_0; - (bufferCount_0) = (g_aoa_0[_S1])._data.length(); (bufferStride_0) = 0; + uvec2 _S2 = uvec2(g_aoa_0[_S1]._data.length(), 0); + uint bufferCount_0 = _S2.x; int innerIndex_1; if(innerIndex_0 >= int(bufferCount_0)) { -- cgit v1.2.3