aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa/program
diff options
context:
space:
mode:
authorTapani Pälli <[email protected]>2020-01-07 17:56:26 +0200
committerTapani Pälli <[email protected]>2020-01-09 07:28:13 +0200
commit1e29ff7b3dab02aa8cf87144e38b10d2c9e19813 (patch)
tree59bf8048f0b2f91081322de50a37e97ff2f61d20 /src/mesa/program
parentee9879335e6c798dff4cacef9096265912268ce4 (diff)
mesa: create program resource hash in a single place
This is a cleanup but also a fix for commit dd09f1d806b. In case of i965 we did not actually create hash for cached shader programs. Fixes: dd09f1d806b "mesa/st/i965: add a ProgramResourceHash for quicker resource lookup" Signed-off-by: Tapani Pälli <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
Diffstat (limited to 'src/mesa/program')
-rw-r--r--src/mesa/program/ir_to_mesa.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/mesa/program/ir_to_mesa.cpp b/src/mesa/program/ir_to_mesa.cpp
index 293c412d23d..bcf50c505e1 100644
--- a/src/mesa/program/ir_to_mesa.cpp
+++ b/src/mesa/program/ir_to_mesa.cpp
@@ -3187,6 +3187,9 @@ _mesa_glsl_link_shader(struct gl_context *ctx, struct gl_shader_program *prog)
prog->data->LinkStatus = LINKING_FAILURE;
}
+ if (prog->data->LinkStatus != LINKING_FAILURE)
+ _mesa_create_program_resource_hash(prog);
+
/* Return early if we are loading the shader from on-disk cache */
if (prog->data->LinkStatus == LINKING_SKIPPED)
return;