From 144f54e483d1e1b0cd865606fecdef002bb322b1 Mon Sep 17 00:00:00 2001 From: Timothy Arceri Date: Fri, 6 Dec 2019 21:53:17 +1100 Subject: [PATCH] st/glsl_to_nir: call gl_nir_lower_buffers() a little later MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit 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 --- src/mesa/state_tracker/st_glsl_to_nir.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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. */ -- 2.30.2