mirror of
https://github.com/doitsujin/dxvk.git
synced 2024-11-30 04:24:11 +01:00
[dxgi] Add GetDevice method to IDXGIVkInteropSurface
Convenient way of getting the IDXGIVkInteropDevice from the surface without having to go through several D3D interface queries.
This commit is contained in:
parent
badb93334e
commit
41fca78d27
@ -320,6 +320,17 @@ namespace dxvk {
|
||||
}
|
||||
|
||||
|
||||
HRESULT STDMETHODCALLTYPE D3D11VkInteropSurface::GetDevice(
|
||||
IDXGIVkInteropDevice** ppDevice) {
|
||||
Com<ID3D11Device> device;
|
||||
m_container->GetDevice(&device);
|
||||
|
||||
return device->QueryInterface(
|
||||
__uuidof(IDXGIVkInteropDevice),
|
||||
reinterpret_cast<void**>(ppDevice));
|
||||
}
|
||||
|
||||
|
||||
HRESULT STDMETHODCALLTYPE D3D11VkInteropSurface::GetVulkanImageInfo(
|
||||
VkImage* pHandle,
|
||||
VkImageLayout* pLayout,
|
||||
|
@ -214,6 +214,9 @@ namespace dxvk {
|
||||
REFIID riid,
|
||||
void** ppvObject);
|
||||
|
||||
HRESULT STDMETHODCALLTYPE GetDevice(
|
||||
IDXGIVkInteropDevice** ppDevice);
|
||||
|
||||
HRESULT STDMETHODCALLTYPE GetVulkanImageInfo(
|
||||
VkImage* pHandle,
|
||||
VkImageLayout* pLayout,
|
||||
|
@ -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
|
||||
*
|
||||
|
Loading…
Reference in New Issue
Block a user