Fix a crash & a replay issue when AMD AGS DX12 CreateDevice() is called

This commit is contained in:
Volkan Ilbeyli
2021-04-06 11:58:29 -04:00
committed by Baldur Karlsson
parent add33d484c
commit c3ca732ab9
3 changed files with 10 additions and 1 deletions
+6
View File
@@ -1110,6 +1110,12 @@ HRESULT WrappedID3D12Device::QueryInterface(REFIID riid, void **ppvObject)
*ppvObject = (INVAPID3DDevice *)&m_WrappedNVAPI;
return S_OK;
}
else if(riid == __uuidof(IAGSD3DDevice))
{
// don't addref, this is an internal interface so we just don't addref at all
*ppvObject = (IAGSD3DDevice *)&m_WrappedAGS;
return S_OK;
}
else if(riid == __uuidof(ID3D12DebugDevice))
{
// we queryinterface for this at startup, so if it's present we can
+1 -1
View File
@@ -192,7 +192,7 @@ public:
// this doesn't catch the case where some intrinsics are used on replay that are newer. We don't
// store that fine-grained information about which intrinsics are used.
if(device12)
return extensionsSupported11.intrinsics16;
return extensionsSupported12.intrinsics16;
else if(device11)
return extensionsSupported11.intrinsics16;
else
+3
View File
@@ -317,6 +317,9 @@ private:
// de-refcount our device.
returnedParams->pDevice->AddRef();
if(ppDevice)
*ppDevice = returnedParams->pDevice;
return S_OK;
},
creationParams->pAdapter, creationParams->FeatureLevel, __uuidof(ID3D12Device),