From: Timothy Arceri Date: Fri, 6 Dec 2019 10:53:17 +0000 (+1100) Subject: st/glsl_to_nir: call gl_nir_lower_buffers() a little later X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=144f54e483d1e1b0cd865606fecdef002bb322b1;p=mesa.git st/glsl_to_nir: call gl_nir_lower_buffers() a little later In a following commit we will use a NIR based builder to build the OpenGL resource list, so we want to delay this call a little. Ack-by: Alejandro PiƱeiro --- diff --git a/src/mesa/state_tracker/st_glsl_to_nir.cpp b/src/mesa/state_tracker/st_glsl_to_nir.cpp index a1b7b499cff..c252babb711 100644 --- a/src/mesa/state_tracker/st_glsl_to_nir.cpp +++ b/src/mesa/state_tracker/st_glsl_to_nir.cpp @@ -405,7 +405,6 @@ st_nir_preprocess(struct st_context *st, struct gl_program *prog, nir_var_mem_shared, nir_address_format_32bit_offset); } - NIR_PASS_V(nir, gl_nir_lower_buffers, shader_program); /* Do a round of constant folding to clean up address calculations */ NIR_PASS_V(nir, nir_opt_constant_folding); } @@ -726,6 +725,8 @@ st_link_nir(struct gl_context *ctx, struct gl_linked_shader *shader = linked_shader[i]; nir_shader *nir = shader->Program->nir; + NIR_PASS_V(nir, gl_nir_lower_buffers, shader_program); + /* Linked shaders are optimized in st_nir_link_shaders. Separate shaders * and shaders with a fixed-func VS or FS are optimized here. */