mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-01 14:00:16 +01:00
zink: slightly refactor psiz deletion during linking
no functional changes Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24782>
This commit is contained in:
parent
b5c2e91e4a
commit
23df2bf41b
1 changed files with 6 additions and 3 deletions
|
|
@ -2745,10 +2745,13 @@ zink_compiler_assign_io(struct zink_screen *screen, nir_shader *producer, nir_sh
|
|||
memset(slot_map, -1, sizeof(slot_map));
|
||||
bool do_fixup = false;
|
||||
nir_shader *nir = producer->info.stage == MESA_SHADER_TESS_CTRL ? producer : consumer;
|
||||
if (consumer->info.stage != MESA_SHADER_FRAGMENT) {
|
||||
nir_variable *var = nir_find_variable_with_location(producer, nir_var_shader_out, VARYING_SLOT_PSIZ);
|
||||
if (var) {
|
||||
bool can_remove = false;
|
||||
if (consumer->info.stage != MESA_SHADER_FRAGMENT)
|
||||
can_remove = !var->data.explicit_location && !nir_find_variable_with_location(consumer, nir_var_shader_in, VARYING_SLOT_PSIZ);
|
||||
/* remove injected pointsize from all but the last vertex stage */
|
||||
nir_variable *var = nir_find_variable_with_location(producer, nir_var_shader_out, VARYING_SLOT_PSIZ);
|
||||
if (var && !var->data.explicit_location && !nir_find_variable_with_location(consumer, nir_var_shader_in, VARYING_SLOT_PSIZ)) {
|
||||
if (can_remove) {
|
||||
var->data.mode = nir_var_shader_temp;
|
||||
nir_fixup_deref_modes(producer);
|
||||
delete_psiz_store(producer);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue