pvr: apply PBE stride alignment when setting up image physical extents

Fixes a striding issues seen when running `weston-simple-dmabuf-egl -s 129`.

Signed-off-by: Frank Binns <frank.binns@imgtec.com>
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36412>
This commit is contained in:
Frank Binns
2024-10-24 14:24:51 +01:00
committed by Marge Bot
parent 16b20b0800
commit a4802fd547
+10
View File
@@ -77,6 +77,16 @@ static void pvr_image_init_physical_extent(struct pvr_image *image)
} else {
assert(image->memlayout == PVR_MEMLAYOUT_LINEAR);
image->physical_extent = image->vk.extent;
/* If the image is being rendered to (written by the PBE) make sure the
* width is aligned correctly.
*/
if (image->vk.usage & (VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT |
VK_IMAGE_USAGE_TRANSFER_DST_BIT)) {
image->physical_extent.width =
ALIGN(image->physical_extent.width,
ROGUE_PBESTATE_REG_WORD0_LINESTRIDE_UNIT_SIZE);
}
}
}