pvr: remove hardcoded buffer alignment and image alignment

Signed-off-by: Leon Perianu <leon.perianu@imgtec.com>
Reviewed-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39776>
This commit is contained in:
Leon Perianu 2026-02-04 17:05:22 +02:00 committed by Marge Bot
parent 82a51ba9b3
commit bf3b011919
2 changed files with 2 additions and 5 deletions

View file

@ -701,7 +701,7 @@ VkResult pvr_CreateBuffer(VkDevice _device,
VkBuffer *pBuffer)
{
VK_FROM_HANDLE(pvr_device, device, _device);
const uint32_t alignment = 4096;
const uint32_t alignment = device->pdevice->ws->page_size;
struct pvr_buffer *buffer;
assert(pCreateInfo->sType == VK_STRUCTURE_TYPE_BUFFER_CREATE_INFO);

View file

@ -299,10 +299,7 @@ VkResult pvr_CreateImage(VkDevice _device,
image->vk.drm_format_mod = modifier;
}
/* All images aligned to 4k, in case of arrays/CEM.
* Refer: pvr_GetImageMemoryRequirements for further details.
*/
image->alignment = 4096U;
image->alignment = device->pdevice->ws->page_size;
image->plane_count = vk_format_get_plane_count(image->vk.format);