From 936a0b75e3dcebc6af48eb149cdd7f564aeed8a9 Mon Sep 17 00:00:00 2001 From: Ahmed Hesham Date: Sun, 14 Dec 2025 23:53:40 +0000 Subject: [PATCH] panfrost: fix get_image_width for 1D buffer images Image size queries for buffer images were incorrectly using the underlying buffer's width instead of the image view's size. This affected `get_image_width` in OpenCL C for 1Dbuffer images, in cases where the buffer is larger than the image to account for padding, breaking the conformance test `test_kernel_image_methods 1Dbuffer`. Fixes: 0efe7a6eb90 ("panfrost: implement image_size sysval") Signed-off-by: Ahmed Hesham Reviewed-by: Boris Brezillon Part-of: (cherry picked from commit 95ed8d6638d6a6fedf51a346bb9a6ba6a7a512c9) --- .pick_status.json | 2 +- src/gallium/drivers/panfrost/pan_cmdstream.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.pick_status.json b/.pick_status.json index e8bc05a4d3b..eec70271d17 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -454,7 +454,7 @@ "description": "panfrost: fix get_image_width for 1D buffer images", "nominated": true, "nomination_type": 2, - "resolution": 0, + "resolution": 1, "main_sha": null, "because_sha": "0efe7a6eb909b47fb24a7e15edcf4ee0d01cfd95", "notes": null diff --git a/src/gallium/drivers/panfrost/pan_cmdstream.c b/src/gallium/drivers/panfrost/pan_cmdstream.c index 078bd7ecd01..0266ae8e751 100644 --- a/src/gallium/drivers/panfrost/pan_cmdstream.c +++ b/src/gallium/drivers/panfrost/pan_cmdstream.c @@ -1126,7 +1126,7 @@ panfrost_upload_image_size_sysval(struct panfrost_batch *batch, if (image->resource->target == PIPE_BUFFER) { unsigned blocksize = util_format_get_blocksize(image->format); - uniform->i[0] = image->resource->width0 / blocksize; + uniform->i[0] = image->u.buf.size / blocksize; return; }