Skip to content

panfrost: Process scissor state earlier

Icecream95 requested to merge icecream95/mesa:simplest-of-set into main

Otherwise, if batch->scissor_culls_everything is set for a single draw, every draw after it in the batch will be skipped because the new scissor/viewport state will never be processed. Process scissor state early in draw_vbo to fix this interaction.

We do need to be careful: setting something on the batch can only happen when we've decided on a batch. If we have to select a fresh batch due to too many draws, that must happen first. This is pretty clear in the code but worth noting for the diff.

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Reported-by: Icecream95 <ixn@disroot.org>
Reviewed-by: Icecream95 <ixn@disroot.org>
Fixes: 79356b2e ("panfrost: Skip rasterizer discard draws without side effects")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/5839
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/6136

Merge request reports