diff options
| author | Yong He <yonghe@outlook.com> | 2023-08-21 17:07:34 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-08-21 17:07:34 -0700 |
| commit | bd6dbaf7c3ea720b4ed39904fe08878f9dcbd947 (patch) | |
| tree | 9e8c436e0888d192c462f75e4655a63b51f41648 /tests/cross-compile/func-resource-param-array.slang.glsl | |
| parent | f94b2f7a328a898c5e3dc1389d08e0b7ce6e092e (diff) | |
Compile append and consume structured buffers to glsl. (#3142)
* Compile append and consume structured buffers to glsl.
* Fix.
* Update CI config.
---------
Co-authored-by: Yong He <yhe@nvidia.com>
Diffstat (limited to 'tests/cross-compile/func-resource-param-array.slang.glsl')
| -rw-r--r-- | tests/cross-compile/func-resource-param-array.slang.glsl | 26 |
1 files changed, 11 insertions, 15 deletions
diff --git a/tests/cross-compile/func-resource-param-array.slang.glsl b/tests/cross-compile/func-resource-param-array.slang.glsl index 9e396e55f..0c4c44bef 100644 --- a/tests/cross-compile/func-resource-param-array.slang.glsl +++ b/tests/cross-compile/func-resource-param-array.slang.glsl @@ -1,37 +1,33 @@ #version 450 layout(row_major) uniform; layout(row_major) buffer; - -layout(std430, binding = 0) buffer _S1 { +layout(std430, binding = 0) buffer StructuredBuffer_int_t_0 { int _data[]; } a_0; - -layout(std430, binding = 1) buffer _S2 { +layout(std430, binding = 1) buffer StructuredBuffer_int_t_1 { int _data[]; } b_0[3]; - -layout(std430, binding = 2) buffer _S3 { +layout(std430, binding = 2) buffer StructuredBuffer_int_t_2 { int _data[]; } c_0[4][3]; - -int f_0(uint _S4) +int f_0(uint _S1) { - return a_0._data[_S4]; + return a_0._data[_S1]; } -int f_1(uint _S5, uint _S6) +int f_1(uint _S2, uint _S3) { - return b_0[_S5]._data[_S6]; + return b_0[_S2]._data[_S3]; } -int g_0(uint _S7, uint _S8) +int g_0(uint _S4, uint _S5) { - return b_0[_S7]._data[_S8]; + return b_0[_S4]._data[_S5]; } -int g_1(uint _S9, uint _S10, uint _S11) +int g_1(uint _S6, uint _S7, uint _S8) { - return c_0[_S9][_S10]._data[_S11]; + return c_0[_S6][_S7]._data[_S8]; } layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; |
