Mesa (master): st/mesa: use *prog at the end of st_link_nir
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Thu Oct 17 00:11:59 UTC 2019
Module: Mesa
Branch: master
Commit: b596bb5b665eb2b77718fe219d7d050e88a0cd7b
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=b596bb5b665eb2b77718fe219d7d050e88a0cd7b
Author: Marek Olšák <marek.olsak at amd.com>
Date: Fri Sep 27 17:28:48 2019 -0400
st/mesa: use *prog at the end of st_link_nir
Reviewed-by: Timothy Arceri <tarceri at itsqueeze.com>
---
src/mesa/state_tracker/st_glsl_to_nir.cpp | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/src/mesa/state_tracker/st_glsl_to_nir.cpp b/src/mesa/state_tracker/st_glsl_to_nir.cpp
index 22175799cf3..dc6429f5671 100644
--- a/src/mesa/state_tracker/st_glsl_to_nir.cpp
+++ b/src/mesa/state_tracker/st_glsl_to_nir.cpp
@@ -806,17 +806,17 @@ st_link_nir(struct gl_context *ctx,
if (shader == NULL)
continue;
- st_glsl_to_nir_post_opts(st, shader->Program, shader_program);
+ struct gl_program *prog = shader->Program;
+ st_glsl_to_nir_post_opts(st, prog, shader_program);
- assert(shader->Program);
if (!ctx->Driver.ProgramStringNotify(ctx,
_mesa_shader_stage_to_program(i),
- shader->Program)) {
+ prog)) {
_mesa_reference_program(ctx, &shader->Program, NULL);
return false;
}
- nir_sweep(shader->Program->nir);
+ nir_sweep(prog->nir);
/* The GLSL IR won't be needed anymore. */
ralloc_free(shader->ir);
More information about the mesa-commit
mailing list