Only initialise AMD extensions when replaying on AMD

* The driver module may be loaded but that doesn't mean we should try to
  initialise the extensions.
This commit is contained in:
baldurk
2023-03-06 15:14:05 +00:00
parent 61ef550344
commit 9a30ca304e
3 changed files with 6 additions and 1 deletions
+1 -1
View File
@@ -3542,7 +3542,7 @@ void QueueReadbackData::Resize(uint64_t size)
void WrappedID3D12Device::CreateInternalResources()
{
if(IsReplayMode(m_State))
if(IsReplayMode(m_State) && m_DriverInfo.vendor == GPUVendor::AMD)
{
// Initialise AMD extension, if possible
HMODULE mod = GetModuleHandleA("amdxc64.dll");
+3
View File
@@ -712,6 +712,8 @@ private:
bool m_UsedDXIL = false;
DriverInformation m_DriverInfo = {};
D3D12InitParams m_InitParams;
uint64_t m_SectionVersion;
ReplayOptions m_ReplayOptions;
@@ -857,6 +859,7 @@ public:
}
const std::map<ResourceId, DXGI_FORMAT> &GetBackbufferFormats() { return m_BackbufferFormat; }
void SetLogFile(const char *logfile);
void SetDriverInfo(const DriverInformation &info) { m_DriverInfo = info; }
void SetInitParams(const D3D12InitParams &params, uint64_t sectionVersion,
const ReplayOptions &opts, INVAPID3DDevice *nvapi, IAGSD3DDevice *ags)
{
+2
View File
@@ -114,6 +114,8 @@ void D3D12Replay::Initialise(IDXGIFactory1 *factory)
SAFE_RELEASE(pDXGIAdapter);
}
}
m_pDevice->SetDriverInfo(m_DriverInfo);
}
RDResult D3D12Replay::FatalErrorCheck()