Fix serialisation of D3D12_WRITEBUFFERIMMEDIATE_PARAMETER's gpu address

This commit is contained in:
baldurk
2019-06-27 09:17:43 +01:00
parent 24d55fde9f
commit 50266cdee2
3 changed files with 17 additions and 2 deletions
+5
View File
@@ -158,6 +158,11 @@ bool D3D12InitParams::IsSupportedVersion(uint64_t ver)
if(ver == CurrentVersion)
return true;
// 0x6 -> 0x7 - Fixed serialisation of D3D12_WRITEBUFFERIMMEDIATE_PARAMETER to properly replay the
// GPU address
if(ver == 0x6)
return true;
// 0x5 -> 0x6 - Multiply by number of planes in format when serialising initial states -
// i.e. stencil is saved with depth in initial states.
if(ver == 0x5)
+1 -1
View File
@@ -46,7 +46,7 @@ struct D3D12InitParams
D3D_FEATURE_LEVEL MinimumFeatureLevel;
// check if a frame capture section version is supported
static const uint64_t CurrentVersion = 0x6;
static const uint64_t CurrentVersion = 0x7;
static bool IsSupportedVersion(uint64_t ver);
};
+11 -1
View File
@@ -1250,7 +1250,17 @@ void DoSerialise(SerialiserType &ser, D3D12_SUBRESOURCE_RANGE_UINT64 &el)
template <class SerialiserType>
void DoSerialise(SerialiserType &ser, D3D12_WRITEBUFFERIMMEDIATE_PARAMETER &el)
{
SERIALISE_MEMBER(Dest);
if(ser.VersionAtLeast(0x7))
{
SERIALISE_MEMBER_TYPED(D3D12BufferLocation, Dest);
}
else
{
RDCERR(
"Replay will crash - old capture with corrupted D3D12_WRITEBUFFERIMMEDIATE_PARAMETER. "
"Re-capture to fix this.");
SERIALISE_MEMBER(Dest);
}
SERIALISE_MEMBER(Value);
}