[Mesa-dev] [PATCH] st/glsl_to_nir: remove reallocation of sampler/image location
Marek Olšák
maraeo at gmail.com
Mon Jan 29 21:35:58 UTC 2018
Reviewed-by: Marek Olšák <marek.olsak at amd.com>
Marek
On Tue, Jan 23, 2018 at 10:48 PM, Timothy Arceri <tarceri at itsqueeze.com> wrote:
> As far as I can tell this always just reassigns the same value.
>
> Also as we don't curretly store UniformHash in the shader cache
> removing this will help with adding a shader cache to gallium
> nir drivers.
> ---
> src/mesa/state_tracker/st_glsl_to_nir.cpp | 8 --------
> 1 file changed, 8 deletions(-)
>
> diff --git a/src/mesa/state_tracker/st_glsl_to_nir.cpp b/src/mesa/state_tracker/st_glsl_to_nir.cpp
> index c7843cada5..21b3640b2c 100644
> --- a/src/mesa/state_tracker/st_glsl_to_nir.cpp
> +++ b/src/mesa/state_tracker/st_glsl_to_nir.cpp
> @@ -242,18 +242,10 @@ st_nir_assign_uniform_locations(struct gl_program *prog,
> continue;
>
> if (uniform->type->is_sampler() || uniform->type->is_image()) {
> - unsigned val = 0;
> - bool found = shader_program->UniformHash->get(val, uniform->name);
> if (uniform->type->is_sampler())
> loc = shaderidx++;
> else
> loc = imageidx++;
> - assert(found);
> - (void) found; /* silence unused var warning */
> - /* this ensure that nir_lower_samplers looks at the correct
> - * shader_program->UniformStorage[location]:
> - */
> - uniform->data.location = val;
> } else if (strncmp(uniform->name, "gl_", 3) == 0) {
> const gl_state_index *const stateTokens = (gl_state_index *)uniform->state_slots[0].tokens;
> /* This state reference has already been setup by ir_to_mesa, but we'll
> --
> 2.14.3
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev
More information about the mesa-dev
mailing list