From: Nicolai Hähnle Date: Sun, 25 Jun 2017 13:26:47 +0000 (+0200) Subject: st/glsl_to_nir: fix the case where NIR clone testing is enabled X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=06d038c4bd479207576bcbfee9f6c3dc7ee64b94;p=mesa.git 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 Reviewed-by: Marek Olšák --- 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; }