radv: correctly skip vertex loads with packed formats

This is supposed to check whether any channels of the element is used, but
skipped_start is always 0 for packed formats.

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Fixes: a46acdbc3f ("radv: Lower non-dynamic VS inputs in NIR.")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/9062
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23370>
This commit is contained in:
Rhys Perry
2023-06-01 16:03:46 +01:00
committed by Marge Bot
parent 69e259dcff
commit b9c1d74ff4
@@ -287,7 +287,7 @@ lower_load_vs_input(nir_builder *b, nir_intrinsic_instr *intrin, lower_vs_inputs
first_used_swizzled_channel(f, dest_use_mask, true) + 1;
const unsigned max_loaded_channels = MIN2(first_trailing_unused_channel, f->nr_channels);
const unsigned fetch_num_channels =
skipped_start >= max_loaded_channels ? 0 : max_loaded_channels - skipped_start;
first_used_channel >= max_loaded_channels ? 0 : max_loaded_channels - skipped_start;
/* Load VS inputs from VRAM.
*