vkd3d: Align allocated GPU address ranges to the requested resource alignment.

Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Hans-Kristian Arntzen
2019-10-24 18:03:40 +03:30
committed by Alexandre Julliard
parent 2155748c41
commit c7916314dc
3 changed files with 21 additions and 11 deletions

View File

@@ -1684,6 +1684,7 @@ static HRESULT d3d12_resource_init(struct d3d12_resource *resource, struct d3d12
&resource->desc, &resource->u.vk_buffer)))
return hr;
if (!(resource->gpu_address = vkd3d_gpu_va_allocator_allocate(&device->gpu_va_allocator,
desc->Alignment ? desc->Alignment : D3D12_DEFAULT_RESOURCE_PLACEMENT_ALIGNMENT,
desc->Width, resource)))
{
ERR("Failed to allocate GPU VA.\n");