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 <tapani.palli@intel.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
else
nir_build_program_resource_list(ctx, shProg, true);
- _mesa_create_program_resource_hash(shProg);
-
for (stage = 0; stage < ARRAY_SIZE(shProg->_LinkedShaders); stage++) {
struct gl_linked_shader *shader = shProg->_LinkedShaders[stage];
if (!shader)
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;
prev_info = info;
}
- _mesa_create_program_resource_hash(shader_program);
-
return true;
}
}
}
- _mesa_create_program_resource_hash(prog);
-
return GL_TRUE;
}