diff options
author | Timothy Arceri <[email protected]> | 2017-03-03 16:59:48 +1100 |
---|---|---|
committer | Timothy Arceri <[email protected]> | 2017-03-08 09:45:48 +1100 |
commit | 20234cfe3a204eda5abb4ed757ae775e82619ba7 (patch) | |
tree | d44ca3bb83314affb41c44820050e31dfb6436c2 /src/mesa/state_tracker | |
parent | e25c92a72d7f2edb4e460ca29873b27fdf203c96 (diff) |
st/mesa: don't propagate uniforms when restoring from cache
We will have already loaded the uniforms when the parameter list
was restored from cache.
Reviewed-by: Marek Olšák <[email protected]>
Diffstat (limited to 'src/mesa/state_tracker')
-rw-r--r-- | src/mesa/state_tracker/st_glsl_to_nir.cpp | 3 | ||||
-rw-r--r-- | src/mesa/state_tracker/st_glsl_to_tgsi.cpp | 3 | ||||
-rw-r--r-- | src/mesa/state_tracker/st_shader_cache.c | 3 |
3 files changed, 6 insertions, 3 deletions
diff --git a/src/mesa/state_tracker/st_glsl_to_nir.cpp b/src/mesa/state_tracker/st_glsl_to_nir.cpp index 60d101c91d8..674ccd07a4c 100644 --- a/src/mesa/state_tracker/st_glsl_to_nir.cpp +++ b/src/mesa/state_tracker/st_glsl_to_nir.cpp @@ -426,7 +426,8 @@ st_nir_get_mesa_program(struct gl_context *ctx, * prog->ParameterValues to get reallocated (e.g., anything that adds a * program constant) has to happen before creating this linkage. */ - _mesa_associate_uniform_storage(ctx, shader_program, prog->Parameters); + _mesa_associate_uniform_storage(ctx, shader_program, prog->Parameters, + true); struct st_vertex_program *stvp; struct st_fragment_program *stfp; diff --git a/src/mesa/state_tracker/st_glsl_to_tgsi.cpp b/src/mesa/state_tracker/st_glsl_to_tgsi.cpp index af41bdbbea1..0757d141fcc 100644 --- a/src/mesa/state_tracker/st_glsl_to_tgsi.cpp +++ b/src/mesa/state_tracker/st_glsl_to_tgsi.cpp @@ -6770,7 +6770,8 @@ get_mesa_program_tgsi(struct gl_context *ctx, * prog->ParameterValues to get reallocated (e.g., anything that adds a * program constant) has to happen before creating this linkage. */ - _mesa_associate_uniform_storage(ctx, shader_program, prog->Parameters); + _mesa_associate_uniform_storage(ctx, shader_program, prog->Parameters, + true); if (!shader_program->data->LinkStatus) { free_glsl_to_tgsi_visitor(v); _mesa_reference_program(ctx, &shader->Program, NULL); diff --git a/src/mesa/state_tracker/st_shader_cache.c b/src/mesa/state_tracker/st_shader_cache.c index fba4b0a3a03..f22380ce729 100644 --- a/src/mesa/state_tracker/st_shader_cache.c +++ b/src/mesa/state_tracker/st_shader_cache.c @@ -379,7 +379,8 @@ st_load_tgsi_from_disk_cache(struct gl_context *ctx, } st_set_prog_affected_state_flags(glprog); - _mesa_associate_uniform_storage(ctx, prog, glprog->Parameters); + _mesa_associate_uniform_storage(ctx, prog, glprog->Parameters, + false); free(buffer); } else { |