aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrii Simiklit <[email protected]>2019-03-05 17:38:20 +0200
committerKristian H. Kristensen <[email protected]>2020-01-06 13:01:19 -0800
commita3c9a2881e242b9ac588d6dcb158e805fefe352d (patch)
tree49d9b38e25fa42db93f17b315dca729bd7de1a09
parent420fe1e7f9ef56177c8f45e98e057488a2b57646 (diff)
glsl: fix an incorrect max_array_access after optimization of ssbo/ubo
This is needed to fix these tests: piglit.spec.arb_shader_storage_buffer_object.compiler.unused-array-element_frag piglit.spec.arb_shader_storage_buffer_object.compiler.unused-array-element_comp Fixes: 8cf1333b "glsl: link uniform block arrays of arrays" Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=109532 Reported-By: Ilia Mirkin <[email protected]> Tested-by: Fritz Koenig <[email protected]> Signed-off-by: Andrii Simiklit <[email protected]> Reviewed-by: Kristian H. Kristensen <[email protected]>
-rw-r--r--src/compiler/glsl/link_uniform_blocks.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/compiler/glsl/link_uniform_blocks.cpp b/src/compiler/glsl/link_uniform_blocks.cpp
index 45f1c0fe98d..715118cf509 100644
--- a/src/compiler/glsl/link_uniform_blocks.cpp
+++ b/src/compiler/glsl/link_uniform_blocks.cpp
@@ -440,6 +440,7 @@ link_uniform_blocks(void *mem_ctx,
GLSL_INTERFACE_PACKING_PACKED)) {
b->type = resize_block_array(b->type, b->array);
b->var->type = b->type;
+ b->var->data.max_array_access = b->type->length - 1;
}
block_size.num_active_uniforms = 0;