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 <apinheiro@igalia.com>
This commit is contained in:
Timothy Arceri 2019-12-06 21:53:17 +11:00
parent d0259f4159
commit 144f54e483

View file

@ -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.
*/