vkd3d: Pad resource allocation size to allow texture placement at a 64kb alignment.

Signed-off-by: Conor McCarthy <cmccarthy@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Conor McCarthy
2021-07-06 13:25:56 +10:00
committed by Alexandre Julliard
parent fdad6a9bde
commit cea28ec77e
3 changed files with 18 additions and 4 deletions

View File

@@ -1901,9 +1901,15 @@ static HRESULT vkd3d_bind_heap_memory(struct d3d12_device *device,
VkResult vr;
if (d3d12_resource_is_buffer(resource))
{
VK_CALL(vkGetBufferMemoryRequirements(vk_device, resource->u.vk_buffer, &requirements));
}
else
{
VK_CALL(vkGetImageMemoryRequirements(vk_device, resource->u.vk_image, &requirements));
/* Padding in d3d12_device_GetResourceAllocationInfo() leaves room to align the offset. */
heap_offset = align(heap_offset, requirements.alignment);
}
if (heap_offset % requirements.alignment)
{