glsl: drop cache_fallback
This turned out to be a dead end, it is much easier and less error prone to just cache the IR used by the drivers backend e.g. TGSI or NIR. Cc: "17.2 17.3" <mesa-stable@lists.freedesktop.org> Reviewed-by: Tapani Pälli <tapani.palli@intel.com> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
This commit is contained in:
@@ -1400,13 +1400,6 @@ link_assign_uniform_storage(struct gl_context *ctx,
|
||||
sizeof(shader->Program->sh.SamplerTargets));
|
||||
}
|
||||
|
||||
/* If this is a fallback compile for a cache miss we already have the
|
||||
* correct uniform mappings and we don't want to reinitialise uniforms so
|
||||
* just return now.
|
||||
*/
|
||||
if (prog->data->cache_fallback)
|
||||
return;
|
||||
|
||||
#ifndef NDEBUG
|
||||
for (unsigned i = 0; i < prog->data->NumUniformStorage; i++) {
|
||||
assert(prog->data->UniformStorage[i].storage != NULL ||
|
||||
@@ -1431,11 +1424,9 @@ void
|
||||
link_assign_uniform_locations(struct gl_shader_program *prog,
|
||||
struct gl_context *ctx)
|
||||
{
|
||||
if (!prog->data->cache_fallback) {
|
||||
ralloc_free(prog->data->UniformStorage);
|
||||
prog->data->UniformStorage = NULL;
|
||||
prog->data->NumUniformStorage = 0;
|
||||
}
|
||||
ralloc_free(prog->data->UniformStorage);
|
||||
prog->data->UniformStorage = NULL;
|
||||
prog->data->NumUniformStorage = 0;
|
||||
|
||||
if (prog->UniformHash != NULL) {
|
||||
prog->UniformHash->clear();
|
||||
|
Reference in New Issue
Block a user