1
0
mirror of https://github.com/doitsujin/dxvk.git synced 2025-03-14 04:29:15 +01:00

[d3d11] Implement ID3D11On12Device1

This commit is contained in:
Philip Rebohle 2025-03-02 18:36:47 +01:00
parent 106032fa65
commit b5f23d86f4
3 changed files with 33 additions and 2 deletions

View File

@ -3430,7 +3430,8 @@ namespace dxvk {
}
if (m_d3d11on12.Is11on12Device()) {
if (riid == __uuidof(ID3D11On12Device)) {
if (riid == __uuidof(ID3D11On12Device)
|| riid == __uuidof(ID3D11On12Device1_DXVK)) {
*ppvObject = ref(&m_d3d11on12);
return S_OK;
}

View File

@ -147,4 +147,11 @@ namespace dxvk {
}
}
HRESULT STDMETHODCALLTYPE D3D11on12Device::GetD3D12Device(
REFIID riid,
void** ppvDevice) {
return m_d3d12Queue->GetDevice(riid, ppvDevice);
}
}

View File

@ -4,6 +4,21 @@
#include "../util/log/log.h"
/**
* \brief Declaration of the ID3D11On12Device1 interface
*
* Various different headers that we need to be compatible with
* can't seem to agree on the signature of GetD3D12Device, and
* older wine/mingw headers don't support this interface at all.
*/
MIDL_INTERFACE("bdb64df4-ea2f-4c70-b861-aaab1258bb5d")
ID3D11On12Device1_DXVK : public ID3D11On12Device {
virtual HRESULT STDMETHODCALLTYPE GetD3D12Device(
REFIID riid,
void** ppvDevice) = 0;
};
namespace dxvk {
class D3D11Device;
@ -22,7 +37,7 @@ namespace dxvk {
};
class D3D11on12Device : public ID3D11On12Device {
class D3D11on12Device : public ID3D11On12Device1_DXVK {
public:
@ -58,6 +73,10 @@ namespace dxvk {
ID3D11Resource* const* ppResources,
UINT ResourceCount);
HRESULT STDMETHODCALLTYPE GetD3D12Device(
REFIID riid,
void** ppvDevice);
bool Is11on12Device() const {
return m_d3d12Device != nullptr;
}
@ -73,3 +92,7 @@ namespace dxvk {
};
}
#ifndef _MSC_VER
__CRT_UUID_DECL(ID3D11On12Device1_DXVK, 0xbdb64df4,0xea2f,0x4c70,0xb8,0x61,0xaa,0xab,0x12,0x58,0xbb,0x5d);
#endif