diff --git a/src/d3d11/d3d11_texture.cpp b/src/d3d11/d3d11_texture.cpp index 1f3e6d9f..eddfe8ed 100644 --- a/src/d3d11/d3d11_texture.cpp +++ b/src/d3d11/d3d11_texture.cpp @@ -320,6 +320,17 @@ namespace dxvk { } + HRESULT STDMETHODCALLTYPE D3D11VkInteropSurface::GetDevice( + IDXGIVkInteropDevice** ppDevice) { + Com device; + m_container->GetDevice(&device); + + return device->QueryInterface( + __uuidof(IDXGIVkInteropDevice), + reinterpret_cast(ppDevice)); + } + + HRESULT STDMETHODCALLTYPE D3D11VkInteropSurface::GetVulkanImageInfo( VkImage* pHandle, VkImageLayout* pLayout, diff --git a/src/d3d11/d3d11_texture.h b/src/d3d11/d3d11_texture.h index fbfd0205..0d0ace57 100644 --- a/src/d3d11/d3d11_texture.h +++ b/src/d3d11/d3d11_texture.h @@ -214,6 +214,9 @@ namespace dxvk { REFIID riid, void** ppvObject); + HRESULT STDMETHODCALLTYPE GetDevice( + IDXGIVkInteropDevice** ppDevice); + HRESULT STDMETHODCALLTYPE GetVulkanImageInfo( VkImage* pHandle, VkImageLayout* pLayout, diff --git a/src/dxgi/dxgi_interfaces.h b/src/dxgi/dxgi_interfaces.h index c32bffdd..7f76f257 100644 --- a/src/dxgi/dxgi_interfaces.h +++ b/src/dxgi/dxgi_interfaces.h @@ -13,6 +13,7 @@ namespace dxvk { class DxvkImage; } +class IDXGIVkInteropDevice; /** * \brief Private DXGI device interface @@ -144,6 +145,17 @@ MIDL_INTERFACE("5546cf8c-77e7-4341-b05d-8d4d5000e77d") IDXGIVkInteropSurface : public IUnknown { static const GUID guid; + /** + * \brief Retrieves device interop interfaceSlots + * + * Queries the device that owns the surface for + * the \ref IDXGIVkInteropDevice interface. + * \param [out] ppDevice The device interface + * \returns \c S_OK on success + */ + virtual HRESULT STDMETHODCALLTYPE GetDevice( + IDXGIVkInteropDevice** ppDevice) = 0; + /** * \brief Retrieves Vulkan image info *