diff --git a/.pick_status.json b/.pick_status.json index c7c9f5c3883..1eef26efb16 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -1304,7 +1304,7 @@ "description": "panfrost: do not write outside num_wg_sysval", "nominated": true, "nomination_type": 1, - "resolution": 0, + "resolution": 1, "main_sha": null, "because_sha": "500616706148d2e340bbdfecad45204b515ae9b5", "notes": null diff --git a/src/gallium/drivers/panfrost/pan_cmdstream.c b/src/gallium/drivers/panfrost/pan_cmdstream.c index c68825f3dbc..2b3ce2275b4 100644 --- a/src/gallium/drivers/panfrost/pan_cmdstream.c +++ b/src/gallium/drivers/panfrost/pan_cmdstream.c @@ -1380,7 +1380,8 @@ panfrost_emit_const_buf(struct panfrost_batch *batch, PAN_SYSVAL_TYPE(ss->sysvals.sysvals[sysval_idx]); mali_ptr ptr = push_transfer.gpu + (4 * i); - if (sysval_type == PAN_SYSVAL_NUM_WORK_GROUPS) + if (sysval_type == PAN_SYSVAL_NUM_WORK_GROUPS && + sysval_comp < ARRAY_SIZE(batch->num_wg_sysval)) batch->num_wg_sysval[sysval_comp] = ptr; } /* Map the UBO, this should be cheap. For some buffers this may