mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-21 04:38:09 +02:00
glsl: fix error checking against MAX_UNIFORM_LOCATIONS
Tested-by: Dieter Nützel <Dieter@nuetzel-hh.de>
This commit is contained in:
parent
f01338118c
commit
3867af39f9
1 changed files with 6 additions and 2 deletions
|
|
@ -1209,8 +1209,12 @@ link_setup_uniform_remap_tables(struct gl_context *ctx,
|
|||
if (empty_locs)
|
||||
chosen_location = link_util_find_empty_block(prog, &prog->data->UniformStorage[i]);
|
||||
|
||||
/* Add new entries to the total amount of entries. */
|
||||
total_entries += entries;
|
||||
/* Add new entries to the total amount for checking against MAX_UNIFORM-
|
||||
* _LOCATIONS. This only applies to the default uniform block (-1),
|
||||
* because locations of uniform block entries are not assignable.
|
||||
*/
|
||||
if (prog->data->UniformStorage[i].block_index == -1)
|
||||
total_entries += entries;
|
||||
|
||||
if (chosen_location != -1) {
|
||||
empty_locs -= entries;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue