aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa
diff options
context:
space:
mode:
authorMarek Olšák <[email protected]>2019-11-01 22:09:23 -0400
committerMarek Olšák <[email protected]>2019-11-19 18:02:06 -0500
commitf71e93db0ab2d00602fe5235fad6583887ffd754 (patch)
tree973f17f9410762c57ff6153b5954f2cfed3d7765 /src/mesa
parent60398e2d45f602fb3bf3a6cf770f4e26eee50587 (diff)
st/mesa: initialize affected_states and uniform storage earlier in deserialize
This matches the uncached codepath. affected_states was used before initialization, which was technically a bug, but probably not reproducible due to _NEW_PROGRAM rebinding everything. Acked-by: Pierre-Eric Pelloux-Prayer <[email protected]>
Diffstat (limited to 'src/mesa')
-rw-r--r--src/mesa/state_tracker/st_shader_cache.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/mesa/state_tracker/st_shader_cache.c b/src/mesa/state_tracker/st_shader_cache.c
index 1d544470a94..5cd969f3fe5 100644
--- a/src/mesa/state_tracker/st_shader_cache.c
+++ b/src/mesa/state_tracker/st_shader_cache.c
@@ -182,6 +182,9 @@ st_deserialise_ir_program(struct gl_context *ctx,
const struct nir_shader_compiler_options *options =
ctx->Const.ShaderCompilerOptions[prog->info.stage].NirOptions;
+ st_set_prog_affected_state_flags(prog);
+ _mesa_associate_uniform_storage(ctx, shProg, prog);
+
assert(prog->driver_cache_blob && prog->driver_cache_blob_size > 0);
struct blob_reader blob_reader;
@@ -267,9 +270,6 @@ st_deserialise_ir_program(struct gl_context *ctx,
}
}
- st_set_prog_affected_state_flags(prog);
- _mesa_associate_uniform_storage(ctx, shProg, prog);
-
st_finalize_program(st, prog);
}