mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-06 02:58:05 +02:00
zink: do not leave needless shader temps around
This used to not matter, but since we started emitting shader-temps
properly, this causes issues where we end up with samplers and images as
shader-temps. That causes asserts while emitting them.
So let's remove the unused vars as well.
This fixes a piglit regression that somehow went unnoticed on CI.
Fixes: 85964945e7 ("zink: emit vars with nir_var_shader_temp mode")
Tested-by: Martin Roukala (né Peres) <martin.roukala@mupuf.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20227>
This commit is contained in:
parent
8c2448d4e6
commit
597b2648d2
1 changed files with 1 additions and 0 deletions
|
|
@ -2497,6 +2497,7 @@ prune_io(nir_shader *nir)
|
|||
if (!find_var_deref(nir, var))
|
||||
var->data.mode = nir_var_shader_temp;
|
||||
}
|
||||
NIR_PASS_V(nir, nir_remove_dead_variables, nir_var_shader_temp, NULL);
|
||||
}
|
||||
|
||||
VkShaderModule
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue