mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-20 03:00:11 +01:00
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:0efe7a6eb9("panfrost: implement image_size sysval") Signed-off-by: Ahmed Hesham <ahmed.hesham@arm.com> Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38949> (cherry picked from commit95ed8d6638)
This commit is contained in:
parent
d5208d9537
commit
936a0b75e3
2 changed files with 2 additions and 2 deletions
|
|
@ -454,7 +454,7 @@
|
||||||
"description": "panfrost: fix get_image_width for 1D buffer images",
|
"description": "panfrost: fix get_image_width for 1D buffer images",
|
||||||
"nominated": true,
|
"nominated": true,
|
||||||
"nomination_type": 2,
|
"nomination_type": 2,
|
||||||
"resolution": 0,
|
"resolution": 1,
|
||||||
"main_sha": null,
|
"main_sha": null,
|
||||||
"because_sha": "0efe7a6eb909b47fb24a7e15edcf4ee0d01cfd95",
|
"because_sha": "0efe7a6eb909b47fb24a7e15edcf4ee0d01cfd95",
|
||||||
"notes": null
|
"notes": null
|
||||||
|
|
|
||||||
|
|
@ -1126,7 +1126,7 @@ panfrost_upload_image_size_sysval(struct panfrost_batch *batch,
|
||||||
|
|
||||||
if (image->resource->target == PIPE_BUFFER) {
|
if (image->resource->target == PIPE_BUFFER) {
|
||||||
unsigned blocksize = util_format_get_blocksize(image->format);
|
unsigned blocksize = util_format_get_blocksize(image->format);
|
||||||
uniform->i[0] = image->resource->width0 / blocksize;
|
uniform->i[0] = image->u.buf.size / blocksize;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue