| From ddab10a4c3d09892a7a1e68f0d2668c457213084 Mon Sep 17 00:00:00 2001 |
| From: Andrii Simiklit <andrii.simiklit@globallogic.com> |
| Date: Tue, 5 Mar 2019 17:38:20 +0200 |
| Subject: [PATCH 1/4] FROMLIST: 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 |
| |
| 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> |
| (cherry picked from commit d16c490a606bdc3b9bf4a7762a4bce5f864dd452) |
| Signed-off-by: Gurchetan Singh <gurchetansingh@chromium.org> |
| --- |
| src/compiler/glsl/link_uniform_blocks.cpp | 1 + |
| 1 file changed, 1 insertion(+) |
| |
| diff --git a/src/compiler/glsl/link_uniform_blocks.cpp b/src/compiler/glsl/link_uniform_blocks.cpp |
| index 0b8905862986..741fae062f3d 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; |
| -- |
| 2.20.1 |
| |