1
0
mirror of https://github.com/doitsujin/dxvk.git synced 2025-02-05 02:52:11 +01:00
dxvk/src/d3d9/d3d9_interop.h

73 lines
1.6 KiB
C
Raw Normal View History

#pragma once
#include "d3d9_interfaces.h"
namespace dxvk {
class D3D9InterfaceEx;
class D3D9CommonTexture;
class D3D9VkInteropInterface final : public ID3D9VkInteropInterface {
public:
D3D9VkInteropInterface(
D3D9InterfaceEx* pInterface);
~D3D9VkInteropInterface();
ULONG STDMETHODCALLTYPE AddRef();
ULONG STDMETHODCALLTYPE Release();
HRESULT STDMETHODCALLTYPE QueryInterface(
REFIID riid,
void** ppvObject);
void STDMETHODCALLTYPE GetInstanceHandle(
VkInstance* pInstance);
void STDMETHODCALLTYPE GetPhysicalDeviceHandle(
UINT Adapter,
VkPhysicalDevice* pPhysicalDevice);
private:
D3D9InterfaceEx* m_interface;
};
class D3D9VkInteropTexture final : public ID3D9VkInteropTexture {
public:
D3D9VkInteropTexture(
IUnknown* pInterface,
D3D9CommonTexture* pTexture);
~D3D9VkInteropTexture();
ULONG STDMETHODCALLTYPE AddRef();
ULONG STDMETHODCALLTYPE Release();
HRESULT STDMETHODCALLTYPE QueryInterface(
REFIID riid,
void** ppvObject);
HRESULT STDMETHODCALLTYPE GetVulkanImageInfo(
VkImage* pHandle,
VkImageLayout* pLayout,
VkImageCreateInfo* pInfo);
D3D9CommonTexture* GetCommonTexture() { return m_texture; }
private:
IUnknown* m_interface;
D3D9CommonTexture* m_texture;
};
}