diff options
author | Marek Olšák <[email protected]> | 2019-04-08 17:20:13 -0400 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2019-04-09 19:25:35 -0400 |
commit | b7ca074cc0df6101c428b2dfa53a59a0c6620af2 (patch) | |
tree | 89993062ea0f3831b6af1bff3ccf18f30ff2e49f | |
parent | f0fb73dcf67adc109aebd58219d663f4a40e01f0 (diff) |
glsl: fix shader_storage_blocks_write_access for SSBO block arrays
CTS: GL45-CTS.compute_shader.resources-max
Fixes: 4e1e8f684bf "glsl: remember which SSBOs are not read-only and pass it to gallium"
Reviewed-by: Timothy Arceri <[email protected]>
-rw-r--r-- | src/compiler/glsl/link_uniforms.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/compiler/glsl/link_uniforms.cpp b/src/compiler/glsl/link_uniforms.cpp index ef124111991..bbd71593948 100644 --- a/src/compiler/glsl/link_uniforms.cpp +++ b/src/compiler/glsl/link_uniforms.cpp @@ -544,8 +544,12 @@ public: assert(buffer_block_index != -1); if (var->is_in_shader_storage_block() && - !var->data.memory_read_only) - shader_storage_blocks_write_access |= 1 << buffer_block_index; + !var->data.memory_read_only) { + shader_storage_blocks_write_access |= + u_bit_consecutive(buffer_block_index, + var->type->is_array() ? + var->type->array_size() : 1); + } /* Uniform blocks that were specified with an instance name must be * handled a little bit differently. The name of the variable is the |