From 5f91e2ded998c7a728136f922fbdba81570c621e Mon Sep 17 00:00:00 2001 From: Henri Verbeet Date: Wed, 28 Sep 2016 12:56:02 +0200 Subject: [PATCH] libs/vkd3d: Implement d3d12_resource_GetGPUVirtualAddress(). --- libs/vkd3d/resource.c | 6 ++++-- libs/vkd3d/vkd3d_private.h | 1 + 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/libs/vkd3d/resource.c b/libs/vkd3d/resource.c index e8fcd9cd..ead88d73 100644 --- a/libs/vkd3d/resource.c +++ b/libs/vkd3d/resource.c @@ -528,9 +528,11 @@ static D3D12_RESOURCE_DESC * STDMETHODCALLTYPE d3d12_resource_GetDesc(ID3D12Reso static D3D12_GPU_VIRTUAL_ADDRESS STDMETHODCALLTYPE d3d12_resource_GetGPUVirtualAddress(ID3D12Resource *iface) { - FIXME("iface %p stub!\n", iface); + struct d3d12_resource *resource = impl_from_ID3D12Resource(iface); - return 0; + TRACE("iface %p.\n", iface); + + return resource->u.gpu_address; } static HRESULT STDMETHODCALLTYPE d3d12_resource_WriteToSubresource(ID3D12Resource *iface, diff --git a/libs/vkd3d/vkd3d_private.h b/libs/vkd3d/vkd3d_private.h index 72b56612..101c33c5 100644 --- a/libs/vkd3d/vkd3d_private.h +++ b/libs/vkd3d/vkd3d_private.h @@ -52,6 +52,7 @@ struct d3d12_resource union { + D3D12_GPU_VIRTUAL_ADDRESS gpu_address; VkBuffer vk_buffer; VkImage vk_image; } u;