aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa/state_tracker
diff options
context:
space:
mode:
authorNicolai Hähnle <[email protected]>2017-06-25 15:26:47 +0200
committerNicolai Hähnle <[email protected]>2017-07-31 14:55:29 +0200
commit06d038c4bd479207576bcbfee9f6c3dc7ee64b94 (patch)
tree8ff6da9adc07af54206419f081756d9189120fe9 /src/mesa/state_tracker
parent01f1598a403686809fa630e1d38f8a3687314df9 (diff)
st/glsl_to_nir: fix the case where NIR clone testing is enabled
In that case, prog->nir must be assigned at the end. Reviewed-by: Eric Anholt <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
Diffstat (limited to 'src/mesa/state_tracker')
-rw-r--r--src/mesa/state_tracker/st_glsl_to_nir.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/mesa/state_tracker/st_glsl_to_nir.cpp b/src/mesa/state_tracker/st_glsl_to_nir.cpp
index 89f78884389..5c4ae813055 100644
--- a/src/mesa/state_tracker/st_glsl_to_nir.cpp
+++ b/src/mesa/state_tracker/st_glsl_to_nir.cpp
@@ -236,7 +236,6 @@ st_glsl_to_nir(struct st_context *st, struct gl_program *prog,
return prog->nir;
nir = glsl_to_nir(shader_program, stage, options);
- prog->nir = nir;
NIR_PASS_V(nir, nir_lower_io_to_temporaries,
nir_shader_get_entrypoint(nir),
@@ -281,6 +280,8 @@ st_glsl_to_nir(struct st_context *st, struct gl_program *prog,
_mesa_log("\n\n");
}
+ prog->nir = nir;
+
return nir;
}