panfrost: make sure INDEX_OFFSET is cleared

Ensure the INDEX_OFFSET CSF register is set to 0 before an ordinary
draw. This is normally the case, but indirect draws can change it.

Cc: mesa-stable
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41141>
This commit is contained in:
Eric R. Smith 2026-04-25 12:41:38 -03:00 committed by Marge Bot
parent 9ee6a23b8f
commit 2b10a6c37f

View file

@ -1383,6 +1383,7 @@ GENX(csf_launch_draw)(struct panfrost_batch *batch,
cs_move32_to(b, cs_sr_reg32(b, IDVS, INDEX_COUNT), draw->count);
cs_move32_to(b, cs_sr_reg32(b, IDVS, INSTANCE_COUNT), info->instance_count);
cs_move32_to(b, cs_sr_reg32(b, IDVS, INDEX_OFFSET), 0);
cs_move32_to(b, cs_sr_reg32(b, IDVS, INSTANCE_OFFSET), 0);
/* Base vertex offset on Valhall is used for both indexed and