mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-07-17 21:17:09 +00:00
Serialise D3D12 SDK version in captures
This commit is contained in:
@@ -227,6 +227,10 @@ bool D3D12InitParams::IsSupportedVersion(uint64_t ver)
|
||||
if(ver == 0xA)
|
||||
return true;
|
||||
|
||||
// 0xB -> 0xC - Serialised D3D12 SDK version
|
||||
if(ver == 0xB)
|
||||
return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -261,6 +265,15 @@ void DoSerialise(SerialiserType &ser, D3D12InitParams &el)
|
||||
el.VendorUAV = ~0U;
|
||||
el.VendorUAVSpace = ~0U;
|
||||
}
|
||||
|
||||
if(ser.VersionAtLeast(0xC))
|
||||
{
|
||||
SERIALISE_MEMBER(SDKVersion);
|
||||
}
|
||||
else
|
||||
{
|
||||
el.SDKVersion = 0;
|
||||
}
|
||||
}
|
||||
|
||||
INSTANTIATE_SERIALISE_TYPE(D3D12InitParams);
|
||||
|
||||
@@ -2508,6 +2508,13 @@ bool WrappedID3D12Device::EndFrameCapture(void *dev, void *wnd)
|
||||
|
||||
m_InitParams.usedDXIL = m_UsedDXIL;
|
||||
|
||||
HMODULE D3D12Core = GetModuleHandleA("D3D12Core.dll");
|
||||
if(D3D12Core)
|
||||
{
|
||||
m_InitParams.SDKVersion = *(DWORD *)GetProcAddress(D3D12Core, "D3D12SDKVersion");
|
||||
FreeLibrary(D3D12Core);
|
||||
}
|
||||
|
||||
if(m_UsedDXIL)
|
||||
{
|
||||
RDCLOG("Capture used DXIL");
|
||||
|
||||
@@ -51,8 +51,10 @@ struct D3D12InitParams
|
||||
uint32_t VendorUAV = ~0U;
|
||||
uint32_t VendorUAVSpace = ~0U;
|
||||
|
||||
UINT SDKVersion = 0;
|
||||
|
||||
// check if a frame capture section version is supported
|
||||
static const uint64_t CurrentVersion = 0xB;
|
||||
static const uint64_t CurrentVersion = 0xC;
|
||||
|
||||
static bool IsSupportedVersion(uint64_t ver);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user