mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-03 05:38:16 +02:00
nir: fix marking XFB varyings as always active IO
Components need to be handled, otherwise if a shader has two XFB
varyings at the same location, only one will be marked as always active.
Cc: mesa-stable
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16092>
(cherry picked from commit 26f74f17d9)
This commit is contained in:
parent
2379bc19a8
commit
add1e87c4e
2 changed files with 5 additions and 5 deletions
|
|
@ -643,7 +643,7 @@
|
|||
"description": "nir: fix marking XFB varyings as always active IO",
|
||||
"nominated": true,
|
||||
"nomination_type": 0,
|
||||
"resolution": 0,
|
||||
"resolution": 1,
|
||||
"main_sha": null,
|
||||
"because_sha": null
|
||||
},
|
||||
|
|
|
|||
|
|
@ -957,14 +957,14 @@ nir_compact_varyings(nir_shader *producer, nir_shader *consumer,
|
|||
void
|
||||
nir_link_xfb_varyings(nir_shader *producer, nir_shader *consumer)
|
||||
{
|
||||
nir_variable *input_vars[MAX_VARYING] = { 0 };
|
||||
nir_variable *input_vars[MAX_VARYING][4] = { 0 };
|
||||
|
||||
nir_foreach_shader_in_variable(var, consumer) {
|
||||
if (var->data.location >= VARYING_SLOT_VAR0 &&
|
||||
var->data.location - VARYING_SLOT_VAR0 < MAX_VARYING) {
|
||||
|
||||
unsigned location = var->data.location - VARYING_SLOT_VAR0;
|
||||
input_vars[location] = var;
|
||||
input_vars[location][var->data.location_frac] = var;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -976,8 +976,8 @@ nir_link_xfb_varyings(nir_shader *producer, nir_shader *consumer)
|
|||
continue;
|
||||
|
||||
unsigned location = var->data.location - VARYING_SLOT_VAR0;
|
||||
if (input_vars[location]) {
|
||||
input_vars[location]->data.always_active_io = true;
|
||||
if (input_vars[location][var->data.location_frac]) {
|
||||
input_vars[location][var->data.location_frac]->data.always_active_io = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue