mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-24 17:30:12 +01:00
zink: handle patch variable locations for separate shaders better
these don't overlap with other locations so they can keep whatever their current assignments are Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24757>
This commit is contained in:
parent
ca987c0dfb
commit
d9942442f2
1 changed files with 6 additions and 1 deletions
|
|
@ -4833,6 +4833,8 @@ fixup_io_locations(nir_shader *nir)
|
|||
continue;
|
||||
if (var->data.location == VARYING_SLOT_VAR0)
|
||||
var->data.driver_location = 0;
|
||||
else if (var->data.patch)
|
||||
var->data.driver_location = var->data.location - VARYING_SLOT_VAR0;
|
||||
else
|
||||
var->data.driver_location = var->data.location;
|
||||
}
|
||||
|
|
@ -4858,7 +4860,10 @@ fixup_io_locations(nir_shader *nir)
|
|||
else
|
||||
size += glsl_count_vec4_slots(var->type, false, false);
|
||||
}
|
||||
var->data.driver_location = slot;
|
||||
if (var->data.patch)
|
||||
var->data.driver_location = var->data.location - VARYING_SLOT_VAR0;
|
||||
else
|
||||
var->data.driver_location = slot;
|
||||
found = true;
|
||||
}
|
||||
slot += size;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue