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>
(cherry picked from commit 2b10a6c37f)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41402>
This commit is contained in:
Eric R. Smith 2026-04-25 12:41:38 -03:00 committed by Eric Engestrom
parent f4d8e0987c
commit 3f47c9e44e
2 changed files with 2 additions and 1 deletions

View file

@ -1914,7 +1914,7 @@
"description": "panfrost: make sure INDEX_OFFSET is cleared",
"nominated": true,
"nomination_type": 1,
"resolution": 0,
"resolution": 1,
"main_sha": null,
"because_sha": null,
"notes": null

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