summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorNicolai Hähnle <nicolai.haehnle@amd.com>2017-06-25 15:26:47 +0200
committerNicolai Hähnle <nicolai.haehnle@amd.com>2017-07-31 14:55:29 +0200
commit06d038c4bd479207576bcbfee9f6c3dc7ee64b94 (patch)
tree8ff6da9adc07af54206419f081756d9189120fe9 /src
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 <eric@anholt.net> Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Diffstat (limited to 'src')
-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 89f7888438..5c4ae81305 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;
}