This reverts commit
e0aa0a839f9c168784a1f50013c83877cc876094.
Instead we fix it correctly in the following patch.
Reviewed-by: Alejandro PiƱeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4623>
unsigned location =
link_util_find_empty_block(prog, &prog->data->UniformStorage[i]);
unsigned location =
link_util_find_empty_block(prog, &prog->data->UniformStorage[i]);
- if (location == -1 || location + entries >= prog->NumUniformRemapTable) {
- unsigned new_entries = entries;
- if (location == -1)
- location = prog->NumUniformRemapTable;
- else
- new_entries = location - prog->NumUniformRemapTable + entries;
+ if (location == -1) {
+ location = prog->NumUniformRemapTable;
/* resize remap table to fit new entries */
prog->UniformRemapTable =
reralloc(prog,
prog->UniformRemapTable,
struct gl_uniform_storage *,
/* resize remap table to fit new entries */
prog->UniformRemapTable =
reralloc(prog,
prog->UniformRemapTable,
struct gl_uniform_storage *,
- prog->NumUniformRemapTable + new_entries);
- prog->NumUniformRemapTable += new_entries;
+ prog->NumUniformRemapTable + entries);
+ prog->NumUniformRemapTable += entries;
}
/* set the base location in remap table for the uniform */
}
/* set the base location in remap table for the uniform */