diff --git a/src/compiler/glsl/gl_nir_linker.c b/src/compiler/glsl/gl_nir_linker.c index e0b36a224d1..356563a78d9 100644 --- a/src/compiler/glsl/gl_nir_linker.c +++ b/src/compiler/glsl/gl_nir_linker.c @@ -968,6 +968,11 @@ gl_nir_link_glsl(const struct gl_constants *consts, for (unsigned i = 0; i < MESA_SHADER_STAGES; i++) { struct gl_linked_shader *shader = prog->_LinkedShaders[i]; if (shader) { + if (consts->GLSLLowerConstArrays) { + nir_lower_const_arrays_to_uniforms(shader->Program->nir, + consts->Program[i].MaxUniformComponents); + } + const nir_remove_dead_variables_options opts = { .can_remove_var = can_remove_uniform, }; diff --git a/src/compiler/glsl/linker.cpp b/src/compiler/glsl/linker.cpp index 5a94e182cc1..6dd6ae6f292 100644 --- a/src/compiler/glsl/linker.cpp +++ b/src/compiler/glsl/linker.cpp @@ -3915,13 +3915,6 @@ link_shaders(struct gl_context *ctx, struct gl_shader_program *prog) * propagate any elements accessed directly. */ linker_optimisation_loop(consts, prog->_LinkedShaders[i]->ir, i); - - /* Call opts after lowering const arrays to copy propagate things. */ - if (consts->GLSLLowerConstArrays && - lower_const_arrays_to_uniforms(prog->_LinkedShaders[i]->ir, i, - consts->Program[i].MaxUniformComponents)) - linker_optimisation_loop(consts, prog->_LinkedShaders[i]->ir, i); - } /* Check and validate stream emissions in geometry shaders */ diff --git a/src/gallium/drivers/lima/ci/lima-fails.txt b/src/gallium/drivers/lima/ci/lima-fails.txt index 8d9fe6483be..58035199bc7 100644 --- a/src/gallium/drivers/lima/ci/lima-fails.txt +++ b/src/gallium/drivers/lima/ci/lima-fails.txt @@ -31,6 +31,9 @@ dEQP-GLES2.functional.fragment_ops.depth_stencil.write_mask.stencil,Fail dEQP-GLES2.functional.shaders.texture_functions.fragment.texture2d_bias,Fail dEQP-GLES2.functional.shaders.texture_functions.fragment.texture2dproj_vec3_bias,Fail dEQP-GLES2.functional.shaders.texture_functions.fragment.texture2dproj_vec4_bias,Fail +dEQP-GLES2.functional.shaders.indexing.tmp_array.vec2_const_write_dynamic_read_vertex,Fail +dEQP-GLES2.functional.shaders.indexing.tmp_array.vec3_const_write_dynamic_read_vertex,Fail +dEQP-GLES2.functional.shaders.indexing.tmp_array.vec4_const_write_dynamic_read_vertex,Fail dEQP-GLES2.functional.texture.filtering.2d.linear_mipmap_linear_linear_clamp_rgba8888,Fail dEQP-GLES2.functional.texture.filtering.2d.linear_mipmap_linear_linear_mirror_rgba8888,Fail dEQP-GLES2.functional.texture.filtering.2d.linear_mipmap_linear_nearest_clamp_rgba8888,Fail