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>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40576>
This commit is contained in:
Faith Ekstrand 2026-03-24 14:24:07 -04:00 committed by Marge Bot
parent 8dc458225b
commit ce56f49561

View file

@ -53,7 +53,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) {