From 661d6198bbb9857d3fdc6df477e0742ed0b0765c Mon Sep 17 00:00:00 2001 From: Yong He Date: Mon, 14 Aug 2023 16:23:19 -0700 Subject: Support per field matrix layout (#3101) * Support per field matrix layout * Fix warnings. * Fix. * Fix tests. * Fix spiv gen. * Fix. * More test fixes. * Fix. * Run only GPU tests on self-hosted servers. * Remove -use-glsl-matrix-layout-modifier. * Fix. --------- Co-authored-by: Yong He --- tests/cross-compile/func-resource-param-array.slang.glsl | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) (limited to 'tests/cross-compile/func-resource-param-array.slang.glsl') diff --git a/tests/cross-compile/func-resource-param-array.slang.glsl b/tests/cross-compile/func-resource-param-array.slang.glsl index d5d1bd08c..9e396e55f 100644 --- a/tests/cross-compile/func-resource-param-array.slang.glsl +++ b/tests/cross-compile/func-resource-param-array.slang.glsl @@ -16,22 +16,22 @@ layout(std430, binding = 2) buffer _S3 { int f_0(uint _S4) { - return ((a_0)._data[(_S4)]); + return a_0._data[_S4]; } int f_1(uint _S5, uint _S6) { - return ((b_0[_S5])._data[(_S6)]); + return b_0[_S5]._data[_S6]; } int g_0(uint _S7, uint _S8) { - return ((b_0[_S7])._data[(_S8)]); + return b_0[_S7]._data[_S8]; } int g_1(uint _S9, uint _S10, uint _S11) { - return ((c_0[_S9][_S10])._data[(_S11)]); + return c_0[_S9][_S10]._data[_S11]; } layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; @@ -39,10 +39,7 @@ void main() { uint ii_0 = gl_GlobalInvocationID.x; uint jj_0 = gl_GlobalInvocationID.y; - - int tmp_0 = f_0(ii_0) + f_0(jj_0) + f_1(ii_0, jj_0) + g_0(ii_0, jj_0) + g_1(ii_0, jj_0, gl_GlobalInvocationID.z); - - ((a_0)._data[(ii_0)]) = tmp_0; + a_0._data[ii_0] = f_0(ii_0) + f_0(jj_0) + f_1(ii_0, jj_0) + g_0(ii_0, jj_0) + g_1(ii_0, jj_0, gl_GlobalInvocationID.z); return; } -- cgit v1.2.3