mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-03-14 21:40:32 +01:00
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:
parent
82a51ba9b3
commit
bf3b011919
2 changed files with 2 additions and 5 deletions
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue