1
0
mirror of https://github.com/EduApps-CDG/OpenDX synced 2024-12-30 09:45:37 +01:00

[d3d11] Implement ID3D11Device5

This commit is contained in:
Philip Rebohle 2019-09-16 16:37:37 +02:00
parent 56daf44d4c
commit 2ef34a055d
No known key found for this signature in database
GPG Key ID: C8CC613427A31C99
2 changed files with 43 additions and 3 deletions

View File

@ -1305,6 +1305,22 @@ namespace dxvk {
} }
HRESULT STDMETHODCALLTYPE D3D11Device::CreateFence(
UINT64 InitialValue,
D3D11_FENCE_FLAG Flags,
REFIID ReturnedInterface,
void** ppFence) {
InitReturnPtr(ppFence);
static bool s_errorShown = false;
if (!std::exchange(s_errorShown, true))
Logger::err("D3D11Device::CreateFence: Not implemented");
return E_NOTIMPL;
}
void STDMETHODCALLTYPE D3D11Device::ReadFromSubresource( void STDMETHODCALLTYPE D3D11Device::ReadFromSubresource(
void* pDstData, void* pDstData,
UINT DstRowPitch, UINT DstRowPitch,
@ -1365,7 +1381,19 @@ namespace dxvk {
Logger::err("D3D11Device::OpenSharedResourceByName: Not implemented"); Logger::err("D3D11Device::OpenSharedResourceByName: Not implemented");
return E_NOTIMPL; return E_NOTIMPL;
} }
HRESULT STDMETHODCALLTYPE D3D11Device::OpenSharedFence(
HANDLE hFence,
REFIID ReturnedInterface,
void** ppFence) {
InitReturnPtr(ppFence);
Logger::err("D3D11Device::OpenSharedFence: Not implemented");
return E_NOTIMPL;
}
HRESULT STDMETHODCALLTYPE D3D11Device::CheckFormatSupport( HRESULT STDMETHODCALLTYPE D3D11Device::CheckFormatSupport(
DXGI_FORMAT Format, DXGI_FORMAT Format,
UINT* pFormatSupport) { UINT* pFormatSupport) {
@ -2378,7 +2406,8 @@ namespace dxvk {
|| riid == __uuidof(ID3D11Device1) || riid == __uuidof(ID3D11Device1)
|| riid == __uuidof(ID3D11Device2) || riid == __uuidof(ID3D11Device2)
|| riid == __uuidof(ID3D11Device3) || riid == __uuidof(ID3D11Device3)
|| riid == __uuidof(ID3D11Device4)) { || riid == __uuidof(ID3D11Device4)
|| riid == __uuidof(ID3D11Device5)) {
*ppvObject = ref(&m_d3d11Device); *ppvObject = ref(&m_d3d11Device);
return S_OK; return S_OK;
} }

View File

@ -45,7 +45,7 @@ namespace dxvk {
* Implements the ID3D11Device interfaces * Implements the ID3D11Device interfaces
* as part of a \ref D3D11DeviceContainer. * as part of a \ref D3D11DeviceContainer.
*/ */
class D3D11Device final : public ID3D11Device4 { class D3D11Device final : public ID3D11Device5 {
/// Maximum number of resource init commands per command buffer /// Maximum number of resource init commands per command buffer
constexpr static uint64_t InitCommandThreshold = 50; constexpr static uint64_t InitCommandThreshold = 50;
public: public:
@ -256,6 +256,12 @@ namespace dxvk {
D3D_FEATURE_LEVEL* pChosenFeatureLevel, D3D_FEATURE_LEVEL* pChosenFeatureLevel,
ID3DDeviceContextState** ppContextState); ID3DDeviceContextState** ppContextState);
HRESULT STDMETHODCALLTYPE CreateFence(
UINT64 InitialValue,
D3D11_FENCE_FLAG Flags,
REFIID ReturnedInterface,
void** ppFence);
void STDMETHODCALLTYPE ReadFromSubresource( void STDMETHODCALLTYPE ReadFromSubresource(
void* pDstData, void* pDstData,
UINT DstRowPitch, UINT DstRowPitch,
@ -288,6 +294,11 @@ namespace dxvk {
REFIID returnedInterface, REFIID returnedInterface,
void** ppResource); void** ppResource);
HRESULT STDMETHODCALLTYPE OpenSharedFence(
HANDLE hFence,
REFIID ReturnedInterface,
void** ppFence);
HRESULT STDMETHODCALLTYPE CheckFormatSupport( HRESULT STDMETHODCALLTYPE CheckFormatSupport(
DXGI_FORMAT Format, DXGI_FORMAT Format,
UINT* pFormatSupport); UINT* pFormatSupport);