2022-09-21 19:48:55 +00:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include "d3d9_interfaces.h"
|
|
|
|
|
|
|
|
namespace dxvk {
|
|
|
|
|
|
|
|
class D3D9InterfaceEx;
|
2022-09-21 20:28:09 +00:00
|
|
|
class D3D9CommonTexture;
|
2022-09-21 19:48:55 +00:00
|
|
|
|
|
|
|
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;
|
|
|
|
|
|
|
|
};
|
|
|
|
|
2022-09-21 20:28:09 +00:00
|
|
|
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;
|
|
|
|
|
|
|
|
};
|
|
|
|
|
2022-09-21 19:48:55 +00:00
|
|
|
}
|