aboutsummaryrefslogtreecommitdiffstats
path: root/src/compiler/glsl
diff options
context:
space:
mode:
authorTimothy Arceri <[email protected]>2020-03-05 14:51:20 +1100
committerMarge Bot <[email protected]>2020-04-18 11:50:44 +0000
commit5442712c6dae60529ceed0ea199751da7c9dd8e7 (patch)
treec1e0db3101646513fe4ae5632fb165cc63dc23b1 /src/compiler/glsl
parent723edf859ff2cf7dd0d4c2cb01a7d941af055265 (diff)
Revert "glsl: fix resizing of the uniform remap table"
This reverts commit e0aa0a839f9c168784a1f50013c83877cc876094. Instead we fix it correctly in the following patch. Reviewed-by: Alejandro PiƱeiro <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4623>
Diffstat (limited to 'src/compiler/glsl')
-rw-r--r--src/compiler/glsl/gl_nir_link_uniforms.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/src/compiler/glsl/gl_nir_link_uniforms.c b/src/compiler/glsl/gl_nir_link_uniforms.c
index c859c2d0b55..ef19ced288c 100644
--- a/src/compiler/glsl/gl_nir_link_uniforms.c
+++ b/src/compiler/glsl/gl_nir_link_uniforms.c
@@ -116,20 +116,16 @@ nir_setup_uniform_remap_tables(struct gl_context *ctx,
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 *,
- prog->NumUniformRemapTable + new_entries);
- prog->NumUniformRemapTable += new_entries;
+ prog->NumUniformRemapTable + entries);
+ prog->NumUniformRemapTable += entries;
}
/* set the base location in remap table for the uniform */