Add important tagging to parameters in D3D12

This commit is contained in:
baldurk
2021-07-01 15:15:02 +01:00
parent 2af1ac20c9
commit 7aed22cd0d
14 changed files with 409 additions and 273 deletions
@@ -33,9 +33,9 @@ bool WrappedID3D12GraphicsCommandList::Serialise_AtomicCopyBufferUINT(
{
ID3D12GraphicsCommandList1 *pCommandList = this;
SERIALISE_ELEMENT(pCommandList);
SERIALISE_ELEMENT(pDstBuffer);
SERIALISE_ELEMENT(pDstBuffer).Important();
SERIALISE_ELEMENT(DstOffset);
SERIALISE_ELEMENT(pSrcBuffer);
SERIALISE_ELEMENT(pSrcBuffer).Important();
SERIALISE_ELEMENT(SrcOffset);
SERIALISE_ELEMENT(Dependencies);
SERIALISE_ELEMENT_ARRAY(ppDependentResources, Dependencies);
@@ -151,9 +151,9 @@ bool WrappedID3D12GraphicsCommandList::Serialise_AtomicCopyBufferUINT64(
{
ID3D12GraphicsCommandList1 *pCommandList = this;
SERIALISE_ELEMENT(pCommandList);
SERIALISE_ELEMENT(pDstBuffer);
SERIALISE_ELEMENT(pDstBuffer).Important();
SERIALISE_ELEMENT(DstOffset);
SERIALISE_ELEMENT(pSrcBuffer);
SERIALISE_ELEMENT(pSrcBuffer).Important();
SERIALISE_ELEMENT(SrcOffset);
SERIALISE_ELEMENT(Dependencies);
SERIALISE_ELEMENT_ARRAY(ppDependentResources, Dependencies);
@@ -267,8 +267,8 @@ bool WrappedID3D12GraphicsCommandList::Serialise_OMSetDepthBounds(SerialiserType
{
ID3D12GraphicsCommandList1 *pCommandList = this;
SERIALISE_ELEMENT(pCommandList);
SERIALISE_ELEMENT(Min);
SERIALISE_ELEMENT(Max);
SERIALISE_ELEMENT(Min).Important();
SERIALISE_ELEMENT(Max).Important();
SERIALISE_CHECK_READ_ERRORS();
@@ -342,7 +342,7 @@ bool WrappedID3D12GraphicsCommandList::Serialise_SetSamplePositions(
{
ID3D12GraphicsCommandList1 *pCommandList = this;
SERIALISE_ELEMENT(pCommandList);
SERIALISE_ELEMENT(NumSamplesPerPixel);
SERIALISE_ELEMENT(NumSamplesPerPixel).Important();
SERIALISE_ELEMENT(NumPixels);
SERIALISE_ELEMENT_ARRAY(pSamplePositions, NumSamplesPerPixel * NumPixels);
@@ -436,11 +436,11 @@ bool WrappedID3D12GraphicsCommandList::Serialise_ResolveSubresourceRegion(
{
ID3D12GraphicsCommandList1 *pCommandList = this;
SERIALISE_ELEMENT(pCommandList);
SERIALISE_ELEMENT(pDstResource);
SERIALISE_ELEMENT(pDstResource).Important();
SERIALISE_ELEMENT(DstSubresource);
SERIALISE_ELEMENT(DstX);
SERIALISE_ELEMENT(DstY);
SERIALISE_ELEMENT(pSrcResource);
SERIALISE_ELEMENT(pSrcResource).Important();
SERIALISE_ELEMENT(SrcSubresource);
SERIALISE_ELEMENT_OPT(pSrcRect);
SERIALISE_ELEMENT(Format);
@@ -541,7 +541,7 @@ bool WrappedID3D12GraphicsCommandList::Serialise_SetViewInstanceMask(SerialiserT
{
ID3D12GraphicsCommandList1 *pCommandList = this;
SERIALISE_ELEMENT(pCommandList);
SERIALISE_ELEMENT(Mask);
SERIALISE_ELEMENT(Mask).Important();
SERIALISE_CHECK_READ_ERRORS();
@@ -32,7 +32,7 @@ bool WrappedID3D12GraphicsCommandList::Serialise_WriteBufferImmediate(
ID3D12GraphicsCommandList2 *pCommandList = this;
SERIALISE_ELEMENT(pCommandList);
SERIALISE_ELEMENT(Count);
SERIALISE_ELEMENT_ARRAY(pParams, Count);
SERIALISE_ELEMENT_ARRAY(pParams, Count).Important();
SERIALISE_ELEMENT_ARRAY(pModes, Count);
SERIALISE_CHECK_READ_ERRORS();
@@ -25,6 +25,132 @@
#include "d3d12_command_list.h"
#include "d3d12_debug.h"
static rdcstr ToHumanStr(const D3D12_RENDER_PASS_BEGINNING_ACCESS_TYPE &el)
{
BEGIN_ENUM_STRINGISE(D3D12_RENDER_PASS_BEGINNING_ACCESS_TYPE);
{
case D3D12_RENDER_PASS_BEGINNING_ACCESS_TYPE_DISCARD: return "Discard";
case D3D12_RENDER_PASS_BEGINNING_ACCESS_TYPE_PRESERVE: return "Preserve";
case D3D12_RENDER_PASS_BEGINNING_ACCESS_TYPE_CLEAR: return "Clear";
case D3D12_RENDER_PASS_BEGINNING_ACCESS_TYPE_NO_ACCESS: return "None";
}
END_ENUM_STRINGISE();
}
static rdcstr ToHumanStr(const D3D12_RENDER_PASS_ENDING_ACCESS_TYPE &el)
{
BEGIN_ENUM_STRINGISE(D3D12_RENDER_PASS_ENDING_ACCESS_TYPE);
{
case D3D12_RENDER_PASS_ENDING_ACCESS_TYPE_DISCARD: return "Discard";
case D3D12_RENDER_PASS_ENDING_ACCESS_TYPE_PRESERVE: return "Preserve";
case D3D12_RENDER_PASS_ENDING_ACCESS_TYPE_RESOLVE: return "Resolve";
case D3D12_RENDER_PASS_ENDING_ACCESS_TYPE_NO_ACCESS: return "None";
}
END_ENUM_STRINGISE();
}
static rdcstr MakeRenderPassOpString(bool ending, UINT NumRenderTargets,
const D3D12_RENDER_PASS_RENDER_TARGET_DESC *pRenderTargets,
const D3D12_RENDER_PASS_DEPTH_STENCIL_DESC *pDepthStencil,
D3D12_RENDER_PASS_FLAGS Flags)
{
rdcstr opDesc = "";
if(NumRenderTargets == 0 && pDepthStencil == NULL)
{
opDesc = "-";
}
else
{
bool colsame = true;
// look through all other color attachments to see if they're identical
for(UINT i = 1; i < NumRenderTargets; i++)
{
if(ending)
{
if(pRenderTargets[i].EndingAccess.Type == D3D12_RENDER_PASS_ENDING_ACCESS_TYPE_NO_ACCESS)
continue;
if(pRenderTargets[i].EndingAccess.Type != pRenderTargets[0].EndingAccess.Type)
colsame = false;
}
else
{
if(pRenderTargets[i].BeginningAccess.Type == D3D12_RENDER_PASS_BEGINNING_ACCESS_TYPE_NO_ACCESS)
continue;
if(pRenderTargets[i].BeginningAccess.Type != pRenderTargets[0].BeginningAccess.Type)
colsame = false;
}
}
// handle depth only passes
if(NumRenderTargets == 0)
{
opDesc = "";
}
else if(!colsame)
{
// if we have different storage for the colour, don't display
// the full details
opDesc = ending ? "Different end op" : "Different begin op";
}
else
{
// all colour ops are the same, print it
opDesc = ending ? ToHumanStr(pRenderTargets[0].EndingAccess.Type)
: ToHumanStr(pRenderTargets[0].BeginningAccess.Type);
}
// do we have depth?
if(pDepthStencil)
{
// could be empty if this is a depth-only pass
if(!opDesc.empty())
opDesc = "C=" + opDesc + ", ";
// if there's no stencil, just print depth op
if(pDepthStencil->StencilBeginningAccess.Type ==
D3D12_RENDER_PASS_BEGINNING_ACCESS_TYPE_NO_ACCESS &&
pDepthStencil->StencilEndingAccess.Type == D3D12_RENDER_PASS_ENDING_ACCESS_TYPE_NO_ACCESS)
{
opDesc += "D=" + (ending ? ToHumanStr(pDepthStencil->DepthEndingAccess.Type)
: ToHumanStr(pDepthStencil->DepthBeginningAccess.Type));
}
else
{
if(ending)
{
// if depth and stencil have same op, print together, otherwise separately
if(pDepthStencil->StencilEndingAccess.Type == pDepthStencil->DepthEndingAccess.Type)
opDesc += "DS=" + ToHumanStr(pDepthStencil->DepthEndingAccess.Type);
else
opDesc += "D=" + ToHumanStr(pDepthStencil->DepthEndingAccess.Type) + ", S=" +
ToHumanStr(pDepthStencil->StencilEndingAccess.Type);
}
else
{
// if depth and stencil have same op, print together, otherwise separately
if(pDepthStencil->StencilBeginningAccess.Type == pDepthStencil->DepthBeginningAccess.Type)
opDesc += "DS=" + ToHumanStr(pDepthStencil->DepthBeginningAccess.Type);
else
opDesc += "D=" + ToHumanStr(pDepthStencil->DepthBeginningAccess.Type) + ", S=" +
ToHumanStr(pDepthStencil->StencilBeginningAccess.Type);
}
}
}
}
if(ending && (Flags & D3D12_RENDER_PASS_FLAG_SUSPENDING_PASS))
opDesc = "Suspend, " + opDesc;
if(!ending && (Flags & D3D12_RENDER_PASS_FLAG_RESUMING_PASS))
opDesc = "Resume, " + opDesc;
return opDesc;
}
template <typename SerialiserType>
bool WrappedID3D12GraphicsCommandList::Serialise_BeginRenderPass(
SerialiserType &ser, UINT NumRenderTargets,
@@ -33,7 +159,7 @@ bool WrappedID3D12GraphicsCommandList::Serialise_BeginRenderPass(
{
ID3D12GraphicsCommandList4 *pCommandList = this;
SERIALISE_ELEMENT(pCommandList);
SERIALISE_ELEMENT(NumRenderTargets);
SERIALISE_ELEMENT(NumRenderTargets).Important();
SERIALISE_ELEMENT_ARRAY(pRenderTargets, NumRenderTargets);
SERIALISE_ELEMENT_OPT(pDepthStencil);
SERIALISE_ELEMENT(Flags);
@@ -104,38 +230,42 @@ bool WrappedID3D12GraphicsCommandList::Serialise_BeginRenderPass(
{
// perform any clears needed
for(UINT i = 0; i < NumRenderTargets; i++)
if((Flags & D3D12_RENDER_PASS_FLAG_RESUMING_PASS) == 0)
{
if(pRenderTargets[i].BeginningAccess.Type == D3D12_RENDER_PASS_BEGINNING_ACCESS_TYPE_CLEAR)
for(UINT i = 0; i < NumRenderTargets; i++)
{
Unwrap(m_Cmd->RerecordCmdList(m_Cmd->m_LastCmdListID))
->ClearRenderTargetView(pRenderTargets[i].cpuDescriptor,
pRenderTargets[i].BeginningAccess.Clear.ClearValue.Color, 0,
NULL);
if(pRenderTargets[i].BeginningAccess.Type == D3D12_RENDER_PASS_BEGINNING_ACCESS_TYPE_CLEAR)
{
Unwrap(m_Cmd->RerecordCmdList(m_Cmd->m_LastCmdListID))
->ClearRenderTargetView(pRenderTargets[i].cpuDescriptor,
pRenderTargets[i].BeginningAccess.Clear.ClearValue.Color,
0, NULL);
}
}
}
if(pDepthStencil)
{
D3D12_CLEAR_FLAGS flags = {};
if(pDepthStencil->DepthBeginningAccess.Type == D3D12_RENDER_PASS_BEGINNING_ACCESS_TYPE_CLEAR)
flags |= D3D12_CLEAR_FLAG_DEPTH;
if(pDepthStencil->StencilBeginningAccess.Type ==
D3D12_RENDER_PASS_BEGINNING_ACCESS_TYPE_CLEAR)
flags |= D3D12_CLEAR_FLAG_STENCIL;
if(flags != 0)
if(pDepthStencil)
{
// we can safely read from either depth/stencil clear values because if the access
// type isn't clear the corresponding flag will be unset - so whatever garbage value
// we have isn't used.
Unwrap(m_Cmd->RerecordCmdList(m_Cmd->m_LastCmdListID))
->ClearDepthStencilView(
pDepthStencil->cpuDescriptor, flags,
pDepthStencil->DepthBeginningAccess.Clear.ClearValue.DepthStencil.Depth,
pDepthStencil->StencilBeginningAccess.Clear.ClearValue.DepthStencil.Stencil, 0,
NULL);
D3D12_CLEAR_FLAGS flags = {};
if(pDepthStencil->DepthBeginningAccess.Type ==
D3D12_RENDER_PASS_BEGINNING_ACCESS_TYPE_CLEAR)
flags |= D3D12_CLEAR_FLAG_DEPTH;
if(pDepthStencil->StencilBeginningAccess.Type ==
D3D12_RENDER_PASS_BEGINNING_ACCESS_TYPE_CLEAR)
flags |= D3D12_CLEAR_FLAG_STENCIL;
if(flags != 0)
{
// we can safely read from either depth/stencil clear values because if the access
// type isn't clear the corresponding flag will be unset - so whatever garbage value
// we have isn't used.
Unwrap(m_Cmd->RerecordCmdList(m_Cmd->m_LastCmdListID))
->ClearDepthStencilView(
pDepthStencil->cpuDescriptor, flags,
pDepthStencil->DepthBeginningAccess.Clear.ClearValue.DepthStencil.Depth,
pDepthStencil->StencilBeginningAccess.Clear.ClearValue.DepthStencil.Stencil,
0, NULL);
}
}
}
@@ -228,7 +358,9 @@ bool WrappedID3D12GraphicsCommandList::Serialise_BeginRenderPass(
m_Cmd->AddEvent();
DrawcallDescription draw;
draw.name = "BeginRenderPass()";
draw.name = StringFormat::Fmt(
"BeginRenderPass(%s)",
MakeRenderPassOpString(false, NumRenderTargets, pRenderTargets, pDepthStencil, Flags).c_str());
draw.flags |= DrawFlags::BeginPass | DrawFlags::PassBoundary;
m_Cmd->AddDrawcall(draw);
@@ -336,7 +468,7 @@ template <typename SerialiserType>
bool WrappedID3D12GraphicsCommandList::Serialise_EndRenderPass(SerialiserType &ser)
{
ID3D12GraphicsCommandList4 *pCommandList = this;
SERIALISE_ELEMENT(pCommandList);
SERIALISE_ELEMENT(pCommandList).Unimportant();
SERIALISE_CHECK_READ_ERRORS();
@@ -377,8 +509,14 @@ bool WrappedID3D12GraphicsCommandList::Serialise_EndRenderPass(SerialiserType &s
m_Cmd->AddEvent();
D3D12RenderState &state = m_Cmd->m_BakedCmdListInfo[m_Cmd->m_LastCmdListID].state;
DrawcallDescription draw;
draw.name = "EndRenderPass()";
draw.name = StringFormat::Fmt(
"EndRenderPass(%s)",
MakeRenderPassOpString(true, (UINT)state.rpRTs.size(), state.rpRTs.data(),
state.rpDSV.cpuDescriptor.ptr ? &state.rpDSV : NULL, state.rpFlags)
.c_str());
draw.flags |= DrawFlags::EndPass | DrawFlags::PassBoundary;
m_Cmd->AddDrawcall(draw);
@@ -31,8 +31,8 @@ bool WrappedID3D12GraphicsCommandList::Serialise_RSSetShadingRate(
{
ID3D12GraphicsCommandList5 *pCommandList = this;
SERIALISE_ELEMENT(pCommandList);
SERIALISE_ELEMENT(baseShadingRate);
SERIALISE_ELEMENT_ARRAY(combiners, 2);
SERIALISE_ELEMENT(baseShadingRate).Important();
SERIALISE_ELEMENT_ARRAY(combiners, 2).Important();
SERIALISE_CHECK_READ_ERRORS();
@@ -133,7 +133,7 @@ bool WrappedID3D12GraphicsCommandList::Serialise_RSSetShadingRateImage(Serialise
{
ID3D12GraphicsCommandList5 *pCommandList = this;
SERIALISE_ELEMENT(pCommandList);
SERIALISE_ELEMENT(shadingRateImage);
SERIALISE_ELEMENT(shadingRateImage).Important();
SERIALISE_CHECK_READ_ERRORS();
+105 -125
View File
@@ -82,7 +82,9 @@ bool WrappedID3D12GraphicsCommandList::Serialise_Close(SerialiserType &ser)
BakedCommandList = record->bakedCommands->GetResourceID();
}
SERIALISE_ELEMENT_LOCAL(CommandList, GetResourceID()).TypedAs("ID3D12GraphicsCommandList *"_lit);
SERIALISE_ELEMENT_LOCAL(CommandList, GetResourceID())
.TypedAs("ID3D12GraphicsCommandList *"_lit)
.Important();
SERIALISE_ELEMENT(BakedCommandList).TypedAs("ID3D12GraphicsCommandList *"_lit);
SERIALISE_CHECK_READ_ERRORS();
@@ -195,9 +197,11 @@ bool WrappedID3D12GraphicsCommandList::Serialise_Reset(SerialiserType &ser,
}
SERIALISE_ELEMENT(BakedCommandList).TypedAs("ID3D12GraphicsCommandList *"_lit);
SERIALISE_ELEMENT_LOCAL(CommandList, GetResourceID()).TypedAs("ID3D12GraphicsCommandList *"_lit);
SERIALISE_ELEMENT_LOCAL(CommandList, GetResourceID())
.TypedAs("ID3D12GraphicsCommandList *"_lit)
.Important();
SERIALISE_ELEMENT(pAllocator);
SERIALISE_ELEMENT(pInitialState);
SERIALISE_ELEMENT(pInitialState).Important();
SERIALISE_CHECK_READ_ERRORS();
@@ -463,7 +467,7 @@ bool WrappedID3D12GraphicsCommandList::Serialise_ResourceBarrier(
ID3D12GraphicsCommandList *pCommandList = this;
SERIALISE_ELEMENT(pCommandList);
SERIALISE_ELEMENT(NumBarriers);
SERIALISE_ELEMENT_ARRAY(pBarriers, NumBarriers);
SERIALISE_ELEMENT_ARRAY(pBarriers, NumBarriers).Important();
SERIALISE_CHECK_READ_ERRORS();
@@ -614,7 +618,7 @@ bool WrappedID3D12GraphicsCommandList::Serialise_ClearState(SerialiserType &ser,
{
ID3D12GraphicsCommandList *pCommandList = this;
SERIALISE_ELEMENT(pCommandList);
SERIALISE_ELEMENT(pPipelineState);
SERIALISE_ELEMENT(pPipelineState).Important();
SERIALISE_CHECK_READ_ERRORS();
@@ -680,7 +684,7 @@ bool WrappedID3D12GraphicsCommandList::Serialise_IASetPrimitiveTopology(
{
ID3D12GraphicsCommandList *pCommandList = this;
SERIALISE_ELEMENT(pCommandList);
SERIALISE_ELEMENT(PrimitiveTopology);
SERIALISE_ELEMENT(PrimitiveTopology).Important();
SERIALISE_CHECK_READ_ERRORS();
@@ -744,7 +748,7 @@ bool WrappedID3D12GraphicsCommandList::Serialise_RSSetViewports(SerialiserType &
ID3D12GraphicsCommandList *pCommandList = this;
SERIALISE_ELEMENT(pCommandList);
SERIALISE_ELEMENT(NumViewports);
SERIALISE_ELEMENT_ARRAY(pViewports, NumViewports);
SERIALISE_ELEMENT_ARRAY(pViewports, NumViewports).Important();
SERIALISE_CHECK_READ_ERRORS();
@@ -812,7 +816,7 @@ bool WrappedID3D12GraphicsCommandList::Serialise_RSSetScissorRects(SerialiserTyp
ID3D12GraphicsCommandList *pCommandList = this;
SERIALISE_ELEMENT(pCommandList);
SERIALISE_ELEMENT(NumRects);
SERIALISE_ELEMENT_ARRAY(pRects, NumRects);
SERIALISE_ELEMENT_ARRAY(pRects, NumRects).Important();
SERIALISE_CHECK_READ_ERRORS();
@@ -878,7 +882,7 @@ bool WrappedID3D12GraphicsCommandList::Serialise_OMSetBlendFactor(SerialiserType
{
ID3D12GraphicsCommandList *pCommandList = this;
SERIALISE_ELEMENT(pCommandList);
SERIALISE_ELEMENT_ARRAY(BlendFactor, 4);
SERIALISE_ELEMENT_ARRAY(BlendFactor, 4).Important();
SERIALISE_CHECK_READ_ERRORS();
@@ -936,7 +940,7 @@ bool WrappedID3D12GraphicsCommandList::Serialise_OMSetStencilRef(SerialiserType
{
ID3D12GraphicsCommandList *pCommandList = this;
SERIALISE_ELEMENT(pCommandList);
SERIALISE_ELEMENT(StencilRef);
SERIALISE_ELEMENT(StencilRef).Important();
SERIALISE_CHECK_READ_ERRORS();
@@ -995,7 +999,7 @@ bool WrappedID3D12GraphicsCommandList::Serialise_SetDescriptorHeaps(
ID3D12GraphicsCommandList *pCommandList = this;
SERIALISE_ELEMENT(pCommandList);
SERIALISE_ELEMENT(NumDescriptorHeaps);
SERIALISE_ELEMENT_ARRAY(ppDescriptorHeaps, NumDescriptorHeaps);
SERIALISE_ELEMENT_ARRAY(ppDescriptorHeaps, NumDescriptorHeaps).Important();
SERIALISE_CHECK_READ_ERRORS();
@@ -1075,7 +1079,7 @@ bool WrappedID3D12GraphicsCommandList::Serialise_IASetIndexBuffer(SerialiserType
{
ID3D12GraphicsCommandList *pCommandList = this;
SERIALISE_ELEMENT(pCommandList);
SERIALISE_ELEMENT_OPT(pView);
SERIALISE_ELEMENT_OPT(pView).Important();
SERIALISE_CHECK_READ_ERRORS();
@@ -1154,9 +1158,9 @@ bool WrappedID3D12GraphicsCommandList::Serialise_IASetVertexBuffers(
{
ID3D12GraphicsCommandList *pCommandList = this;
SERIALISE_ELEMENT(pCommandList);
SERIALISE_ELEMENT(StartSlot);
SERIALISE_ELEMENT(StartSlot).Important();
SERIALISE_ELEMENT(NumViews);
SERIALISE_ELEMENT_ARRAY(pViews, NumViews);
SERIALISE_ELEMENT_ARRAY(pViews, NumViews).Important();
SERIALISE_CHECK_READ_ERRORS();
@@ -1234,9 +1238,9 @@ bool WrappedID3D12GraphicsCommandList::Serialise_SOSetTargets(
{
ID3D12GraphicsCommandList *pCommandList = this;
SERIALISE_ELEMENT(pCommandList);
SERIALISE_ELEMENT(StartSlot);
SERIALISE_ELEMENT(StartSlot).Important();
SERIALISE_ELEMENT(NumViews);
SERIALISE_ELEMENT_ARRAY(pViews, NumViews);
SERIALISE_ELEMENT_ARRAY(pViews, NumViews).Important();
SERIALISE_CHECK_READ_ERRORS();
@@ -1316,7 +1320,7 @@ bool WrappedID3D12GraphicsCommandList::Serialise_SetPipelineState(SerialiserType
{
ID3D12GraphicsCommandList *pCommandList = this;
SERIALISE_ELEMENT(pCommandList);
SERIALISE_ELEMENT(pPipelineState);
SERIALISE_ELEMENT(pPipelineState).Important();
SERIALISE_CHECK_READ_ERRORS();
@@ -1403,10 +1407,13 @@ bool WrappedID3D12GraphicsCommandList::Serialise_OMSetRenderTargets(
// read and serialise the D3D12Descriptor contents directly, as the call has semantics of
// consuming the descriptor immediately
SERIALISE_ELEMENT(RTVs).Named("pRenderTargetDescriptors"_lit);
SERIALISE_ELEMENT(RTVs).Named("pRenderTargetDescriptors"_lit).Important();
}
else
{
// in this case just make the number of descriptors important
ser.Important();
// this path is only used during reading, since during writing we're implicitly on the newest
// version above. We start with numHandles initialised to 0, as the array count is not used on
// reading (it's filled in), then we calculate it below after having serialised
@@ -1590,7 +1597,7 @@ bool WrappedID3D12GraphicsCommandList::Serialise_SetComputeRootSignature(
{
ID3D12GraphicsCommandList *pCommandList = this;
SERIALISE_ELEMENT(pCommandList);
SERIALISE_ELEMENT(pRootSignature);
SERIALISE_ELEMENT(pRootSignature).Important();
SERIALISE_CHECK_READ_ERRORS();
@@ -1666,8 +1673,8 @@ bool WrappedID3D12GraphicsCommandList::Serialise_SetComputeRootDescriptorTable(
{
ID3D12GraphicsCommandList *pCommandList = this;
SERIALISE_ELEMENT(pCommandList);
SERIALISE_ELEMENT(RootParameterIndex);
SERIALISE_ELEMENT(BaseDescriptor);
SERIALISE_ELEMENT(RootParameterIndex).Important();
SERIALISE_ELEMENT(BaseDescriptor).Important();
SERIALISE_CHECK_READ_ERRORS();
@@ -1773,8 +1780,8 @@ bool WrappedID3D12GraphicsCommandList::Serialise_SetComputeRoot32BitConstant(
{
ID3D12GraphicsCommandList *pCommandList = this;
SERIALISE_ELEMENT(pCommandList);
SERIALISE_ELEMENT(RootParameterIndex);
SERIALISE_ELEMENT(SrcData);
SERIALISE_ELEMENT(RootParameterIndex).Important();
SERIALISE_ELEMENT(SrcData).Important();
SERIALISE_ELEMENT(DestOffsetIn32BitValues);
SERIALISE_CHECK_READ_ERRORS();
@@ -1845,10 +1852,10 @@ bool WrappedID3D12GraphicsCommandList::Serialise_SetComputeRoot32BitConstants(
{
ID3D12GraphicsCommandList *pCommandList = this;
SERIALISE_ELEMENT(pCommandList);
SERIALISE_ELEMENT(RootParameterIndex);
SERIALISE_ELEMENT(RootParameterIndex).Important();
SERIALISE_ELEMENT(Num32BitValuesToSet);
const UINT *pSrcData = (const UINT *)pSrcVoidData;
SERIALISE_ELEMENT_ARRAY(pSrcData, Num32BitValuesToSet);
SERIALISE_ELEMENT_ARRAY(pSrcData, Num32BitValuesToSet).Important();
SERIALISE_ELEMENT(DestOffsetIn32BitValues);
SERIALISE_CHECK_READ_ERRORS();
@@ -1923,8 +1930,8 @@ bool WrappedID3D12GraphicsCommandList::Serialise_SetComputeRootConstantBufferVie
{
ID3D12GraphicsCommandList *pCommandList = this;
SERIALISE_ELEMENT(pCommandList);
SERIALISE_ELEMENT(RootParameterIndex);
SERIALISE_ELEMENT_TYPED(D3D12BufferLocation, BufferLocation);
SERIALISE_ELEMENT(RootParameterIndex).Important();
SERIALISE_ELEMENT_TYPED(D3D12BufferLocation, BufferLocation).Important();
SERIALISE_CHECK_READ_ERRORS();
@@ -2003,8 +2010,8 @@ bool WrappedID3D12GraphicsCommandList::Serialise_SetComputeRootShaderResourceVie
{
ID3D12GraphicsCommandList *pCommandList = this;
SERIALISE_ELEMENT(pCommandList);
SERIALISE_ELEMENT(RootParameterIndex);
SERIALISE_ELEMENT_TYPED(D3D12BufferLocation, BufferLocation);
SERIALISE_ELEMENT(RootParameterIndex).Important();
SERIALISE_ELEMENT_TYPED(D3D12BufferLocation, BufferLocation).Important();
SERIALISE_CHECK_READ_ERRORS();
@@ -2083,8 +2090,8 @@ bool WrappedID3D12GraphicsCommandList::Serialise_SetComputeRootUnorderedAccessVi
{
ID3D12GraphicsCommandList *pCommandList = this;
SERIALISE_ELEMENT(pCommandList);
SERIALISE_ELEMENT(RootParameterIndex);
SERIALISE_ELEMENT_TYPED(D3D12BufferLocation, BufferLocation);
SERIALISE_ELEMENT(RootParameterIndex).Important();
SERIALISE_ELEMENT_TYPED(D3D12BufferLocation, BufferLocation).Important();
SERIALISE_CHECK_READ_ERRORS();
@@ -2167,7 +2174,7 @@ bool WrappedID3D12GraphicsCommandList::Serialise_SetGraphicsRootSignature(
{
ID3D12GraphicsCommandList *pCommandList = this;
SERIALISE_ELEMENT(pCommandList);
SERIALISE_ELEMENT(pRootSignature);
SERIALISE_ELEMENT(pRootSignature).Important();
SERIALISE_CHECK_READ_ERRORS();
@@ -2243,8 +2250,8 @@ bool WrappedID3D12GraphicsCommandList::Serialise_SetGraphicsRootDescriptorTable(
{
ID3D12GraphicsCommandList *pCommandList = this;
SERIALISE_ELEMENT(pCommandList);
SERIALISE_ELEMENT(RootParameterIndex);
SERIALISE_ELEMENT(BaseDescriptor);
SERIALISE_ELEMENT(RootParameterIndex).Important();
SERIALISE_ELEMENT(BaseDescriptor).Important();
SERIALISE_CHECK_READ_ERRORS();
@@ -2350,8 +2357,8 @@ bool WrappedID3D12GraphicsCommandList::Serialise_SetGraphicsRoot32BitConstant(
{
ID3D12GraphicsCommandList *pCommandList = this;
SERIALISE_ELEMENT(pCommandList);
SERIALISE_ELEMENT(RootParameterIndex);
SERIALISE_ELEMENT(SrcData);
SERIALISE_ELEMENT(RootParameterIndex).Important();
SERIALISE_ELEMENT(SrcData).Important();
SERIALISE_ELEMENT(DestOffsetIn32BitValues);
SERIALISE_CHECK_READ_ERRORS();
@@ -2422,10 +2429,10 @@ bool WrappedID3D12GraphicsCommandList::Serialise_SetGraphicsRoot32BitConstants(
{
ID3D12GraphicsCommandList *pCommandList = this;
SERIALISE_ELEMENT(pCommandList);
SERIALISE_ELEMENT(RootParameterIndex);
SERIALISE_ELEMENT(RootParameterIndex).Important();
SERIALISE_ELEMENT(Num32BitValuesToSet);
const UINT *pSrcData = (const UINT *)pSrcVoidData;
SERIALISE_ELEMENT_ARRAY(pSrcData, Num32BitValuesToSet);
SERIALISE_ELEMENT_ARRAY(pSrcData, Num32BitValuesToSet).Important();
SERIALISE_ELEMENT(DestOffsetIn32BitValues);
SERIALISE_CHECK_READ_ERRORS();
@@ -2500,8 +2507,8 @@ bool WrappedID3D12GraphicsCommandList::Serialise_SetGraphicsRootConstantBufferVi
{
ID3D12GraphicsCommandList *pCommandList = this;
SERIALISE_ELEMENT(pCommandList);
SERIALISE_ELEMENT(RootParameterIndex);
SERIALISE_ELEMENT_TYPED(D3D12BufferLocation, BufferLocation);
SERIALISE_ELEMENT(RootParameterIndex).Important();
SERIALISE_ELEMENT_TYPED(D3D12BufferLocation, BufferLocation).Important();
SERIALISE_CHECK_READ_ERRORS();
@@ -2580,8 +2587,8 @@ bool WrappedID3D12GraphicsCommandList::Serialise_SetGraphicsRootShaderResourceVi
{
ID3D12GraphicsCommandList *pCommandList = this;
SERIALISE_ELEMENT(pCommandList);
SERIALISE_ELEMENT(RootParameterIndex);
SERIALISE_ELEMENT_TYPED(D3D12BufferLocation, BufferLocation);
SERIALISE_ELEMENT(RootParameterIndex).Important();
SERIALISE_ELEMENT_TYPED(D3D12BufferLocation, BufferLocation).Important();
SERIALISE_CHECK_READ_ERRORS();
@@ -2660,8 +2667,8 @@ bool WrappedID3D12GraphicsCommandList::Serialise_SetGraphicsRootUnorderedAccessV
{
ID3D12GraphicsCommandList *pCommandList = this;
SERIALISE_ELEMENT(pCommandList);
SERIALISE_ELEMENT(RootParameterIndex);
SERIALISE_ELEMENT_TYPED(D3D12BufferLocation, BufferLocation);
SERIALISE_ELEMENT(RootParameterIndex).Important();
SERIALISE_ELEMENT_TYPED(D3D12BufferLocation, BufferLocation).Important();
SERIALISE_CHECK_READ_ERRORS();
@@ -2745,9 +2752,9 @@ bool WrappedID3D12GraphicsCommandList::Serialise_BeginQuery(SerialiserType &ser,
{
ID3D12GraphicsCommandList *pCommandList = this;
SERIALISE_ELEMENT(pCommandList);
SERIALISE_ELEMENT(pQueryHeap);
SERIALISE_ELEMENT(Type);
SERIALISE_ELEMENT(Index);
SERIALISE_ELEMENT(pQueryHeap).Important();
SERIALISE_ELEMENT(Type).Important();
SERIALISE_ELEMENT(Index).Important();
SERIALISE_CHECK_READ_ERRORS();
@@ -2793,9 +2800,9 @@ bool WrappedID3D12GraphicsCommandList::Serialise_EndQuery(SerialiserType &ser,
{
ID3D12GraphicsCommandList *pCommandList = this;
SERIALISE_ELEMENT(pCommandList);
SERIALISE_ELEMENT(pQueryHeap);
SERIALISE_ELEMENT(Type);
SERIALISE_ELEMENT(Index);
SERIALISE_ELEMENT(pQueryHeap).Important();
SERIALISE_ELEMENT(Type).Important();
SERIALISE_ELEMENT(Index).Important();
SERIALISE_CHECK_READ_ERRORS();
@@ -2842,11 +2849,11 @@ bool WrappedID3D12GraphicsCommandList::Serialise_ResolveQueryData(
{
ID3D12GraphicsCommandList *pCommandList = this;
SERIALISE_ELEMENT(pCommandList);
SERIALISE_ELEMENT(pQueryHeap);
SERIALISE_ELEMENT(Type);
SERIALISE_ELEMENT(pQueryHeap).Important();
SERIALISE_ELEMENT(Type).Important();
SERIALISE_ELEMENT(StartIndex);
SERIALISE_ELEMENT(NumQueries);
SERIALISE_ELEMENT(pDestinationBuffer);
SERIALISE_ELEMENT(pDestinationBuffer).Important();
SERIALISE_ELEMENT(AlignedDestinationBufferOffset);
SERIALISE_CHECK_READ_ERRORS();
@@ -2901,9 +2908,9 @@ bool WrappedID3D12GraphicsCommandList::Serialise_SetPredication(SerialiserType &
{
ID3D12GraphicsCommandList *pCommandList = this;
SERIALISE_ELEMENT(pCommandList);
SERIALISE_ELEMENT(pBuffer);
SERIALISE_ELEMENT(pBuffer).Important();
SERIALISE_ELEMENT(AlignedBufferOffset);
SERIALISE_ELEMENT(Operation);
SERIALISE_ELEMENT(Operation).Important();
SERIALISE_CHECK_READ_ERRORS();
@@ -2945,7 +2952,7 @@ bool WrappedID3D12GraphicsCommandList::Serialise_SetMarker(SerialiserType &ser,
ID3D12GraphicsCommandList *pCommandList = this;
SERIALISE_ELEMENT(pCommandList);
SERIALISE_ELEMENT(MarkerText);
SERIALISE_ELEMENT(MarkerText).Important();
SERIALISE_CHECK_READ_ERRORS();
@@ -3008,7 +3015,7 @@ bool WrappedID3D12GraphicsCommandList::Serialise_BeginEvent(SerialiserType &ser,
ID3D12GraphicsCommandList *pCommandList = this;
SERIALISE_ELEMENT(pCommandList);
SERIALISE_ELEMENT(MarkerText);
SERIALISE_ELEMENT(MarkerText).Important();
SERIALISE_CHECK_READ_ERRORS();
@@ -3066,7 +3073,7 @@ template <typename SerialiserType>
bool WrappedID3D12GraphicsCommandList::Serialise_EndEvent(SerialiserType &ser)
{
ID3D12GraphicsCommandList *pCommandList = this;
SERIALISE_ELEMENT(pCommandList);
SERIALISE_ELEMENT(pCommandList).Unimportant();
SERIALISE_CHECK_READ_ERRORS();
@@ -3092,7 +3099,6 @@ bool WrappedID3D12GraphicsCommandList::Serialise_EndEvent(SerialiserType &ser)
D3D12MarkerRegion::End(GetWrappedCrackedList());
DrawcallDescription draw;
draw.name = ToStr(D3D12Chunk::PopMarker) + "()";
draw.flags = DrawFlags::PopMarker;
m_Cmd->AddEvent();
@@ -3134,8 +3140,8 @@ bool WrappedID3D12GraphicsCommandList::Serialise_DrawInstanced(SerialiserType &s
{
ID3D12GraphicsCommandList *pCommandList = this;
SERIALISE_ELEMENT(pCommandList);
SERIALISE_ELEMENT(VertexCountPerInstance);
SERIALISE_ELEMENT(InstanceCount);
SERIALISE_ELEMENT(VertexCountPerInstance).Important();
SERIALISE_ELEMENT(InstanceCount).Important();
SERIALISE_ELEMENT(StartVertexLocation);
SERIALISE_ELEMENT(StartInstanceLocation);
@@ -3175,7 +3181,6 @@ bool WrappedID3D12GraphicsCommandList::Serialise_DrawInstanced(SerialiserType &s
m_Cmd->AddEvent();
DrawcallDescription draw;
draw.name = StringFormat::Fmt("DrawInstanced(%u, %u)", VertexCountPerInstance, InstanceCount);
draw.numIndices = VertexCountPerInstance;
draw.numInstances = InstanceCount;
draw.indexOffset = 0;
@@ -3217,8 +3222,8 @@ bool WrappedID3D12GraphicsCommandList::Serialise_DrawIndexedInstanced(
{
ID3D12GraphicsCommandList *pCommandList = this;
SERIALISE_ELEMENT(pCommandList);
SERIALISE_ELEMENT(IndexCountPerInstance);
SERIALISE_ELEMENT(InstanceCount);
SERIALISE_ELEMENT(IndexCountPerInstance).Important();
SERIALISE_ELEMENT(InstanceCount).Important();
SERIALISE_ELEMENT(StartIndexLocation);
SERIALISE_ELEMENT(BaseVertexLocation);
SERIALISE_ELEMENT(StartInstanceLocation);
@@ -3259,8 +3264,6 @@ bool WrappedID3D12GraphicsCommandList::Serialise_DrawIndexedInstanced(
m_Cmd->AddEvent();
DrawcallDescription draw;
draw.name =
StringFormat::Fmt("DrawIndexedInstanced(%u, %u)", IndexCountPerInstance, InstanceCount);
draw.numIndices = IndexCountPerInstance;
draw.numInstances = InstanceCount;
draw.indexOffset = StartIndexLocation;
@@ -3305,9 +3308,9 @@ bool WrappedID3D12GraphicsCommandList::Serialise_Dispatch(SerialiserType &ser, U
{
ID3D12GraphicsCommandList *pCommandList = this;
SERIALISE_ELEMENT(pCommandList);
SERIALISE_ELEMENT(ThreadGroupCountX);
SERIALISE_ELEMENT(ThreadGroupCountY);
SERIALISE_ELEMENT(ThreadGroupCountZ);
SERIALISE_ELEMENT(ThreadGroupCountX).Important();
SERIALISE_ELEMENT(ThreadGroupCountY).Important();
SERIALISE_ELEMENT(ThreadGroupCountZ).Important();
SERIALISE_CHECK_READ_ERRORS();
@@ -3340,8 +3343,6 @@ bool WrappedID3D12GraphicsCommandList::Serialise_Dispatch(SerialiserType &ser, U
m_Cmd->AddEvent();
DrawcallDescription draw;
draw.name = StringFormat::Fmt("Dispatch(%u, %u, %u)", ThreadGroupCountX, ThreadGroupCountY,
ThreadGroupCountZ);
draw.dispatchDimension[0] = ThreadGroupCountX;
draw.dispatchDimension[1] = ThreadGroupCountY;
draw.dispatchDimension[2] = ThreadGroupCountZ;
@@ -3377,7 +3378,7 @@ bool WrappedID3D12GraphicsCommandList::Serialise_ExecuteBundle(SerialiserType &s
{
ID3D12GraphicsCommandList *pCommandList = this;
SERIALISE_ELEMENT(pCommandList);
SERIALISE_ELEMENT(pBundle);
SERIALISE_ELEMENT(pBundle).Important();
SERIALISE_CHECK_READ_ERRORS();
@@ -3412,9 +3413,6 @@ bool WrappedID3D12GraphicsCommandList::Serialise_ExecuteBundle(SerialiserType &s
m_Cmd->AddEvent();
DrawcallDescription draw;
draw.name = StringFormat::Fmt(
"ExecuteBundle(%s)", ToStr(GetResourceManager()->GetOriginalID(GetResID(pBundle))).c_str());
draw.flags |= DrawFlags::CmdList;
m_Cmd->AddDrawcall(draw);
@@ -3510,8 +3508,9 @@ void WrappedID3D12GraphicsCommandList::ReserveExecuteIndirect(ID3D12GraphicsComm
if(multidraw)
{
m_Cmd->AddEvent();
DrawcallDescription draw;
draw.name = "ID3D12GraphicsCommandList::ExecuteIndirect() end";
draw.name = "ID3D12GraphicsCommandList::ExecuteIndirect()";
draw.flags = DrawFlags::PopMarker;
m_Cmd->AddDrawcall(draw);
}
@@ -3646,7 +3645,7 @@ void WrappedID3D12GraphicsCommandList::PatchExecuteIndirect(BakedCmdListInfo &in
fakeChunk->name = curDraw.name;
structuriser.Serialise("ArgumentData"_lit, *args);
structuriser.Serialise("ArgumentData"_lit, *args).Important();
// if this is the first draw of the indirect, we could have picked up previous
// non-indirect events in this drawcall, so the EID will be higher than we expect. Just
@@ -3679,7 +3678,7 @@ void WrappedID3D12GraphicsCommandList::PatchExecuteIndirect(BakedCmdListInfo &in
fakeChunk->name = curDraw.name;
structuriser.Serialise("ArgumentData"_lit, *args);
structuriser.Serialise("ArgumentData"_lit, *args).Important();
// if this is the first draw of the indirect, we could have picked up previous
// non-indirect events in this drawcall, so the EID will be higher than we expect. Just
@@ -3709,7 +3708,7 @@ void WrappedID3D12GraphicsCommandList::PatchExecuteIndirect(BakedCmdListInfo &in
fakeChunk->name = curDraw.name;
structuriser.Serialise("ArgumentData"_lit, *args);
structuriser.Serialise("ArgumentData"_lit, *args).Important();
// if this is the first draw of the indirect, we could have picked up previous
// non-indirect events in this drawcall, so the EID will be higher than we expect. Just
@@ -3730,9 +3729,9 @@ void WrappedID3D12GraphicsCommandList::PatchExecuteIndirect(BakedCmdListInfo &in
uint32_t *data32 = (uint32_t *)data;
data += argSize;
fakeChunk->name = StringFormat::Fmt("[%u] arg%u: IndirectSetRoot32BitConstants()", i, a);
fakeChunk->name = StringFormat::Fmt("[%u] arg%u: IndirectSetRoot32BitConstants", i, a);
structuriser.Serialise("Values"_lit, data32, arg.Constant.Num32BitValuesToSet);
structuriser.Serialise("Values"_lit, data32, arg.Constant.Num32BitValuesToSet).Important();
if(arg.Constant.RootParameterIndex < state.graphics.sigelems.size())
state.graphics.sigelems[arg.Constant.RootParameterIndex].constants.assign(
@@ -3769,9 +3768,9 @@ void WrappedID3D12GraphicsCommandList::PatchExecuteIndirect(BakedCmdListInfo &in
state.vbuffers[arg.VertexBuffer.Slot].size = vb->SizeInBytes;
state.vbuffers[arg.VertexBuffer.Slot].stride = vb->StrideInBytes;
fakeChunk->name = StringFormat::Fmt("[%u] arg%u: IndirectIASetVertexBuffer()", i, a);
fakeChunk->name = StringFormat::Fmt("[%u] arg%u: IndirectIASetVertexBuffer", i, a);
structuriser.Serialise("ArgumentData"_lit, *vb);
structuriser.Serialise("ArgumentData"_lit, *vb).Important();
// advance only the EID, since we're still in the same draw
eid++;
@@ -3797,9 +3796,9 @@ void WrappedID3D12GraphicsCommandList::PatchExecuteIndirect(BakedCmdListInfo &in
state.ibuffer.size = ib->SizeInBytes;
state.ibuffer.bytewidth = ib->Format == DXGI_FORMAT_R32_UINT ? 4 : 2;
fakeChunk->name = StringFormat::Fmt("[%u] arg%u: IndirectIASetIndexBuffer()", i, a);
fakeChunk->name = StringFormat::Fmt("[%u] arg%u: IndirectIASetIndexBuffer", i, a);
structuriser.Serialise("ArgumentData"_lit, *ib);
structuriser.Serialise("ArgumentData"_lit, *ib).Important();
// advance only the EID, since we're still in the same draw
eid++;
@@ -3845,11 +3844,11 @@ void WrappedID3D12GraphicsCommandList::PatchExecuteIndirect(BakedCmdListInfo &in
viewTypeStr = "UnorderedAccess";
fakeChunk->name =
StringFormat::Fmt("[%u] arg%u: IndirectSetRoot%sView()", i, a, viewTypeStr);
StringFormat::Fmt("[%u] arg%u: IndirectSetRoot%sView", i, a, viewTypeStr);
D3D12BufferLocation buf = *addr;
structuriser.Serialise("ArgumentData"_lit, buf);
structuriser.Serialise("ArgumentData"_lit, buf).Important();
// advance only the EID, since we're still in the same draw
eid++;
@@ -4293,9 +4292,9 @@ bool WrappedID3D12GraphicsCommandList::Serialise_ExecuteIndirect(
{
ID3D12GraphicsCommandList *pCommandList = this;
SERIALISE_ELEMENT(pCommandList);
SERIALISE_ELEMENT(pCommandSignature);
SERIALISE_ELEMENT(MaxCommandCount);
SERIALISE_ELEMENT(pArgumentBuffer);
SERIALISE_ELEMENT(pCommandSignature).Important();
SERIALISE_ELEMENT(MaxCommandCount).Important();
SERIALISE_ELEMENT(pArgumentBuffer).Important();
SERIALISE_ELEMENT(ArgumentBufferOffset);
SERIALISE_ELEMENT(pCountBuffer);
SERIALISE_ELEMENT(CountBufferOffset);
@@ -4472,8 +4471,8 @@ bool WrappedID3D12GraphicsCommandList::Serialise_ClearDepthStencilView(
SERIALISE_ELEMENT(DepthStencilView);
}
SERIALISE_ELEMENT(ClearFlags);
SERIALISE_ELEMENT(Depth);
SERIALISE_ELEMENT(Stencil);
SERIALISE_ELEMENT(Depth).Important();
SERIALISE_ELEMENT(Stencil).Important();
SERIALISE_ELEMENT(NumRects);
SERIALISE_ELEMENT_ARRAY(pRects, NumRects);
@@ -4506,7 +4505,6 @@ bool WrappedID3D12GraphicsCommandList::Serialise_ClearDepthStencilView(
D3D12Descriptor *descriptor = GetWrapped(DepthStencilView);
DrawcallDescription draw;
draw.name = StringFormat::Fmt("ClearDepthStencilView(%f, %hhu)", Depth, Stencil);
draw.flags |= DrawFlags::Clear | DrawFlags::ClearDepthStencil;
draw.copyDestination = GetResourceManager()->GetOriginalID(descriptor->GetResResourceId());
draw.copyDestinationSubresource =
@@ -4569,7 +4567,7 @@ bool WrappedID3D12GraphicsCommandList::Serialise_ClearRenderTargetView(
{
SERIALISE_ELEMENT(RenderTargetView);
}
SERIALISE_ELEMENT_ARRAY(ColorRGBA, 4);
SERIALISE_ELEMENT_ARRAY(ColorRGBA, 4).Important();
SERIALISE_ELEMENT(NumRects);
SERIALISE_ELEMENT_ARRAY(pRects, NumRects);
@@ -4598,8 +4596,6 @@ bool WrappedID3D12GraphicsCommandList::Serialise_ClearRenderTargetView(
D3D12Descriptor *descriptor = GetWrapped(RenderTargetView);
DrawcallDescription draw;
draw.name = StringFormat::Fmt("ClearRenderTargetView(%f, %f, %f, %f)", ColorRGBA[0],
ColorRGBA[1], ColorRGBA[2], ColorRGBA[3]);
draw.flags |= DrawFlags::Clear | DrawFlags::ClearColor;
draw.copyDestination = GetResourceManager()->GetOriginalID(descriptor->GetResResourceId());
draw.copyDestinationSubresource =
@@ -4664,7 +4660,7 @@ bool WrappedID3D12GraphicsCommandList::Serialise_ClearUnorderedAccessViewUint(
SERIALISE_ELEMENT(ViewCPUHandle);
}
SERIALISE_ELEMENT(pResource);
SERIALISE_ELEMENT_ARRAY(Values, 4);
SERIALISE_ELEMENT_ARRAY(Values, 4).Important();
SERIALISE_ELEMENT(NumRects);
SERIALISE_ELEMENT_ARRAY(pRects, NumRects);
@@ -4696,8 +4692,6 @@ bool WrappedID3D12GraphicsCommandList::Serialise_ClearUnorderedAccessViewUint(
m_Cmd->AddEvent();
DrawcallDescription draw;
draw.name = StringFormat::Fmt("ClearUnorderedAccessViewUint(%u, %u, %u, %u)", Values[0],
Values[1], Values[2], Values[3]);
draw.flags |= DrawFlags::Clear;
draw.copyDestination = GetResourceManager()->GetOriginalID(GetResID(pResource));
draw.copyDestinationSubresource = Subresource();
@@ -4770,7 +4764,7 @@ bool WrappedID3D12GraphicsCommandList::Serialise_ClearUnorderedAccessViewFloat(
SERIALISE_ELEMENT(ViewCPUHandle);
}
SERIALISE_ELEMENT(pResource);
SERIALISE_ELEMENT_ARRAY(Values, 4);
SERIALISE_ELEMENT_ARRAY(Values, 4).Important();
SERIALISE_ELEMENT(NumRects);
SERIALISE_ELEMENT_ARRAY(pRects, NumRects);
@@ -4802,8 +4796,6 @@ bool WrappedID3D12GraphicsCommandList::Serialise_ClearUnorderedAccessViewFloat(
m_Cmd->AddEvent();
DrawcallDescription draw;
draw.name = StringFormat::Fmt("ClearUnorderedAccessViewFloat(%f, %f, %f, %f)", Values[0],
Values[1], Values[2], Values[3]);
draw.flags |= DrawFlags::Clear;
draw.copyDestination = GetResourceManager()->GetOriginalID(GetResID(pResource));
draw.copyDestinationSubresource = Subresource();
@@ -4860,7 +4852,7 @@ bool WrappedID3D12GraphicsCommandList::Serialise_DiscardResource(SerialiserType
{
ID3D12GraphicsCommandList *pCommandList = this;
SERIALISE_ELEMENT(pCommandList);
SERIALISE_ELEMENT(pResource);
SERIALISE_ELEMENT(pResource).Important();
SERIALISE_ELEMENT_OPT(pRegion);
SERIALISE_CHECK_READ_ERRORS();
@@ -4897,7 +4889,6 @@ bool WrappedID3D12GraphicsCommandList::Serialise_DiscardResource(SerialiserType
draw.flags |= DrawFlags::Clear;
draw.copyDestination = GetResourceManager()->GetOriginalID(GetResID(pResource));
draw.copyDestinationSubresource = Subresource();
draw.name = StringFormat::Fmt("DiscardResource(%s)", ToStr(draw.copyDestination).c_str());
m_Cmd->AddDrawcall(draw);
@@ -4941,9 +4932,9 @@ bool WrappedID3D12GraphicsCommandList::Serialise_CopyBufferRegion(SerialiserType
{
ID3D12GraphicsCommandList *pCommandList = this;
SERIALISE_ELEMENT(pCommandList);
SERIALISE_ELEMENT(pDstBuffer);
SERIALISE_ELEMENT(pDstBuffer).Important();
SERIALISE_ELEMENT(DstOffset);
SERIALISE_ELEMENT(pSrcBuffer);
SERIALISE_ELEMENT(pSrcBuffer).Important();
SERIALISE_ELEMENT(SrcOffset);
SERIALISE_ELEMENT(NumBytes);
@@ -4978,8 +4969,6 @@ bool WrappedID3D12GraphicsCommandList::Serialise_CopyBufferRegion(SerialiserType
draw.copyDestination = GetResourceManager()->GetOriginalID(GetResID(pDstBuffer));
draw.copyDestinationSubresource = Subresource();
draw.name = StringFormat::Fmt("CopyBufferRegion(%s, %s)", ToStr(draw.copyDestination).c_str(),
ToStr(draw.copySource).c_str());
draw.flags |= DrawFlags::Copy;
m_Cmd->AddDrawcall(draw);
@@ -5032,11 +5021,11 @@ bool WrappedID3D12GraphicsCommandList::Serialise_CopyTextureRegion(
{
ID3D12GraphicsCommandList *pCommandList = this;
SERIALISE_ELEMENT(pCommandList);
SERIALISE_ELEMENT_LOCAL(dst, *pDst);
SERIALISE_ELEMENT_LOCAL(dst, *pDst).Important();
SERIALISE_ELEMENT(DstX);
SERIALISE_ELEMENT(DstY);
SERIALISE_ELEMENT(DstZ);
SERIALISE_ELEMENT_LOCAL(src, *pSrc);
SERIALISE_ELEMENT_LOCAL(src, *pSrc).Important();
SERIALISE_ELEMENT_OPT(pSrcBox);
SERIALISE_CHECK_READ_ERRORS();
@@ -5073,8 +5062,6 @@ bool WrappedID3D12GraphicsCommandList::Serialise_CopyTextureRegion(
ResourceId origDst = GetResourceManager()->GetOriginalID(liveDst);
DrawcallDescription draw;
draw.name = StringFormat::Fmt("CopyTextureRegion(%s, %s)", ToStr(origDst).c_str(),
ToStr(origSrc).c_str());
draw.flags |= DrawFlags::Copy;
draw.copySource = origSrc;
@@ -5151,8 +5138,8 @@ bool WrappedID3D12GraphicsCommandList::Serialise_CopyResource(SerialiserType &se
{
ID3D12GraphicsCommandList *pCommandList = this;
SERIALISE_ELEMENT(pCommandList);
SERIALISE_ELEMENT(pDstResource);
SERIALISE_ELEMENT(pSrcResource);
SERIALISE_ELEMENT(pDstResource).Important();
SERIALISE_ELEMENT(pSrcResource).Important();
SERIALISE_CHECK_READ_ERRORS();
@@ -5182,8 +5169,6 @@ bool WrappedID3D12GraphicsCommandList::Serialise_CopyResource(SerialiserType &se
draw.copyDestination = GetResourceManager()->GetOriginalID(GetResID(pDstResource));
draw.copyDestinationSubresource = Subresource();
draw.name = StringFormat::Fmt("CopyResource(%s, %s)", ToStr(draw.copyDestination).c_str(),
ToStr(draw.copySource).c_str());
draw.flags |= DrawFlags::Copy;
m_Cmd->AddDrawcall(draw);
@@ -5234,9 +5219,9 @@ bool WrappedID3D12GraphicsCommandList::Serialise_ResolveSubresource(
{
ID3D12GraphicsCommandList *pCommandList = this;
SERIALISE_ELEMENT(pCommandList);
SERIALISE_ELEMENT(pDstResource);
SERIALISE_ELEMENT(pDstResource).Important();
SERIALISE_ELEMENT(DstSubresource);
SERIALISE_ELEMENT(pSrcResource);
SERIALISE_ELEMENT(pSrcResource).Important();
SERIALISE_ELEMENT(SrcSubresource);
SERIALISE_ELEMENT(Format);
@@ -5277,9 +5262,6 @@ bool WrappedID3D12GraphicsCommandList::Serialise_ResolveSubresource(
Subresource(GetMipForSubresource(pDstResource, DstSubresource),
GetSliceForSubresource(pDstResource, DstSubresource));
draw.name =
StringFormat::Fmt("ResolveSubresource(%s, %s)", ToStr(draw.copyDestination).c_str(),
ToStr(draw.copySource).c_str());
draw.flags |= DrawFlags::Resolve;
m_Cmd->AddDrawcall(draw);
@@ -5336,10 +5318,10 @@ bool WrappedID3D12GraphicsCommandList::Serialise_CopyTiles(
{
ID3D12GraphicsCommandList *pCommandList = this;
SERIALISE_ELEMENT(pCommandList);
SERIALISE_ELEMENT(pTiledResource);
SERIALISE_ELEMENT(pTiledResource).Important();
SERIALISE_ELEMENT_LOCAL(TileRegionStartCoordinate, *pTileRegionStartCoordinate);
SERIALISE_ELEMENT_LOCAL(TileRegionSize, *pTileRegionSize);
SERIALISE_ELEMENT(pBuffer);
SERIALISE_ELEMENT(pBuffer).Important();
SERIALISE_ELEMENT(BufferStartOffsetInBytes);
SERIALISE_ELEMENT(Flags);
@@ -5379,8 +5361,6 @@ bool WrappedID3D12GraphicsCommandList::Serialise_CopyTiles(
ResourceId origDst = GetResourceManager()->GetOriginalID(liveDst);
DrawcallDescription draw;
draw.name = StringFormat::Fmt("CopyTiles(src=%s, dst=%s)", ToStr(origDst).c_str(),
ToStr(origSrc).c_str());
draw.flags |= DrawFlags::Copy;
draw.copySource = origSrc;
@@ -37,11 +37,11 @@ bool WrappedID3D12CommandQueue::Serialise_UpdateTileMappings(
{
ID3D12CommandQueue *pQueue = this;
SERIALISE_ELEMENT(pQueue);
SERIALISE_ELEMENT(pResource);
SERIALISE_ELEMENT(pResource).Important();
SERIALISE_ELEMENT(NumResourceRegions);
SERIALISE_ELEMENT_ARRAY(pResourceRegionStartCoordinates, NumResourceRegions);
SERIALISE_ELEMENT_ARRAY(pResourceRegionSizes, NumResourceRegions);
SERIALISE_ELEMENT(pHeap);
SERIALISE_ELEMENT(pHeap).Important();
SERIALISE_ELEMENT(NumRanges);
SERIALISE_ELEMENT_ARRAY(pRangeFlags, NumRanges);
SERIALISE_ELEMENT_ARRAY(pHeapRangeStartOffsets, NumRanges);
@@ -334,9 +334,9 @@ bool WrappedID3D12CommandQueue::Serialise_CopyTileMappings(
{
ID3D12CommandQueue *pQueue = this;
SERIALISE_ELEMENT(pQueue);
SERIALISE_ELEMENT(pDstResource);
SERIALISE_ELEMENT(pDstResource).Important();
SERIALISE_ELEMENT_LOCAL(DstRegionStartCoordinate, *pDstRegionStartCoordinate);
SERIALISE_ELEMENT(pSrcResource);
SERIALISE_ELEMENT(pSrcResource).Important();
SERIALISE_ELEMENT_LOCAL(SrcRegionStartCoordinate, *pSrcRegionStartCoordinate);
SERIALISE_ELEMENT_LOCAL(RegionSize, *pRegionSize);
SERIALISE_ELEMENT(Flags);
@@ -434,7 +434,7 @@ bool WrappedID3D12CommandQueue::Serialise_ExecuteCommandLists(SerialiserType &se
{
ID3D12CommandQueue *pQueue = this;
SERIALISE_ELEMENT(pQueue);
SERIALISE_ELEMENT(NumCommandLists);
SERIALISE_ELEMENT(NumCommandLists).Important();
SERIALISE_ELEMENT_ARRAY(ppCommandLists, NumCommandLists);
{
@@ -1079,7 +1079,7 @@ bool WrappedID3D12CommandQueue::Serialise_BeginEvent(SerialiserType &ser, UINT M
ID3D12CommandQueue *pQueue = this;
SERIALISE_ELEMENT(pQueue);
SERIALISE_ELEMENT(MarkerText);
SERIALISE_ELEMENT(MarkerText).Important();
SERIALISE_CHECK_READ_ERRORS();
@@ -1134,11 +1134,14 @@ bool WrappedID3D12CommandQueue::Serialise_EndEvent(SerialiserType &ser)
if(IsLoading(m_State))
{
DrawcallDescription draw;
draw.flags |= DrawFlags::PopMarker;
m_Cmd.AddEvent();
m_Cmd.AddDrawcall(draw);
if(m_Cmd.GetDrawcallStack().size() > 1)
m_Cmd.GetDrawcallStack().pop_back();
// Skip - pop marker draws aren't processed otherwise, we just apply them to the drawcall
// stack.
}
}
@@ -1166,8 +1169,8 @@ bool WrappedID3D12CommandQueue::Serialise_Signal(SerialiserType &ser, ID3D12Fenc
{
ID3D12CommandQueue *pQueue = this;
SERIALISE_ELEMENT(pQueue);
SERIALISE_ELEMENT(pFence);
SERIALISE_ELEMENT(Value);
SERIALISE_ELEMENT(pFence).Important();
SERIALISE_ELEMENT(Value).Important();
SERIALISE_CHECK_READ_ERRORS();
@@ -1205,8 +1208,8 @@ bool WrappedID3D12CommandQueue::Serialise_Wait(SerialiserType &ser, ID3D12Fence
{
ID3D12CommandQueue *pQueue = this;
SERIALISE_ELEMENT(pQueue);
SERIALISE_ELEMENT(pFence);
SERIALISE_ELEMENT(Value);
SERIALISE_ELEMENT(pFence).Important();
SERIALISE_ELEMENT(Value).Important();
SERIALISE_CHECK_READ_ERRORS();
+7 -6
View File
@@ -1457,7 +1457,7 @@ bool WrappedID3D12Device::Serialise_WrapSwapchainBuffer(SerialiserType &ser, IDX
SERIALISE_ELEMENT(Buffer);
SERIALISE_ELEMENT_LOCAL(SwapbufferID, GetResID(pRes)).TypedAs("ID3D12Resource *"_lit);
SERIALISE_ELEMENT_LOCAL(BackbufferDescriptor, pRes->GetDesc());
SERIALISE_ELEMENT_LOCAL(BackbufferDescriptor, pRes->GetDesc()).Important();
SERIALISE_CHECK_READ_ERRORS();
@@ -1687,7 +1687,7 @@ bool WrappedID3D12Device::Serialise_MapDataWrite(SerialiserType &ser, ID3D12Reso
UINT Subresource, byte *MappedData,
D3D12_RANGE range)
{
SERIALISE_ELEMENT(Resource);
SERIALISE_ELEMENT(Resource).Important();
SERIALISE_ELEMENT(Subresource);
// tracks if we've already uploaded the data to a persistent buffer and don't need to re-serialise
@@ -1720,7 +1720,7 @@ bool WrappedID3D12Device::Serialise_MapDataWrite(SerialiserType &ser, ID3D12Reso
flags = SerialiserFlags::NoFlags;
}
ser.Serialise("MappedData"_lit, MappedData, range.End - range.Begin, flags);
ser.Serialise("MappedData"_lit, MappedData, range.End - range.Begin, flags).Important();
SERIALISE_ELEMENT(range);
@@ -1826,7 +1826,7 @@ bool WrappedID3D12Device::Serialise_WriteToSubresource(SerialiserType &ser, ID3D
const void *pSrcData, UINT SrcRowPitch,
UINT SrcDepthPitch)
{
SERIALISE_ELEMENT(Resource);
SERIALISE_ELEMENT(Resource).Important();
SERIALISE_ELEMENT(Subresource);
SERIALISE_ELEMENT_OPT(pDstBox);
@@ -1879,7 +1879,7 @@ bool WrappedID3D12Device::Serialise_WriteToSubresource(SerialiserType &ser, ID3D
}
}
SERIALISE_ELEMENT_ARRAY(pSrcData, dataSize);
SERIALISE_ELEMENT_ARRAY(pSrcData, dataSize).Important();
SERIALISE_ELEMENT(dataSize).Hidden();
SERIALISE_ELEMENT(SrcRowPitch);
@@ -2098,7 +2098,8 @@ bool WrappedID3D12Device::Serialise_Present(SerialiserType &ser, ID3D12Resource
UINT SyncInterval, UINT Flags)
{
SERIALISE_ELEMENT_LOCAL(PresentedBackbuffer, GetResID(PresentedImage))
.TypedAs("ID3D12Resource *"_lit);
.TypedAs("ID3D12Resource *"_lit)
.Important();
// we don't do anything with these parameters, they're just here to store
// them for user benefits
+20 -18
View File
@@ -42,7 +42,7 @@ bool WrappedID3D12Device::Serialise_CreateCommandQueue(SerialiserType &ser,
const D3D12_COMMAND_QUEUE_DESC *pDesc,
REFIID riid, void **ppCommandQueue)
{
SERIALISE_ELEMENT_LOCAL(Descriptor, *pDesc).Named("pDesc"_lit);
SERIALISE_ELEMENT_LOCAL(Descriptor, *pDesc).Named("pDesc"_lit).Important();
SERIALISE_ELEMENT_LOCAL(guid, riid).Named("riid"_lit);
SERIALISE_ELEMENT_LOCAL(pCommandQueue,
((WrappedID3D12CommandQueue *)*ppCommandQueue)->GetResourceID())
@@ -169,7 +169,7 @@ bool WrappedID3D12Device::Serialise_CreateCommandAllocator(SerialiserType &ser,
D3D12_COMMAND_LIST_TYPE type,
REFIID riid, void **ppCommandAllocator)
{
SERIALISE_ELEMENT(type);
SERIALISE_ELEMENT(type).Important();
SERIALISE_ELEMENT_LOCAL(guid, riid).Named("riid"_lit);
SERIALISE_ELEMENT_LOCAL(pCommandAllocator,
((WrappedID3D12CommandAllocator *)*ppCommandAllocator)->GetResourceID())
@@ -257,7 +257,7 @@ bool WrappedID3D12Device::Serialise_CreateCommandList(SerialiserType &ser, UINT
REFIID riid, void **ppCommandList)
{
SERIALISE_ELEMENT(nodeMask);
SERIALISE_ELEMENT(type);
SERIALISE_ELEMENT(type).Important();
SERIALISE_ELEMENT(pCommandAllocator);
SERIALISE_ELEMENT(pInitialState);
SERIALISE_ELEMENT_LOCAL(guid, riid).Named("riid"_lit);
@@ -407,7 +407,7 @@ bool WrappedID3D12Device::Serialise_CreateGraphicsPipelineState(
SerialiserType &ser, const D3D12_GRAPHICS_PIPELINE_STATE_DESC *pDesc, REFIID riid,
void **ppPipelineState)
{
SERIALISE_ELEMENT_LOCAL(Descriptor, *pDesc).Named("pDesc"_lit);
SERIALISE_ELEMENT_LOCAL(Descriptor, *pDesc).Named("pDesc"_lit).Important();
SERIALISE_ELEMENT_LOCAL(guid, riid).Named("riid"_lit);
SERIALISE_ELEMENT_LOCAL(pPipelineState,
((WrappedID3D12PipelineState *)*ppPipelineState)->GetResourceID())
@@ -683,7 +683,7 @@ bool WrappedID3D12Device::Serialise_CreateComputePipelineState(
SerialiserType &ser, const D3D12_COMPUTE_PIPELINE_STATE_DESC *pDesc, REFIID riid,
void **ppPipelineState)
{
SERIALISE_ELEMENT_LOCAL(Descriptor, *pDesc).Named("pDesc"_lit);
SERIALISE_ELEMENT_LOCAL(Descriptor, *pDesc).Named("pDesc"_lit).Important();
SERIALISE_ELEMENT_LOCAL(guid, riid).Named("riid"_lit);
SERIALISE_ELEMENT_LOCAL(pPipelineState,
((WrappedID3D12PipelineState *)*ppPipelineState)->GetResourceID())
@@ -836,7 +836,9 @@ bool WrappedID3D12Device::Serialise_CreateDescriptorHeap(
SerialiserType &ser, const D3D12_DESCRIPTOR_HEAP_DESC *pDescriptorHeapDesc, REFIID riid,
void **ppvHeap)
{
SERIALISE_ELEMENT_LOCAL(Descriptor, *pDescriptorHeapDesc).Named("pDescriptorHeapDesc"_lit);
SERIALISE_ELEMENT_LOCAL(Descriptor, *pDescriptorHeapDesc)
.Named("pDescriptorHeapDesc"_lit)
.Important();
SERIALISE_ELEMENT_LOCAL(guid, riid).Named("riid"_lit);
SERIALISE_ELEMENT_LOCAL(pHeap, ((WrappedID3D12DescriptorHeap *)*ppvHeap)->GetResourceID())
.TypedAs("ID3D12DescriptorHeap *"_lit);
@@ -935,7 +937,7 @@ bool WrappedID3D12Device::Serialise_CreateRootSignature(SerialiserType &ser, UIN
void **ppvRootSignature)
{
SERIALISE_ELEMENT(nodeMask);
SERIALISE_ELEMENT_ARRAY(pBlobWithRootSignature, blobLengthInBytes_);
SERIALISE_ELEMENT_ARRAY(pBlobWithRootSignature, blobLengthInBytes_).Important();
SERIALISE_ELEMENT_LOCAL(blobLengthInBytes, uint64_t(blobLengthInBytes_));
SERIALISE_ELEMENT_LOCAL(guid, riid).Named("riid"_lit);
SERIALISE_ELEMENT_LOCAL(pRootSignature,
@@ -1104,8 +1106,8 @@ template <typename SerialiserType>
bool WrappedID3D12Device::Serialise_DynamicDescriptorWrite(SerialiserType &ser,
const DynamicDescriptorWrite *write)
{
SERIALISE_ELEMENT_LOCAL(desc, write->desc);
SERIALISE_ELEMENT_LOCAL(dst, ToPortableHandle(write->dest));
SERIALISE_ELEMENT_LOCAL(desc, write->desc).Important();
SERIALISE_ELEMENT_LOCAL(dst, ToPortableHandle(write->dest)).Important();
SERIALISE_CHECK_READ_ERRORS();
@@ -1374,7 +1376,7 @@ bool WrappedID3D12Device::Serialise_CreateCommittedResource(
{
SERIALISE_ELEMENT_LOCAL(props, *pHeapProperties).Named("pHeapProperties"_lit);
SERIALISE_ELEMENT(HeapFlags);
SERIALISE_ELEMENT_LOCAL(desc, *pDesc).Named("pDesc"_lit);
SERIALISE_ELEMENT_LOCAL(desc, *pDesc).Named("pDesc"_lit).Important();
SERIALISE_ELEMENT(InitialResourceState);
SERIALISE_ELEMENT_OPT(pOptimizedClearValue);
SERIALISE_ELEMENT_LOCAL(guid, riidResource).Named("riidResource"_lit);
@@ -1591,7 +1593,7 @@ template <typename SerialiserType>
bool WrappedID3D12Device::Serialise_CreateHeap(SerialiserType &ser, const D3D12_HEAP_DESC *pDesc,
REFIID riid, void **ppvHeap)
{
SERIALISE_ELEMENT_LOCAL(Descriptor, *pDesc).Named("pDesc"_lit);
SERIALISE_ELEMENT_LOCAL(Descriptor, *pDesc).Named("pDesc"_lit).Important();
SERIALISE_ELEMENT_LOCAL(guid, riid).Named("riid"_lit);
SERIALISE_ELEMENT_LOCAL(pHeap, ((WrappedID3D12Heap *)*ppvHeap)->GetResourceID())
.TypedAs("ID3D12Heap *"_lit);
@@ -1688,9 +1690,9 @@ bool WrappedID3D12Device::Serialise_CreatePlacedResource(
D3D12_RESOURCE_STATES InitialState, const D3D12_CLEAR_VALUE *pOptimizedClearValue, REFIID riid,
void **ppvResource)
{
SERIALISE_ELEMENT(pHeap);
SERIALISE_ELEMENT(pHeap).Important();
SERIALISE_ELEMENT(HeapOffset);
SERIALISE_ELEMENT_LOCAL(Descriptor, *pDesc).Named("pDesc"_lit);
SERIALISE_ELEMENT_LOCAL(Descriptor, *pDesc).Named("pDesc"_lit).Important();
SERIALISE_ELEMENT(InitialState);
SERIALISE_ELEMENT_OPT(pOptimizedClearValue);
SERIALISE_ELEMENT_LOCAL(guid, riid).Named("riid"_lit);
@@ -1892,7 +1894,7 @@ bool WrappedID3D12Device::Serialise_CreateReservedResource(
SerialiserType &ser, const D3D12_RESOURCE_DESC *pDesc, D3D12_RESOURCE_STATES InitialState,
const D3D12_CLEAR_VALUE *pOptimizedClearValue, REFIID riid, void **ppvResource)
{
SERIALISE_ELEMENT_LOCAL(Descriptor, *pDesc).Named("pDesc"_lit);
SERIALISE_ELEMENT_LOCAL(Descriptor, *pDesc).Named("pDesc"_lit).Important();
SERIALISE_ELEMENT(InitialState);
SERIALISE_ELEMENT_OPT(pOptimizedClearValue);
SERIALISE_ELEMENT_LOCAL(guid, riid).Named("riid"_lit);
@@ -2121,7 +2123,7 @@ template <typename SerialiserType>
bool WrappedID3D12Device::Serialise_CreateFence(SerialiserType &ser, UINT64 InitialValue,
D3D12_FENCE_FLAGS Flags, REFIID riid, void **ppFence)
{
SERIALISE_ELEMENT(InitialValue);
SERIALISE_ELEMENT(InitialValue).Important();
SERIALISE_ELEMENT(Flags);
SERIALISE_ELEMENT_LOCAL(guid, riid).Named("riid"_lit);
SERIALISE_ELEMENT_LOCAL(pFence, ((WrappedID3D12Fence *)*ppFence)->GetResourceID())
@@ -2215,7 +2217,7 @@ bool WrappedID3D12Device::Serialise_CreateQueryHeap(SerialiserType &ser,
const D3D12_QUERY_HEAP_DESC *pDesc, REFIID riid,
void **ppvHeap)
{
SERIALISE_ELEMENT_LOCAL(Descriptor, *pDesc).Named("pDesc"_lit);
SERIALISE_ELEMENT_LOCAL(Descriptor, *pDesc).Named("pDesc"_lit).Important();
SERIALISE_ELEMENT_LOCAL(guid, riid).Named("riid"_lit);
SERIALISE_ELEMENT_LOCAL(pQueryHeap, ((WrappedID3D12QueryHeap *)*ppvHeap)->GetResourceID())
.TypedAs("ID3D12QueryHeap *"_lit);
@@ -2293,7 +2295,7 @@ bool WrappedID3D12Device::Serialise_CreateCommandSignature(SerialiserType &ser,
ID3D12RootSignature *pRootSignature,
REFIID riid, void **ppvCommandSignature)
{
SERIALISE_ELEMENT_LOCAL(Descriptor, *pDesc).Named("pDesc"_lit);
SERIALISE_ELEMENT_LOCAL(Descriptor, *pDesc).Named("pDesc"_lit).Important();
SERIALISE_ELEMENT(pRootSignature);
SERIALISE_ELEMENT_LOCAL(guid, riid).Named("riid"_lit);
SERIALISE_ELEMENT_LOCAL(pCommandSignature,
@@ -2639,7 +2641,7 @@ template <typename SerialiserType>
bool WrappedID3D12Device::Serialise_OpenSharedHandle(SerialiserType &ser, HANDLE, REFIID riid,
void **ppvObj)
{
SERIALISE_ELEMENT_LOCAL(ResourceRIID, riid);
SERIALISE_ELEMENT_LOCAL(ResourceRIID, riid).Important();
SERIALISE_CHECK_READ_ERRORS();
@@ -38,7 +38,8 @@ bool WrappedID3D12Device::Serialise_CreatePipelineState(SerialiserType &ser,
REFIID riid, void **ppPipelineState)
{
SERIALISE_ELEMENT_LOCAL(Descriptor, D3D12_EXPANDED_PIPELINE_STATE_STREAM_DESC(*pDesc))
.Named("pDesc"_lit);
.Named("pDesc"_lit)
.Important();
SERIALISE_ELEMENT_LOCAL(guid, riid).Named("riid"_lit);
SERIALISE_ELEMENT_LOCAL(pPipelineState,
((WrappedID3D12PipelineState *)*ppPipelineState)->GetResourceID())
@@ -36,7 +36,7 @@ bool WrappedID3D12Device::Serialise_CreateCommandList1(SerialiserType &ser, UINT
void **ppCommandList)
{
SERIALISE_ELEMENT(nodeMask);
SERIALISE_ELEMENT(type);
SERIALISE_ELEMENT(type).Important();
SERIALISE_ELEMENT(flags);
SERIALISE_ELEMENT_LOCAL(guid, riid).Named("riid"_lit);
SERIALISE_ELEMENT_LOCAL(pCommandList,
@@ -212,7 +212,7 @@ bool WrappedID3D12Device::Serialise_CreateCommittedResource1(
{
SERIALISE_ELEMENT_LOCAL(props, *pHeapProperties).Named("pHeapProperties"_lit);
SERIALISE_ELEMENT(HeapFlags);
SERIALISE_ELEMENT_LOCAL(desc, *pDesc).Named("pDesc"_lit);
SERIALISE_ELEMENT_LOCAL(desc, *pDesc).Named("pDesc"_lit).Important();
SERIALISE_ELEMENT(InitialResourceState);
SERIALISE_ELEMENT_OPT(pOptimizedClearValue);
// placeholder for future use if we properly capture & replay protected sessions
@@ -420,7 +420,7 @@ bool WrappedID3D12Device::Serialise_CreateHeap1(SerialiserType &ser, const D3D12
ID3D12ProtectedResourceSession *pProtectedSession,
REFIID riid, void **ppvHeap)
{
SERIALISE_ELEMENT_LOCAL(Descriptor, *pDesc).Named("pDesc"_lit);
SERIALISE_ELEMENT_LOCAL(Descriptor, *pDesc).Named("pDesc"_lit).Important();
// placeholder for future use if we properly capture & replay protected sessions
SERIALISE_ELEMENT_LOCAL(ProtectedSession, ResourceId()).Named("pProtectedSession"_lit);
SERIALISE_ELEMENT_LOCAL(guid, riid).Named("riid"_lit);
@@ -44,7 +44,7 @@ bool WrappedID3D12Device::Serialise_CreateCommittedResource2(
{
SERIALISE_ELEMENT_LOCAL(props, *pHeapProperties).Named("pHeapProperties"_lit);
SERIALISE_ELEMENT(HeapFlags);
SERIALISE_ELEMENT_LOCAL(desc, *pDesc).Named("pDesc"_lit);
SERIALISE_ELEMENT_LOCAL(desc, *pDesc).Named("pDesc"_lit).Important();
SERIALISE_ELEMENT(InitialResourceState);
SERIALISE_ELEMENT_OPT(pOptimizedClearValue);
// placeholder for future use if we properly capture & replay protected sessions
@@ -262,9 +262,9 @@ bool WrappedID3D12Device::Serialise_CreatePlacedResource1(
D3D12_RESOURCE_STATES InitialState, const D3D12_CLEAR_VALUE *pOptimizedClearValue, REFIID riid,
void **ppvResource)
{
SERIALISE_ELEMENT(pHeap);
SERIALISE_ELEMENT(pHeap).Important();
SERIALISE_ELEMENT(HeapOffset);
SERIALISE_ELEMENT_LOCAL(Descriptor, *pDesc).Named("pDesc"_lit);
SERIALISE_ELEMENT_LOCAL(Descriptor, *pDesc).Named("pDesc"_lit).Important();
SERIALISE_ELEMENT(InitialState);
SERIALISE_ELEMENT_OPT(pOptimizedClearValue);
SERIALISE_ELEMENT_LOCAL(guid, riid).Named("riid"_lit);
@@ -64,7 +64,7 @@ bool WrappedID3D12Device::Serialise_CreateCommandQueue1(SerialiserType &ser,
REFIID CreatorID, REFIID riid,
void **ppCommandQueue)
{
SERIALISE_ELEMENT_LOCAL(Descriptor, *pDesc).Named("pDesc"_lit);
SERIALISE_ELEMENT_LOCAL(Descriptor, *pDesc).Named("pDesc"_lit).Important();
SERIALISE_ELEMENT_LOCAL(creator, CreatorID).Named("CreatorID"_lit);
SERIALISE_ELEMENT_LOCAL(guid, riid).Named("riid"_lit);
SERIALISE_ELEMENT_LOCAL(pCommandQueue,
+6 -5
View File
@@ -521,8 +521,8 @@ void SparseBinds::Apply(WrappedID3D12Device *device, ID3D12Resource *resource)
D3D12_TILE_RANGE_FLAGS rangeFlags = D3D12_TILE_RANGE_FLAG_NULL;
// do a single whole-resource bind of NULL
device->GetQueue()->UpdateTileMappings(Unwrap(resource), 1, NULL, NULL, NULL, 1, &rangeFlags,
NULL, NULL, D3D12_TILE_MAPPING_FLAG_NONE);
device->GetQueue()->UpdateTileMappings(resource, 1, NULL, NULL, NULL, 1, &rangeFlags, NULL,
NULL, D3D12_TILE_MAPPING_FLAG_NONE);
}
else
{
@@ -546,7 +546,7 @@ bool D3D12ResourceManager::Serialise_InitialState(SerialiserType &ser, ResourceI
bool ret = true;
SERIALISE_ELEMENT(id).TypedAs("ID3D12DeviceChild *"_lit);
SERIALISE_ELEMENT(id).TypedAs("ID3D12DeviceChild *"_lit).Important();
SERIALISE_ELEMENT_LOCAL(type, record->type);
if(IsReplayingAndReading())
@@ -565,7 +565,7 @@ bool D3D12ResourceManager::Serialise_InitialState(SerialiserType &ser, ResourceI
ser.SetLazyThreshold(1000);
SERIALISE_ELEMENT_ARRAY(Descriptors, numElems);
SERIALISE_ELEMENT(numElems);
SERIALISE_ELEMENT(numElems).Named("NumDescriptors"_lit).Important();
ser.SetLazyThreshold(0);
@@ -758,7 +758,8 @@ bool D3D12ResourceManager::Serialise_InitialState(SerialiserType &ser, ResourceI
// not using SERIALISE_ELEMENT_ARRAY so we can deliberately avoid allocation - we serialise
// directly into upload memory
ser.Serialise("ResourceContents"_lit, ResourceContents, ContentsLength, SerialiserFlags::NoFlags);
ser.Serialise("ResourceContents"_lit, ResourceContents, ContentsLength, SerialiserFlags::NoFlags)
.Important();
if(mappedBuffer)
mappedBuffer->Unmap(0, NULL);
+63 -53
View File
@@ -272,8 +272,8 @@ void DoSerialise(SerialiserType &ser, DynamicDescriptorCopy &el)
src.heap = rm->GetOriginalID(src.heap);
}
ser.Serialise("dst"_lit, dst);
ser.Serialise("src"_lit, src);
ser.Serialise("dst"_lit, dst).Important();
ser.Serialise("src"_lit, src).Important();
if(ser.IsReading())
{
@@ -303,7 +303,7 @@ void DoSerialise(SerialiserType &ser, D3D12BufferLocation &el)
if(ser.IsStructurising() && rm)
buffer = rm->GetOriginalID(buffer);
ser.Serialise("Buffer"_lit, buffer);
ser.Serialise("Buffer"_lit, buffer).Important();
ser.Serialise("Offset"_lit, offs);
if(ser.IsReading())
@@ -321,6 +321,10 @@ void DoSerialise(SerialiserType &ser, D3D12Descriptor &el)
D3D12DescriptorType type = el.GetType();
ser.Serialise("type"_lit, type);
// SRV/RTV/DSV/UAV will make the resource important, others just display the type
if(type == D3D12DescriptorType::Sampler)
ser.Important();
ID3D12DescriptorHeap *heap = (ID3D12DescriptorHeap *)el.data.samp.heap;
ser.Serialise("heap"_lit, heap);
@@ -349,7 +353,7 @@ void DoSerialise(SerialiserType &ser, D3D12Descriptor &el)
}
case D3D12DescriptorType::CBV:
{
ser.Serialise("Descriptor"_lit, el.data.nonsamp.cbv);
ser.Serialise("Descriptor"_lit, el.data.nonsamp.cbv).Important();
break;
}
case D3D12DescriptorType::SRV:
@@ -359,7 +363,7 @@ void DoSerialise(SerialiserType &ser, D3D12Descriptor &el)
if(ser.IsStructurising())
Resource = rm->GetOriginalID(Resource);
ser.Serialise("Resource"_lit, Resource).TypedAs("ID3D12Resource *"_lit);
ser.Serialise("Resource"_lit, Resource).TypedAs("ID3D12Resource *"_lit).Important();
// convert to Live ID on replay
if(ser.IsReading())
@@ -382,7 +386,7 @@ void DoSerialise(SerialiserType &ser, D3D12Descriptor &el)
if(ser.IsStructurising())
Resource = rm->GetOriginalID(Resource);
ser.Serialise("Resource"_lit, Resource).TypedAs("ID3D12Resource *"_lit);
ser.Serialise("Resource"_lit, Resource).TypedAs("ID3D12Resource *"_lit).Important();
// convert to Live ID on replay
if(ser.IsReading())
@@ -399,7 +403,7 @@ void DoSerialise(SerialiserType &ser, D3D12Descriptor &el)
if(ser.IsStructurising())
Resource = rm->GetOriginalID(Resource);
ser.Serialise("Resource"_lit, Resource).TypedAs("ID3D12Resource *"_lit);
ser.Serialise("Resource"_lit, Resource).TypedAs("ID3D12Resource *"_lit).Important();
// convert to Live ID on replay
if(ser.IsReading())
@@ -420,7 +424,7 @@ void DoSerialise(SerialiserType &ser, D3D12Descriptor &el)
CounterResource = rm->GetOriginalID(CounterResource);
}
ser.Serialise("Resource"_lit, Resource).TypedAs("ID3D12Resource *"_lit);
ser.Serialise("Resource"_lit, Resource).TypedAs("ID3D12Resource *"_lit).Important();
ser.Serialise("CounterResource"_lit, CounterResource).TypedAs("ID3D12Resource *"_lit);
// convert to Live ID on replay
@@ -453,8 +457,8 @@ template <class SerialiserType>
void DoSerialise(SerialiserType &ser, D3D12_EXPANDED_PIPELINE_STATE_STREAM_DESC &el)
{
SERIALISE_MEMBER(pRootSignature);
SERIALISE_MEMBER(VS);
SERIALISE_MEMBER(PS);
SERIALISE_MEMBER(VS).Important();
SERIALISE_MEMBER(PS).Important();
SERIALISE_MEMBER(DS);
SERIALISE_MEMBER(HS);
SERIALISE_MEMBER(GS);
@@ -473,7 +477,7 @@ void DoSerialise(SerialiserType &ser, D3D12_EXPANDED_PIPELINE_STATE_STREAM_DESC
SERIALISE_MEMBER(CachedPSO);
SERIALISE_MEMBER(Flags);
SERIALISE_MEMBER(ViewInstancing);
SERIALISE_MEMBER(CS);
SERIALISE_MEMBER(CS).Important();
if(ser.IsReading())
el.NodeMask = 0;
@@ -499,11 +503,17 @@ void DoSerialise(SerialiserType &ser, D3D12_RESOURCE_DESC &el)
{
SERIALISE_MEMBER(Dimension);
SERIALISE_MEMBER(Alignment);
SERIALISE_MEMBER(Width);
SERIALISE_MEMBER(Width).Important();
SERIALISE_MEMBER(Height);
if(el.Dimension != D3D12_RESOURCE_DIMENSION_BUFFER)
ser.Important();
SERIALISE_MEMBER(DepthOrArraySize);
if(el.Dimension != D3D12_RESOURCE_DIMENSION_BUFFER)
ser.Important();
SERIALISE_MEMBER(MipLevels);
SERIALISE_MEMBER(Format);
if(el.Dimension != D3D12_RESOURCE_DIMENSION_BUFFER)
ser.Important();
SERIALISE_MEMBER(SampleDesc);
SERIALISE_MEMBER(Layout);
SERIALISE_MEMBER(Flags);
@@ -522,11 +532,11 @@ void DoSerialise(SerialiserType &ser, D3D12_RESOURCE_DESC1 &el)
{
SERIALISE_MEMBER(Dimension);
SERIALISE_MEMBER(Alignment);
SERIALISE_MEMBER(Width);
SERIALISE_MEMBER(Height);
SERIALISE_MEMBER(DepthOrArraySize);
SERIALISE_MEMBER(Width).Important();
SERIALISE_MEMBER(Height).Important();
SERIALISE_MEMBER(DepthOrArraySize).Important();
SERIALISE_MEMBER(MipLevels);
SERIALISE_MEMBER(Format);
SERIALISE_MEMBER(Format).Important();
SERIALISE_MEMBER(SampleDesc);
SERIALISE_MEMBER(Layout);
SERIALISE_MEMBER(Flags);
@@ -536,7 +546,7 @@ void DoSerialise(SerialiserType &ser, D3D12_RESOURCE_DESC1 &el)
template <class SerialiserType>
void DoSerialise(SerialiserType &ser, D3D12_COMMAND_QUEUE_DESC &el)
{
SERIALISE_MEMBER(Type);
SERIALISE_MEMBER(Type).Important();
SERIALISE_MEMBER(Priority);
SERIALISE_MEMBER(Flags);
SERIALISE_MEMBER(NodeMask);
@@ -548,7 +558,7 @@ void DoSerialise(SerialiserType &ser, D3D12_COMMAND_QUEUE_DESC &el)
template <class SerialiserType>
void DoSerialise(SerialiserType &ser, D3D12_SHADER_BYTECODE &el)
{
SERIALISE_MEMBER_ARRAY(pShaderBytecode, BytecodeLength);
SERIALISE_MEMBER_ARRAY(pShaderBytecode, BytecodeLength).Important();
// don't serialise size_t, otherwise capture/replay between different bit-ness won't work
{
@@ -671,7 +681,7 @@ void DoSerialise(SerialiserType &ser, D3D12_INPUT_LAYOUT_DESC &el)
template <class SerialiserType>
void DoSerialise(SerialiserType &ser, D3D12_INDIRECT_ARGUMENT_DESC &el)
{
SERIALISE_MEMBER(Type);
SERIALISE_MEMBER(Type).Important();
switch(el.Type)
{
@@ -707,7 +717,7 @@ void DoSerialise(SerialiserType &ser, D3D12_COMMAND_SIGNATURE_DESC &el)
{
SERIALISE_MEMBER(ByteStride);
SERIALISE_MEMBER(NumArgumentDescs);
SERIALISE_MEMBER_ARRAY(pArgumentDescs, NumArgumentDescs);
SERIALISE_MEMBER_ARRAY(pArgumentDescs, NumArgumentDescs).Important();
SERIALISE_MEMBER(NodeMask);
if(ser.IsReading())
@@ -736,8 +746,8 @@ template <class SerialiserType>
void DoSerialise(SerialiserType &ser, D3D12_GRAPHICS_PIPELINE_STATE_DESC &el)
{
SERIALISE_MEMBER(pRootSignature);
SERIALISE_MEMBER(VS);
SERIALISE_MEMBER(PS);
SERIALISE_MEMBER(VS).Important();
SERIALISE_MEMBER(PS).Important();
SERIALISE_MEMBER(DS);
SERIALISE_MEMBER(HS);
SERIALISE_MEMBER(GS);
@@ -778,7 +788,7 @@ template <class SerialiserType>
void DoSerialise(SerialiserType &ser, D3D12_COMPUTE_PIPELINE_STATE_DESC &el)
{
SERIALISE_MEMBER(pRootSignature);
SERIALISE_MEMBER(CS);
SERIALISE_MEMBER(CS).Important();
SERIALISE_MEMBER(NodeMask);
SERIALISE_MEMBER(CachedPSO);
SERIALISE_MEMBER(Flags);
@@ -796,7 +806,7 @@ void Deserialise(const D3D12_COMPUTE_PIPELINE_STATE_DESC &el)
template <class SerialiserType>
void DoSerialise(SerialiserType &ser, D3D12_VERTEX_BUFFER_VIEW &el)
{
SERIALISE_MEMBER_TYPED(D3D12BufferLocation, BufferLocation);
SERIALISE_MEMBER_TYPED(D3D12BufferLocation, BufferLocation).Important();
SERIALISE_MEMBER(SizeInBytes);
SERIALISE_MEMBER(StrideInBytes);
}
@@ -804,7 +814,7 @@ void DoSerialise(SerialiserType &ser, D3D12_VERTEX_BUFFER_VIEW &el)
template <class SerialiserType>
void DoSerialise(SerialiserType &ser, D3D12_INDEX_BUFFER_VIEW &el)
{
SERIALISE_MEMBER_TYPED(D3D12BufferLocation, BufferLocation);
SERIALISE_MEMBER_TYPED(D3D12BufferLocation, BufferLocation).Important();
SERIALISE_MEMBER(SizeInBytes);
SERIALISE_MEMBER(Format);
}
@@ -820,7 +830,7 @@ void DoSerialise(SerialiserType &ser, D3D12_STREAM_OUTPUT_BUFFER_VIEW &el)
template <class SerialiserType>
void DoSerialise(SerialiserType &ser, D3D12_CONSTANT_BUFFER_VIEW_DESC &el)
{
SERIALISE_MEMBER_TYPED(D3D12BufferLocation, BufferLocation);
SERIALISE_MEMBER_TYPED(D3D12BufferLocation, BufferLocation).Important();
SERIALISE_MEMBER(SizeInBytes);
}
@@ -912,7 +922,7 @@ void DoSerialise(SerialiserType &ser, D3D12_TEXCUBE_ARRAY_SRV &el)
template <class SerialiserType>
void DoSerialise(SerialiserType &ser, D3D12_SHADER_RESOURCE_VIEW_DESC &el)
{
SERIALISE_MEMBER(Format);
SERIALISE_MEMBER(Format).Important();
SERIALISE_MEMBER(ViewDimension);
// cast to a special enum so we print nicely
SERIALISE_MEMBER_TYPED(D3D12ComponentMapping, Shader4ComponentMapping);
@@ -996,7 +1006,7 @@ void DoSerialise(SerialiserType &ser, D3D12_TEX3D_RTV &el)
template <class SerialiserType>
void DoSerialise(SerialiserType &ser, D3D12_RENDER_TARGET_VIEW_DESC &el)
{
SERIALISE_MEMBER(Format);
SERIALISE_MEMBER(Format).Important();
SERIALISE_MEMBER(ViewDimension);
switch(el.ViewDimension)
@@ -1059,7 +1069,7 @@ void DoSerialise(SerialiserType &ser, D3D12_TEX2DMS_ARRAY_DSV &el)
template <class SerialiserType>
void DoSerialise(SerialiserType &ser, D3D12_DEPTH_STENCIL_VIEW_DESC &el)
{
SERIALISE_MEMBER(Format);
SERIALISE_MEMBER(Format).Important();
SERIALISE_MEMBER(Flags);
SERIALISE_MEMBER(ViewDimension);
@@ -1129,7 +1139,7 @@ void DoSerialise(SerialiserType &ser, D3D12_TEX3D_UAV &el)
template <class SerialiserType>
void DoSerialise(SerialiserType &ser, D3D12_UNORDERED_ACCESS_VIEW_DESC &el)
{
SERIALISE_MEMBER(Format);
SERIALISE_MEMBER(Format).Important();
SERIALISE_MEMBER(ViewDimension);
switch(el.ViewDimension)
@@ -1150,7 +1160,7 @@ void DoSerialise(SerialiserType &ser, D3D12_UNORDERED_ACCESS_VIEW_DESC &el)
template <class SerialiserType>
void DoSerialise(SerialiserType &ser, D3D12_RESOURCE_TRANSITION_BARRIER &el)
{
SERIALISE_MEMBER(pResource);
SERIALISE_MEMBER(pResource).Important();
// cast to a special enum so we print 'all subresources' nicely
SERIALISE_MEMBER_TYPED(D3D12ResourceBarrierSubresource, Subresource);
SERIALISE_MEMBER(StateBefore);
@@ -1173,12 +1183,12 @@ void DoSerialise(SerialiserType &ser, D3D12_RESOURCE_UAV_BARRIER &el)
template <class SerialiserType>
void DoSerialise(SerialiserType &ser, D3D12_RESOURCE_BARRIER &el)
{
SERIALISE_MEMBER(Type);
SERIALISE_MEMBER(Type).Important();
SERIALISE_MEMBER(Flags);
switch(el.Type)
{
case D3D12_RESOURCE_BARRIER_TYPE_TRANSITION: SERIALISE_MEMBER(Transition); break;
case D3D12_RESOURCE_BARRIER_TYPE_TRANSITION: SERIALISE_MEMBER(Transition).Important(); break;
case D3D12_RESOURCE_BARRIER_TYPE_ALIASING: SERIALISE_MEMBER(Aliasing); break;
case D3D12_RESOURCE_BARRIER_TYPE_UAV: SERIALISE_MEMBER(UAV); break;
}
@@ -1200,7 +1210,7 @@ void DoSerialise(SerialiserType &ser, D3D12_HEAP_PROPERTIES &el)
template <class SerialiserType>
void DoSerialise(SerialiserType &ser, D3D12_HEAP_DESC &el)
{
SERIALISE_MEMBER(SizeInBytes);
SERIALISE_MEMBER(SizeInBytes).Important();
SERIALISE_MEMBER(Properties);
SERIALISE_MEMBER(Alignment);
SERIALISE_MEMBER(Flags);
@@ -1209,8 +1219,8 @@ void DoSerialise(SerialiserType &ser, D3D12_HEAP_DESC &el)
template <class SerialiserType>
void DoSerialise(SerialiserType &ser, D3D12_DESCRIPTOR_HEAP_DESC &el)
{
SERIALISE_MEMBER(Type);
SERIALISE_MEMBER(NumDescriptors);
SERIALISE_MEMBER(Type).Important();
SERIALISE_MEMBER(NumDescriptors).Important();
SERIALISE_MEMBER(Flags);
SERIALISE_MEMBER(NodeMask);
@@ -1221,8 +1231,8 @@ void DoSerialise(SerialiserType &ser, D3D12_DESCRIPTOR_HEAP_DESC &el)
template <class SerialiserType>
void DoSerialise(SerialiserType &ser, D3D12_QUERY_HEAP_DESC &el)
{
SERIALISE_MEMBER(Type);
SERIALISE_MEMBER(Count);
SERIALISE_MEMBER(Type).Important();
SERIALISE_MEMBER(Count).Important();
SERIALISE_MEMBER(NodeMask);
if(ser.IsReading())
@@ -1267,7 +1277,7 @@ void DoSerialise(SerialiserType &ser, D3D12_PLACED_SUBRESOURCE_FOOTPRINT &el)
template <class SerialiserType>
void DoSerialise(SerialiserType &ser, D3D12_TEXTURE_COPY_LOCATION &el)
{
SERIALISE_MEMBER(pResource);
SERIALISE_MEMBER(pResource).Important();
SERIALISE_MEMBER(Type);
switch(el.Type)
@@ -1333,10 +1343,10 @@ void DoSerialise(SerialiserType &ser, D3D12_RANGE &el)
template <class SerialiserType>
void DoSerialise(SerialiserType &ser, D3D12_VIEWPORT &el)
{
SERIALISE_MEMBER(TopLeftX);
SERIALISE_MEMBER(TopLeftY);
SERIALISE_MEMBER(Width);
SERIALISE_MEMBER(Height);
SERIALISE_MEMBER(TopLeftX).Important();
SERIALISE_MEMBER(TopLeftY).Important();
SERIALISE_MEMBER(Width).Important();
SERIALISE_MEMBER(Height).Important();
SERIALISE_MEMBER(MinDepth);
SERIALISE_MEMBER(MaxDepth);
}
@@ -1355,7 +1365,7 @@ void DoSerialise(SerialiserType &ser, D3D12_BOX &el)
template <class SerialiserType>
void DoSerialise(SerialiserType &ser, D3D12_SAMPLER_DESC &el)
{
SERIALISE_MEMBER(Filter);
SERIALISE_MEMBER(Filter).Important();
SERIALISE_MEMBER(AddressU);
SERIALISE_MEMBER(AddressV);
SERIALISE_MEMBER(AddressW);
@@ -1379,7 +1389,7 @@ void DoSerialise(SerialiserType &ser, D3D12_DEPTH_STENCIL_DESC1 &el)
{
SERIALISE_MEMBER(DepthEnable);
SERIALISE_MEMBER(DepthWriteMask);
SERIALISE_MEMBER(DepthFunc);
SERIALISE_MEMBER(DepthFunc).Important();
SERIALISE_MEMBER(StencilEnable);
SERIALISE_MEMBER(StencilReadMask);
SERIALISE_MEMBER(StencilWriteMask);
@@ -1438,7 +1448,7 @@ void DoSerialise(SerialiserType &ser, D3D12_WRITEBUFFERIMMEDIATE_PARAMETER &el)
"Re-capture to fix this.");
SERIALISE_MEMBER(Dest);
}
SERIALISE_MEMBER(Value);
SERIALISE_MEMBER(Value).Important();
}
template <class SerialiserType>
@@ -1537,8 +1547,8 @@ void Deserialise(const D3D12_RENDER_PASS_DEPTH_STENCIL_DESC &el)
template <class SerialiserType>
void DoSerialise(SerialiserType &ser, D3D12_DRAW_ARGUMENTS &el)
{
SERIALISE_MEMBER(VertexCountPerInstance);
SERIALISE_MEMBER(InstanceCount);
SERIALISE_MEMBER(VertexCountPerInstance).Important();
SERIALISE_MEMBER(InstanceCount).Important();
SERIALISE_MEMBER(StartVertexLocation);
SERIALISE_MEMBER(StartInstanceLocation);
}
@@ -1546,8 +1556,8 @@ void DoSerialise(SerialiserType &ser, D3D12_DRAW_ARGUMENTS &el)
template <class SerialiserType>
void DoSerialise(SerialiserType &ser, D3D12_DRAW_INDEXED_ARGUMENTS &el)
{
SERIALISE_MEMBER(IndexCountPerInstance);
SERIALISE_MEMBER(InstanceCount);
SERIALISE_MEMBER(IndexCountPerInstance).Important();
SERIALISE_MEMBER(InstanceCount).Important();
SERIALISE_MEMBER(StartIndexLocation);
SERIALISE_MEMBER(BaseVertexLocation);
SERIALISE_MEMBER(StartInstanceLocation);
@@ -1556,9 +1566,9 @@ void DoSerialise(SerialiserType &ser, D3D12_DRAW_INDEXED_ARGUMENTS &el)
template <class SerialiserType>
void DoSerialise(SerialiserType &ser, D3D12_DISPATCH_ARGUMENTS &el)
{
SERIALISE_MEMBER(ThreadGroupCountX);
SERIALISE_MEMBER(ThreadGroupCountY);
SERIALISE_MEMBER(ThreadGroupCountZ);
SERIALISE_MEMBER(ThreadGroupCountX).Important();
SERIALISE_MEMBER(ThreadGroupCountY).Important();
SERIALISE_MEMBER(ThreadGroupCountZ).Important();
}
INSTANTIATE_SERIALISE_TYPE(D3D12RootSignature);