pan/buffer: Add the offset to the size for buffer textures

In the attribute model, the size is for the attribute binding and the
offset is an offset into that range.  If we're going to use that to
offset the buffer itself, we need to increase the size accordingly.

Fixes: a21ee564e2 ("pan/bi: Make texel buffers use Attribute Buffers")
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Reviewed-by: Christoph Pillmayer <christoph.pillmayer@arm.com>
Reviewed-by: Lorenzo Rossi <lorenzo.rossi@collabora.com>
(cherry picked from commit ce56f49561)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40752>
This commit is contained in:
Faith Ekstrand 2026-03-24 14:24:07 -04:00 committed by Eric Engestrom
parent 60df6998b4
commit c74811897f
2 changed files with 2 additions and 2 deletions

View file

@ -2064,7 +2064,7 @@
"description": "pan/buffer: Add the offset to the size for buffer textures",
"nominated": true,
"nomination_type": 2,
"resolution": 0,
"resolution": 1,
"main_sha": null,
"because_sha": "a21ee564e2051e5e6827ce333da1f85b8b828e1d",
"notes": null

View file

@ -1345,7 +1345,7 @@ GENX(pan_buffer_texture_emit)(const struct pan_buffer_view *bview,
cfg.type = MALI_ATTRIBUTE_TYPE_1D;
cfg.pointer = bview->base;
cfg.stride = stride;
cfg.size = bview->width_el * stride;
cfg.size = bview->width_el * stride + bview->offset;
}
pan_pack(out_attrib, ATTRIBUTE, cfg) {