Serialise D3D12 SDK version in captures

This commit is contained in:
baldurk
2021-04-21 16:53:47 +01:00
parent 9dee6a64a8
commit 525906ab87
3 changed files with 23 additions and 1 deletions
+13
View File
@@ -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);
+7
View File
@@ -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");
+3 -1
View File
@@ -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);
};