From ce56f495618cf32612e7aa00339427d0d5643468 Mon Sep 17 00:00:00 2001 From: Faith Ekstrand Date: Tue, 24 Mar 2026 14:24:07 -0400 Subject: [PATCH] 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: a21ee564e205 ("pan/bi: Make texel buffers use Attribute Buffers") Reviewed-by: Lars-Ivar Hesselberg Simonsen Reviewed-by: Christoph Pillmayer Reviewed-by: Lorenzo Rossi Part-of: --- src/panfrost/lib/pan_buffer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/panfrost/lib/pan_buffer.c b/src/panfrost/lib/pan_buffer.c index cea37fc8088..70d187569ff 100644 --- a/src/panfrost/lib/pan_buffer.c +++ b/src/panfrost/lib/pan_buffer.c @@ -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) {