mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-31 20:40:09 +01:00
nir/linking_helpers: remove nested IF
Just add a && to the condition. This is more readable to me. Signed-off-by: Rhys Perry <pendingchaos02@gmail.com> Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com> Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25590>
This commit is contained in:
parent
525aacd9d7
commit
c4706c6177
1 changed files with 3 additions and 3 deletions
|
|
@ -181,9 +181,9 @@ nir_remove_unused_io_vars(nir_shader *shader,
|
|||
else
|
||||
used = used_by_other_stage;
|
||||
|
||||
if (var->data.location < VARYING_SLOT_VAR0 && var->data.location >= 0)
|
||||
if (shader->info.stage != MESA_SHADER_MESH || var->data.location != VARYING_SLOT_PRIMITIVE_ID)
|
||||
continue;
|
||||
if (var->data.location < VARYING_SLOT_VAR0 && var->data.location >= 0 &&
|
||||
!(shader->info.stage == MESA_SHADER_MESH && var->data.location == VARYING_SLOT_PRIMITIVE_ID))
|
||||
continue;
|
||||
|
||||
if (var->data.always_active_io)
|
||||
continue;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue