From d11169d4cb854f929b3d3d638dde8ede416a5cba Mon Sep 17 00:00:00 2001 From: "Eric R. Smith" Date: Sat, 25 Apr 2026 12:41:38 -0300 Subject: [PATCH] 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 Reviewed-by: Boris Brezillon Part-of: (cherry picked from commit 2b10a6c37f5284103aac2e87d7f99f9dba5e6575) --- .pick_status.json | 2 +- src/gallium/drivers/panfrost/pan_csf.c | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.pick_status.json b/.pick_status.json index ee05aa8479c..fa8c31619fc 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -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 diff --git a/src/gallium/drivers/panfrost/pan_csf.c b/src/gallium/drivers/panfrost/pan_csf.c index 35207942b62..2389926de3b 100644 --- a/src/gallium/drivers/panfrost/pan_csf.c +++ b/src/gallium/drivers/panfrost/pan_csf.c @@ -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