mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2025-09-12 18:50:22 -07:00
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:
committed by
Alexandre Julliard
parent
fdad6a9bde
commit
cea28ec77e
@@ -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)
|
||||
{
|
||||
|
Reference in New Issue
Block a user