mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-27 12:00:22 +01:00
etnaviv: nir: call nir_remove_dead_variables(..) before linking setup
There are cases where there is a chain to an unused nir variable that get removed by nir_opt_dce. This breaks our current linker as the variable can still be accessed via nir_foreach_shader_in_variable(..) macro. So lets call nir_remove_dead_variables(..) just before we setup our linking. Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com> Acked-by: Lucas Stach <l.stach@pengutronix.de> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23673>
This commit is contained in:
parent
5f9ac20116
commit
f9e6069959
2 changed files with 5 additions and 8 deletions
|
|
@ -193,10 +193,6 @@ spec@arb_fragment_program@fp-fragment-position,Crash
|
|||
spec@arb_fragment_program@fp-indirections2,Fail
|
||||
spec@arb_fragment_program@sparse-samplers,Crash
|
||||
|
||||
# MESA: error: etna_link_shader:1302: Semantic value not found in vertex shader outputs
|
||||
# ati_fragment_shader-render-ops: ../src/gallium/drivers/etnaviv/etnaviv_shader.c:141: etna_link_shaders: Assertion `0' failed.
|
||||
spec@ati_fragment_shader@ati_fragment_shader-render-ops,Crash
|
||||
|
||||
spec@arb_framebuffer_object@arb_framebuffer_object-depth-stencil-blit stencil gl_depth24_stencil8,Fail
|
||||
spec@arb_framebuffer_object@arb_framebuffer_object-depth-stencil-blit stencil gl_stencil_index16,Fail
|
||||
spec@arb_framebuffer_object@arb_framebuffer_object-depth-stencil-blit stencil gl_stencil_index1,Fail
|
||||
|
|
@ -567,10 +563,6 @@ spec@nv_fog_distance@simple draw - gl_eye_plane,Fail
|
|||
spec@nv_primitive_restart@primitive-restart-draw-mode-lines,Fail
|
||||
spec@nv_primitive_restart@primitive-restart-draw-mode-triangles,Fail
|
||||
|
||||
# MESA: error: etna_link_shader:1302: Semantic value not found in vertex shader outputs
|
||||
# nv_texture_env_combine4-combine: ../src/gallium/drivers/etnaviv/etnaviv_shader.c:141: etna_link_shaders: Assertion `0' failed.
|
||||
spec@nv_texture_env_combine4@nv_texture_env_combine4-combine,Crash
|
||||
|
||||
# segfault
|
||||
spec@sgis_generate_mipmap@gen-nonzero-unit,Crash
|
||||
|
||||
|
|
|
|||
|
|
@ -1103,6 +1103,11 @@ etna_compile_shader(struct etna_shader_variant *v)
|
|||
false, v->key.sprite_coord_yinvert);
|
||||
}
|
||||
|
||||
/*
|
||||
* Remove any dead in variables before we iterate over them
|
||||
*/
|
||||
NIR_PASS_V(s, nir_remove_dead_variables, nir_var_shader_in, NULL);
|
||||
|
||||
/* setup input linking */
|
||||
struct etna_shader_io_file *sf = &v->infile;
|
||||
if (s->info.stage == MESA_SHADER_VERTEX) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue