nir/opt_varyings: Fix relocate_slot so it doesn't mix up 32-bit and 16-bit I/O.
Previously, nir_opt_varyings was unable to distinguish between a fully occupied 32-bit flat input and the low part of a 16-bit flat input, and would assign them the same slot, thereby messing up both I/O slots in the process. Signed-off-by: Timur Kristóf <timur.kristof@gmail.com> Reviewed-by: Marek Olšák <marek.olsak@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28685>
This commit is contained in:
@@ -3832,7 +3832,10 @@ fs_assign_slots(struct linkage_info *linkage,
|
|||||||
assert(slot_index < max_slot * 8);
|
assert(slot_index < max_slot * 8);
|
||||||
relocate_slot(linkage, &linkage->slot[i], i, new_slot_index,
|
relocate_slot(linkage, &linkage->slot[i], i, new_slot_index,
|
||||||
fs_vec4_type, progress);
|
fs_vec4_type, progress);
|
||||||
BITSET_SET(assigned_mask, slot_index);
|
|
||||||
|
for (unsigned i = 0; i < slot_size; ++i)
|
||||||
|
BITSET_SET(assigned_mask, slot_index + i);
|
||||||
|
|
||||||
if (assigned_fs_vec4_type)
|
if (assigned_fs_vec4_type)
|
||||||
assigned_fs_vec4_type[vec4_slot(slot_index)] = fs_vec4_type;
|
assigned_fs_vec4_type[vec4_slot(slot_index)] = fs_vec4_type;
|
||||||
slot_index += slot_size; /* move to the next slot */
|
slot_index += slot_size; /* move to the next slot */
|
||||||
|
Reference in New Issue
Block a user