mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-05-27 20:31:02 +00:00
Fix serialisation of D3D12_WRITEBUFFERIMMEDIATE_PARAMETER's gpu address
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -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);
|
||||
};
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user