diff --git a/include/vkd3d.h b/include/vkd3d.h index f91ace46..f2409a07 100644 --- a/include/vkd3d.h +++ b/include/vkd3d.h @@ -46,6 +46,7 @@ HRESULT vkd3d_create_image_resource(ID3D12Device *device, const D3D12_RESOURCE_D VkImage vk_image, ID3D12Resource **resource); VkDevice vkd3d_get_vk_device(ID3D12Device *device); VkInstance vkd3d_get_vk_instance(ID3D12Device *device); +VkPhysicalDevice vkd3d_get_vk_physical_device(ID3D12Device *device); VkQueue vkd3d_get_vk_queue(ID3D12CommandQueue *queue); uint32_t vkd3d_get_vk_queue_family_index(ID3D12CommandQueue *queue); diff --git a/libs/vkd3d/device.c b/libs/vkd3d/device.c index 8e427fe3..8b4ef653 100644 --- a/libs/vkd3d/device.c +++ b/libs/vkd3d/device.c @@ -453,6 +453,7 @@ static HRESULT vkd3d_create_vk_device(struct d3d12_device *device) return hr; } + device->vk_physical_device = physical_device; device->vk_device = vk_device; TRACE("Created Vulkan device %p.\n", vk_device); @@ -1198,3 +1199,10 @@ VkInstance vkd3d_get_vk_instance(ID3D12Device *device) return d3d12_device->vkd3d_instance.vk_instance; } + +VkPhysicalDevice vkd3d_get_vk_physical_device(ID3D12Device *device) +{ + struct d3d12_device *d3d12_device = impl_from_ID3D12Device(device); + + return d3d12_device->vk_physical_device; +} diff --git a/libs/vkd3d/vkd3d_private.h b/libs/vkd3d/vkd3d_private.h index 235c74d3..ae881848 100644 --- a/libs/vkd3d/vkd3d_private.h +++ b/libs/vkd3d/vkd3d_private.h @@ -343,6 +343,7 @@ struct d3d12_device LONG refcount; VkDevice vk_device; + VkPhysicalDevice vk_physical_device; struct vkd3d_vk_device_procs vk_procs; vkd3d_signal_event_pfn signal_event;