2018-04-20 00:19:03 +02:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include "../dxgi/dxgi_interfaces.h"
|
|
|
|
|
|
|
|
#include "d3d11_include.h"
|
|
|
|
|
|
|
|
namespace dxvk {
|
2018-12-19 22:34:29 +01:00
|
|
|
|
|
|
|
class D3D11Device;
|
2018-04-20 00:19:03 +02:00
|
|
|
|
2020-12-29 22:39:04 +01:00
|
|
|
class D3D11VkInterop : public ComObject<IDXGIVkInteropDevice1> {
|
2018-04-20 00:19:03 +02:00
|
|
|
|
|
|
|
public:
|
|
|
|
|
|
|
|
D3D11VkInterop(
|
2018-12-19 22:34:29 +01:00
|
|
|
IDXGIObject* pContainer,
|
|
|
|
D3D11Device* pDevice);
|
|
|
|
|
2018-04-20 00:19:03 +02:00
|
|
|
~D3D11VkInterop();
|
|
|
|
|
|
|
|
ULONG STDMETHODCALLTYPE AddRef();
|
|
|
|
|
|
|
|
ULONG STDMETHODCALLTYPE Release();
|
|
|
|
|
|
|
|
HRESULT STDMETHODCALLTYPE QueryInterface(
|
2018-12-19 22:34:29 +01:00
|
|
|
REFIID riid,
|
|
|
|
void** ppvObject);
|
2018-04-20 00:19:03 +02:00
|
|
|
|
|
|
|
void STDMETHODCALLTYPE GetVulkanHandles(
|
|
|
|
VkInstance* pInstance,
|
|
|
|
VkPhysicalDevice* pPhysDev,
|
|
|
|
VkDevice* pDevice);
|
|
|
|
|
|
|
|
void STDMETHODCALLTYPE GetSubmissionQueue(
|
|
|
|
VkQueue* pQueue,
|
|
|
|
uint32_t* pQueueFamilyIndex);
|
|
|
|
|
|
|
|
void STDMETHODCALLTYPE TransitionSurfaceLayout(
|
|
|
|
IDXGIVkInteropSurface* pSurface,
|
|
|
|
const VkImageSubresourceRange* pSubresources,
|
|
|
|
VkImageLayout OldLayout,
|
|
|
|
VkImageLayout NewLayout);
|
|
|
|
|
|
|
|
void STDMETHODCALLTYPE FlushRenderingCommands();
|
|
|
|
|
|
|
|
void STDMETHODCALLTYPE LockSubmissionQueue();
|
|
|
|
|
|
|
|
void STDMETHODCALLTYPE ReleaseSubmissionQueue();
|
|
|
|
|
2020-12-29 22:39:04 +01:00
|
|
|
void STDMETHODCALLTYPE GetSubmissionQueue1(
|
|
|
|
VkQueue* pQueue,
|
|
|
|
uint32_t* pQueueIndex,
|
|
|
|
uint32_t* pQueueFamilyIndex);
|
|
|
|
|
|
|
|
HRESULT STDMETHODCALLTYPE CreateTexture2DFromVkImage(
|
|
|
|
const D3D11_TEXTURE2D_DESC1* pDesc,
|
|
|
|
VkImage vkImage,
|
|
|
|
ID3D11Texture2D** ppTexture2D);
|
|
|
|
|
2018-04-20 00:19:03 +02:00
|
|
|
private:
|
|
|
|
|
2018-12-19 22:34:29 +01:00
|
|
|
IDXGIObject* m_container;
|
|
|
|
D3D11Device* m_device;
|
2018-04-20 00:19:03 +02:00
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
}
|