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 <imirkin@alum.mit.edu>
Tested-by: Fritz Koenig <frkoenig@google.com>
Signed-off-by: Andrii Simiklit <andrii.simiklit@globallogic.com>
Reviewed-by: Kristian H. Kristensen <hoegsberg@google.com>
This commit is contained in:

committed by
Kristian H. Kristensen

parent
420fe1e7f9
commit
a3c9a2881e
@@ -440,6 +440,7 @@ link_uniform_blocks(void *mem_ctx,
|
|||||||
GLSL_INTERFACE_PACKING_PACKED)) {
|
GLSL_INTERFACE_PACKING_PACKED)) {
|
||||||
b->type = resize_block_array(b->type, b->array);
|
b->type = resize_block_array(b->type, b->array);
|
||||||
b->var->type = b->type;
|
b->var->type = b->type;
|
||||||
|
b->var->data.max_array_access = b->type->length - 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
block_size.num_active_uniforms = 0;
|
block_size.num_active_uniforms = 0;
|
||||||
|
Reference in New Issue
Block a user