mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-07 21:40:20 +01:00
linker: Fix off-by-one error implicit array sizing
Arrays are zero based. If the highest element accessed is 6, the
array needs to have 7 elements.
Fixes piglit test glsl-fs-implicit-array-size-03 and bugzilla #34198.
NOTE: This is a candidate for the 7.9 and 7.10 branches.
(cherry picked from commit 25b36e8ff8)
This commit is contained in:
parent
d7d55ab841
commit
52a274a4c0
1 changed files with 1 additions and 1 deletions
|
|
@ -899,7 +899,7 @@ link_intrastage_shaders(void *mem_ctx,
|
|||
if (var->type->is_array() && (var->type->length == 0)) {
|
||||
const glsl_type *type =
|
||||
glsl_type::get_array_instance(var->type->fields.array,
|
||||
var->max_array_access);
|
||||
var->max_array_access + 1);
|
||||
|
||||
assert(type != NULL);
|
||||
var->type = type;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue