From 3322da4b94d309132244f97c3a2028660b7f6cd4 Mon Sep 17 00:00:00 2001 From: Philip Rebohle Date: Fri, 24 Jul 2020 12:24:49 +0200 Subject: [PATCH] [dxgi] Add DXGIGetDebugInterface1 stub Required for Metro Exodus. Also exports the DXGI entry points with their correct ordinals. --- src/dxgi/dxgi.def | 9 +++++---- src/dxgi/dxgi_main.cpp | 10 ++++++++++ 2 files changed, 15 insertions(+), 4 deletions(-) diff --git a/src/dxgi/dxgi.def b/src/dxgi/dxgi.def index 39417b5fb..c5509571b 100644 --- a/src/dxgi/dxgi.def +++ b/src/dxgi/dxgi.def @@ -1,6 +1,7 @@ LIBRARY DXGI.DLL EXPORTS - CreateDXGIFactory - CreateDXGIFactory1 - CreateDXGIFactory2 - DXGIDeclareAdapterRemovalSupport + CreateDXGIFactory @9 + CreateDXGIFactory1 @10 + CreateDXGIFactory2 @11 + DXGIDeclareAdapterRemovalSupport @16 + DXGIGetDebugInterface1 @17 diff --git a/src/dxgi/dxgi_main.cpp b/src/dxgi/dxgi_main.cpp index 0d09f0433..17530f53e 100644 --- a/src/dxgi/dxgi_main.cpp +++ b/src/dxgi/dxgi_main.cpp @@ -44,4 +44,14 @@ extern "C" { dxvk::Logger::warn("DXGIDeclareAdapterRemovalSupport: Stub"); return S_OK; } + + DLLEXPORT HRESULT __stdcall DXGIGetDebugInterface1(UINT Flags, REFIID riid, void **ppDebug) { + static bool errorShown = false; + + if (!std::exchange(errorShown, true)) + dxvk::Logger::warn("DXGIGetDebugInterface1: Stub"); + + return E_NOINTERFACE; + } + } \ No newline at end of file