mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-11-10 07:53:38 +00:00
Rename 'name' member of ActionDescription to 'customName'
* This is a deliberate break of compatibility since the field is now often empty, for non-markers. This means code will get a more explicit error when the name is being referenced, so it can be updated to fetch the name it needs as needed.
This commit is contained in:
36 files changed
+373
-275
No files matched your search
@@ -30,6 +30,7 @@
|
||||
#include "replay_enums.h"
|
||||
#include "resourceid.h"
|
||||
#include "stringise.h"
|
||||
#include "structured_data.h"
|
||||
|
||||
DOCUMENT("A floating point four-component vector");
|
||||
struct FloatVector
|
||||
@@ -1569,6 +1570,35 @@ processing them wherever possible.
|
||||
return events.size() == 1 && events[0].chunkIndex == APIEvent::NoChunk;
|
||||
}
|
||||
|
||||
DOCUMENT(R"(Returns the name for this action, either from its custom name (see :data:`customName`)
|
||||
or from the matching chunk in the structured data passed in.
|
||||
|
||||
:param SDFile structuredFile: The structured data file for the capture this action is from.
|
||||
:return: Returns the best available name for this action.
|
||||
:rtype: str
|
||||
)");
|
||||
rdcstr GetName(const SDFile &structuredFile) const
|
||||
{
|
||||
if(!customName.empty())
|
||||
return customName;
|
||||
|
||||
// if we have events, the last one is the one for this action. Return the corresponding chunk
|
||||
// name
|
||||
if(events.size() >= 1)
|
||||
{
|
||||
const uint32_t chunkIndex = events.back().chunkIndex;
|
||||
|
||||
if(chunkIndex < structuredFile.chunks.size())
|
||||
{
|
||||
rdcstr ret = structuredFile.chunks[chunkIndex]->name;
|
||||
ret += "()";
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
|
||||
return rdcstr();
|
||||
}
|
||||
|
||||
DOCUMENT("");
|
||||
bool operator==(const ActionDescription &o) const { return eventId == o.eventId; }
|
||||
bool operator<(const ActionDescription &o) const { return eventId < o.eventId; }
|
||||
@@ -1577,14 +1607,16 @@ processing them wherever possible.
|
||||
DOCUMENT("A 1-based index of this action relative to other actions.");
|
||||
uint32_t actionId = 0;
|
||||
|
||||
DOCUMENT(R"(The name of this action. Typically a summarised/concise list of parameters.
|
||||
DOCUMENT(R"(The custom name of this action.
|
||||
|
||||
.. note:: For markers this will be a user-provided string. In most other cases this name will be
|
||||
empty, and the name can be generated using structured data. Some actions will have a custom
|
||||
name generated for e.g. reading back and directly displaying indirect parameters or render pass
|
||||
parameters.
|
||||
For markers this will be a user-provided string. In most other cases this will be empty, and the
|
||||
name can be generated using structured data. The last listed event in :data:`events` will correspond
|
||||
to the event for the overall action, and its chunk will contain a name and any parameters.
|
||||
|
||||
Some actions will have a custom name generated for e.g. reading back and directly displaying
|
||||
indirect parameters or render pass parameters.
|
||||
)");
|
||||
rdcstr name;
|
||||
rdcstr customName;
|
||||
|
||||
DOCUMENT("A set of :class:`ActionFlags` properties describing what kind of action this is.");
|
||||
ActionFlags flags = ActionFlags::NoFlags;
|
||||
|
||||
@@ -50,12 +50,12 @@ public:
|
||||
ActionDescription &action = m_FrameRecord.actionList[0];
|
||||
action.actionId = 1;
|
||||
action.eventId = 1;
|
||||
action.name = get_basename(filename);
|
||||
action.customName = get_basename(filename);
|
||||
APIEvent ev;
|
||||
ev.eventId = 1;
|
||||
action.events.push_back(ev);
|
||||
|
||||
SDChunk *chunk = new SDChunk(action.name);
|
||||
SDChunk *chunk = new SDChunk(action.customName);
|
||||
chunk->AddAndOwnChild(makeSDString("path"_lit, filename));
|
||||
|
||||
m_File.chunks.push_back(chunk);
|
||||
|
||||
@@ -568,7 +568,7 @@ bool WrappedID3D11DeviceContext::Serialise_Present(SerialiserType &ser, UINT Syn
|
||||
|
||||
action.copyDestination = m_pDevice->GetBackbufferResourceID();
|
||||
|
||||
action.name = StringFormat::Fmt("Present(%s)", ToStr(action.copyDestination).c_str());
|
||||
action.customName = StringFormat::Fmt("Present(%s)", ToStr(action.copyDestination).c_str());
|
||||
action.flags |= ActionFlags::Present;
|
||||
|
||||
AddAction(action);
|
||||
@@ -945,7 +945,7 @@ bool WrappedID3D11DeviceContext::ProcessChunk(ReadSerialiser &ser, D3D11Chunk ch
|
||||
AddEvent();
|
||||
|
||||
ActionDescription action;
|
||||
action.name = "End of Capture";
|
||||
action.customName = "End of Capture";
|
||||
action.flags |= ActionFlags::Present;
|
||||
|
||||
action.copyDestination = m_pDevice->GetBackbufferResourceID();
|
||||
|
||||
@@ -1740,7 +1740,6 @@ bool WrappedID3D11DeviceContext::Serialise_DiscardResource(SerialiserType &ser,
|
||||
|
||||
ActionDescription action;
|
||||
|
||||
action.name = StringFormat::Fmt("DiscardResource(%s)", ToStr(dstOrigID).c_str());
|
||||
action.flags |= ActionFlags::Clear;
|
||||
action.copyDestination = dstOrigID;
|
||||
action.copyDestinationSubresource = Subresource();
|
||||
@@ -1839,8 +1838,6 @@ bool WrappedID3D11DeviceContext::Serialise_DiscardView(SerialiserType &ser, ID3D
|
||||
EventUsage(m_CurEventID, ResourceUsage::Discard, GetIDForDeviceChild(pResourceView)));
|
||||
}
|
||||
|
||||
action.name = StringFormat::Fmt("DiscardView(%s)", ToStr(action.copyDestination).c_str());
|
||||
|
||||
AddAction(action);
|
||||
}
|
||||
}
|
||||
@@ -1976,8 +1973,6 @@ bool WrappedID3D11DeviceContext::Serialise_DiscardView1(SerialiserType &ser,
|
||||
EventUsage(m_CurEventID, ResourceUsage::Discard, GetIDForDeviceChild(pResourceView)));
|
||||
}
|
||||
|
||||
action.name = StringFormat::Fmt("DiscardView1(%s)", ToStr(action.copyDestination).c_str());
|
||||
|
||||
AddAction(action);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -56,7 +56,7 @@ bool WrappedID3D11DeviceContext::Serialise_SetMarker(SerialiserType &ser, uint32
|
||||
if(IsLoading(m_State))
|
||||
{
|
||||
ActionDescription action;
|
||||
action.name = MarkerName;
|
||||
action.customName = MarkerName;
|
||||
action.flags |= ActionFlags::SetMarker;
|
||||
|
||||
byte alpha = (Color >> 24) & 0xff;
|
||||
@@ -94,7 +94,7 @@ bool WrappedID3D11DeviceContext::Serialise_PushMarker(SerialiserType &ser, uint3
|
||||
if(IsLoading(m_State))
|
||||
{
|
||||
ActionDescription action;
|
||||
action.name = MarkerName;
|
||||
action.customName = MarkerName;
|
||||
action.flags |= ActionFlags::PushMarker;
|
||||
|
||||
byte alpha = (Color >> 24) & 0xff;
|
||||
@@ -4139,7 +4139,7 @@ bool WrappedID3D11DeviceContext::Serialise_DrawAuto(SerialiserType &ser)
|
||||
AddEvent();
|
||||
|
||||
ActionDescription action;
|
||||
action.name = StringFormat::Fmt("DrawAuto(<%u>)", numVerts);
|
||||
action.customName = StringFormat::Fmt("DrawAuto(<%u>)", numVerts);
|
||||
action.flags |= ActionFlags::Drawcall | ActionFlags::Auto;
|
||||
action.numIndices = (uint32_t)numVerts;
|
||||
action.vertexOffset = 0;
|
||||
@@ -4268,7 +4268,7 @@ bool WrappedID3D11DeviceContext::Serialise_DrawIndexedInstancedIndirect(Serialis
|
||||
EventUsage(m_CurEventID, ResourceUsage::Indirect));
|
||||
}
|
||||
|
||||
action.name = name;
|
||||
action.customName = name;
|
||||
|
||||
action.flags |= ActionFlags::Drawcall | ActionFlags::Instanced | ActionFlags::Indexed |
|
||||
ActionFlags::Indirect;
|
||||
@@ -4397,7 +4397,7 @@ bool WrappedID3D11DeviceContext::Serialise_DrawInstancedIndirect(SerialiserType
|
||||
EventUsage(m_CurEventID, ResourceUsage::Indirect));
|
||||
}
|
||||
|
||||
action.name = name;
|
||||
action.customName = name;
|
||||
|
||||
action.flags |= ActionFlags::Drawcall | ActionFlags::Instanced | ActionFlags::Indirect;
|
||||
|
||||
@@ -5102,7 +5102,7 @@ bool WrappedID3D11DeviceContext::Serialise_DispatchIndirect(SerialiserType &ser,
|
||||
EventUsage(m_CurEventID, ResourceUsage::Indirect));
|
||||
}
|
||||
|
||||
action.name = name;
|
||||
action.customName = name;
|
||||
action.flags |= ActionFlags::Dispatch | ActionFlags::Indirect;
|
||||
|
||||
AddAction(action);
|
||||
@@ -6397,9 +6397,6 @@ bool WrappedID3D11DeviceContext::Serialise_GenerateMips(SerialiserType &ser,
|
||||
AddEvent();
|
||||
|
||||
ActionDescription action;
|
||||
action.name =
|
||||
"GenerateMips(" +
|
||||
ToStr(GetResourceManager()->GetOriginalID(GetIDForDeviceChild(pShaderResourceView))) + ")";
|
||||
action.flags |= ActionFlags::GenMips;
|
||||
|
||||
AddAction(action);
|
||||
|
||||
@@ -2003,8 +2003,7 @@ rdcarray<PixelModification> D3D11Replay::PixelHistory(rdcarray<EventUsage> event
|
||||
if(action->flags & ActionFlags::Clear)
|
||||
continue;
|
||||
|
||||
D3D11MarkerRegion historyData(StringFormat::Fmt("Fetching history data for %u: %s",
|
||||
action->eventId, action->name.c_str()));
|
||||
D3D11MarkerRegion historyData(StringFormat::Fmt("Fetching history data for %u", action->eventId));
|
||||
|
||||
if(prev != history[h].eventId)
|
||||
{
|
||||
|
||||
@@ -89,9 +89,6 @@ bool WrappedID3D12GraphicsCommandList::Serialise_AtomicCopyBufferUINT(
|
||||
action.copySource = GetResourceManager()->GetOriginalID(GetResID(pSrcBuffer));
|
||||
action.copyDestination = GetResourceManager()->GetOriginalID(GetResID(pDstBuffer));
|
||||
|
||||
action.name =
|
||||
StringFormat::Fmt("AtomicCopyBufferUINT(%s, %s)", ToStr(action.copyDestination).c_str(),
|
||||
ToStr(action.copySource).c_str());
|
||||
action.flags |= ActionFlags::Copy;
|
||||
|
||||
m_Cmd->AddAction(action);
|
||||
@@ -207,9 +204,6 @@ bool WrappedID3D12GraphicsCommandList::Serialise_AtomicCopyBufferUINT64(
|
||||
action.copySource = GetResourceManager()->GetOriginalID(GetResID(pSrcBuffer));
|
||||
action.copyDestination = GetResourceManager()->GetOriginalID(GetResID(pDstBuffer));
|
||||
|
||||
action.name = StringFormat::Fmt("AtomicCopyBufferUINT64(%s, %s)",
|
||||
ToStr(action.copyDestination).c_str(),
|
||||
ToStr(action.copySource).c_str());
|
||||
action.flags |= ActionFlags::Copy;
|
||||
|
||||
m_Cmd->AddAction(action);
|
||||
@@ -485,9 +479,6 @@ bool WrappedID3D12GraphicsCommandList::Serialise_ResolveSubresourceRegion(
|
||||
action.copySource = GetResourceManager()->GetOriginalID(GetResID(pSrcResource));
|
||||
action.copyDestination = GetResourceManager()->GetOriginalID(GetResID(pDstResource));
|
||||
|
||||
action.name = StringFormat::Fmt("ResolveSubresourceRegion(%s, %s)",
|
||||
ToStr(action.copyDestination).c_str(),
|
||||
ToStr(action.copySource).c_str());
|
||||
action.flags |= ActionFlags::Resolve;
|
||||
|
||||
m_Cmd->AddAction(action);
|
||||
|
||||
@@ -358,7 +358,7 @@ bool WrappedID3D12GraphicsCommandList::Serialise_BeginRenderPass(
|
||||
m_Cmd->AddEvent();
|
||||
|
||||
ActionDescription action;
|
||||
action.name = StringFormat::Fmt(
|
||||
action.customName = StringFormat::Fmt(
|
||||
"BeginRenderPass(%s)",
|
||||
MakeRenderPassOpString(false, NumRenderTargets, pRenderTargets, pDepthStencil, Flags).c_str());
|
||||
action.flags |= ActionFlags::BeginPass | ActionFlags::PassBoundary;
|
||||
@@ -512,7 +512,7 @@ bool WrappedID3D12GraphicsCommandList::Serialise_EndRenderPass(SerialiserType &s
|
||||
D3D12RenderState &state = m_Cmd->m_BakedCmdListInfo[m_Cmd->m_LastCmdListID].state;
|
||||
|
||||
ActionDescription action;
|
||||
action.name = StringFormat::Fmt(
|
||||
action.customName = StringFormat::Fmt(
|
||||
"EndRenderPass(%s)",
|
||||
MakeRenderPassOpString(true, (UINT)state.rpRTs.size(), state.rpRTs.data(),
|
||||
state.rpDSV.cpuDescriptor.ptr ? &state.rpDSV : NULL, state.rpFlags)
|
||||
|
||||
@@ -2975,7 +2975,7 @@ bool WrappedID3D12GraphicsCommandList::Serialise_SetMarker(SerialiserType &ser,
|
||||
D3D12MarkerRegion::Set(GetWrappedCrackedList(), MarkerText);
|
||||
|
||||
ActionDescription action;
|
||||
action.name = MarkerText;
|
||||
action.customName = MarkerText;
|
||||
action.flags |= ActionFlags::SetMarker;
|
||||
|
||||
m_Cmd->AddEvent();
|
||||
@@ -3040,7 +3040,7 @@ bool WrappedID3D12GraphicsCommandList::Serialise_BeginEvent(SerialiserType &ser,
|
||||
D3D12MarkerRegion::Begin(GetWrappedCrackedList(), MarkerText);
|
||||
|
||||
ActionDescription action;
|
||||
action.name = MarkerText;
|
||||
action.customName = MarkerText;
|
||||
action.flags |= ActionFlags::PushMarker;
|
||||
|
||||
m_Cmd->AddEvent();
|
||||
@@ -3509,7 +3509,6 @@ void WrappedID3D12GraphicsCommandList::ReserveExecuteIndirect(ID3D12GraphicsComm
|
||||
{
|
||||
m_Cmd->AddEvent();
|
||||
ActionDescription action;
|
||||
action.name = "ID3D12GraphicsCommandList::ExecuteIndirect()";
|
||||
action.flags = ActionFlags::PopMarker;
|
||||
m_Cmd->AddAction(action);
|
||||
}
|
||||
@@ -3563,7 +3562,7 @@ void WrappedID3D12GraphicsCommandList::PatchExecuteIndirect(BakedCmdListInfo &in
|
||||
RDCASSERTMSG("Couldn't find base event action!", idx < actions.size(), idx, actions.size());
|
||||
|
||||
// patch the name for the base action
|
||||
actions[idx].action.name =
|
||||
actions[idx].action.customName =
|
||||
StringFormat::Fmt("ExecuteIndirect(maxCount %u, count <%u>)", exec.maxCount, count);
|
||||
// if there's only one command running, remove its pushmarker flag
|
||||
if(!multiaction)
|
||||
@@ -3576,15 +3575,16 @@ void WrappedID3D12GraphicsCommandList::PatchExecuteIndirect(BakedCmdListInfo &in
|
||||
|
||||
D3D12RenderState state;
|
||||
|
||||
SDChunk *baseChunk = NULL;
|
||||
|
||||
if(count > 0)
|
||||
{
|
||||
RDCASSERT(actions[idx].state);
|
||||
|
||||
state = *actions[idx].state;
|
||||
baseChunk = m_Cmd->m_StructuredFile->chunks[actions[idx].action.events[0].chunkIndex];
|
||||
}
|
||||
|
||||
SDChunk *baseChunk = m_Cmd->m_StructuredFile->chunks[actions[idx].action.events[0].chunkIndex];
|
||||
|
||||
for(uint32_t i = 0; i < count; i++)
|
||||
{
|
||||
byte *data = mapPtr + exec.argOffs;
|
||||
@@ -3640,10 +3640,10 @@ void WrappedID3D12GraphicsCommandList::PatchExecuteIndirect(BakedCmdListInfo &in
|
||||
curAction.vertexOffset = args->StartVertexLocation;
|
||||
curAction.instanceOffset = args->StartInstanceLocation;
|
||||
curAction.flags |= ActionFlags::Drawcall | ActionFlags::Instanced | ActionFlags::Indirect;
|
||||
curAction.name = StringFormat::Fmt("[%u] arg%u: IndirectDraw(<%u, %u>)", i, a,
|
||||
curAction.numIndices, curAction.numInstances);
|
||||
curAction.customName = StringFormat::Fmt("[%u] arg%u: IndirectDraw(<%u, %u>)", i, a,
|
||||
curAction.numIndices, curAction.numInstances);
|
||||
|
||||
fakeChunk->name = curAction.name;
|
||||
fakeChunk->name = curAction.customName;
|
||||
|
||||
structuriser.Serialise("ArgumentData"_lit, *args).Important();
|
||||
|
||||
@@ -3673,10 +3673,10 @@ void WrappedID3D12GraphicsCommandList::PatchExecuteIndirect(BakedCmdListInfo &in
|
||||
curAction.instanceOffset = args->StartInstanceLocation;
|
||||
curAction.flags |= ActionFlags::Drawcall | ActionFlags::Instanced |
|
||||
ActionFlags::Indexed | ActionFlags::Indirect;
|
||||
curAction.name = StringFormat::Fmt("[%u] arg%u: IndirectDrawIndexed(<%u, %u>)", i, a,
|
||||
curAction.numIndices, curAction.numInstances);
|
||||
curAction.customName = StringFormat::Fmt("[%u] arg%u: IndirectDrawIndexed(<%u, %u>)", i,
|
||||
a, curAction.numIndices, curAction.numInstances);
|
||||
|
||||
fakeChunk->name = curAction.name;
|
||||
fakeChunk->name = curAction.customName;
|
||||
|
||||
structuriser.Serialise("ArgumentData"_lit, *args).Important();
|
||||
|
||||
@@ -3702,11 +3702,11 @@ void WrappedID3D12GraphicsCommandList::PatchExecuteIndirect(BakedCmdListInfo &in
|
||||
curAction.dispatchDimension[1] = args->ThreadGroupCountY;
|
||||
curAction.dispatchDimension[2] = args->ThreadGroupCountZ;
|
||||
curAction.flags |= ActionFlags::Dispatch | ActionFlags::Indirect;
|
||||
curAction.name = StringFormat::Fmt(
|
||||
curAction.customName = StringFormat::Fmt(
|
||||
"[%u] arg%u: IndirectDispatch(<%u, %u, %u>)", i, a, curAction.dispatchDimension[0],
|
||||
curAction.dispatchDimension[1], curAction.dispatchDimension[2]);
|
||||
|
||||
fakeChunk->name = curAction.name;
|
||||
fakeChunk->name = curAction.customName;
|
||||
|
||||
structuriser.Serialise("ArgumentData"_lit, *args).Important();
|
||||
|
||||
@@ -4321,7 +4321,7 @@ bool WrappedID3D12GraphicsCommandList::Serialise_ExecuteIndirect(
|
||||
m_Cmd->AddEvent();
|
||||
|
||||
ActionDescription action;
|
||||
action.name = "ExecuteIndirect";
|
||||
action.customName = "ExecuteIndirect";
|
||||
|
||||
action.flags |= ActionFlags::MultiAction;
|
||||
|
||||
|
||||
@@ -537,7 +537,7 @@ bool WrappedID3D12CommandQueue::Serialise_ExecuteCommandLists(SerialiserType &se
|
||||
// add a fake marker
|
||||
ActionDescription action;
|
||||
{
|
||||
action.name =
|
||||
action.customName =
|
||||
StringFormat::Fmt("=> %s[%u]: Reset(%s)", basename.c_str(), c, ToStr(cmd).c_str());
|
||||
action.flags = ActionFlags::CommandBufferBoundary | ActionFlags::PassBoundary |
|
||||
ActionFlags::BeginPass;
|
||||
@@ -587,7 +587,7 @@ bool WrappedID3D12CommandQueue::Serialise_ExecuteCommandLists(SerialiserType &se
|
||||
m_Cmd.m_RootActionID += cmdListInfo.actionCount;
|
||||
|
||||
{
|
||||
action.name =
|
||||
action.customName =
|
||||
StringFormat::Fmt("=> %s[%u]: Close(%s)", basename.c_str(), c, ToStr(cmd).c_str());
|
||||
action.flags =
|
||||
ActionFlags::CommandBufferBoundary | ActionFlags::PassBoundary | ActionFlags::EndPass;
|
||||
@@ -1041,7 +1041,7 @@ bool WrappedID3D12CommandQueue::Serialise_SetMarker(SerialiserType &ser, UINT Me
|
||||
if(IsLoading(m_State))
|
||||
{
|
||||
ActionDescription action;
|
||||
action.name = MarkerText;
|
||||
action.customName = MarkerText;
|
||||
action.flags |= ActionFlags::SetMarker;
|
||||
|
||||
m_Cmd.AddEvent();
|
||||
@@ -1090,7 +1090,7 @@ bool WrappedID3D12CommandQueue::Serialise_BeginEvent(SerialiserType &ser, UINT M
|
||||
if(IsLoading(m_State))
|
||||
{
|
||||
ActionDescription action;
|
||||
action.name = MarkerText;
|
||||
action.customName = MarkerText;
|
||||
action.flags |= ActionFlags::PushMarker;
|
||||
|
||||
m_Cmd.AddEvent();
|
||||
|
||||
@@ -867,7 +867,7 @@ bool WrappedID3D12CommandQueue::ProcessChunk(ReadSerialiser &ser, D3D12Chunk chu
|
||||
m_Cmd.AddEvent();
|
||||
|
||||
ActionDescription action;
|
||||
action.name = "End of Capture";
|
||||
action.customName = "End of Capture";
|
||||
action.flags |= ActionFlags::Present;
|
||||
|
||||
action.copyDestination = m_Cmd.m_LastPresentedImage;
|
||||
|
||||
@@ -2115,7 +2115,7 @@ bool WrappedID3D12Device::Serialise_Present(SerialiserType &ser, ID3D12Resource
|
||||
|
||||
ActionDescription action;
|
||||
|
||||
action.name = StringFormat::Fmt("Present(%s)", ToStr(PresentedBackbuffer).c_str());
|
||||
action.customName = StringFormat::Fmt("Present(%s)", ToStr(PresentedBackbuffer).c_str());
|
||||
action.flags |= ActionFlags::Present;
|
||||
|
||||
cmd.m_LastPresentedImage = PresentedBackbuffer;
|
||||
|
||||
@@ -2671,8 +2671,8 @@ bool WrappedOpenGL::Serialise_Present(SerialiserType &ser)
|
||||
action.copyDestination = GetResourceManager()->GetOriginalID(
|
||||
GetResourceManager()->GetResID(TextureRes(GetCtx(), col)));
|
||||
|
||||
action.name = StringFormat::Fmt("%s(%s)", ToStr(gl_CurChunk).c_str(),
|
||||
ToStr(action.copyDestination).c_str());
|
||||
action.customName = StringFormat::Fmt("%s(%s)", ToStr(gl_CurChunk).c_str(),
|
||||
ToStr(action.copyDestination).c_str());
|
||||
action.flags |= ActionFlags::Present;
|
||||
|
||||
AddAction(action);
|
||||
@@ -3478,7 +3478,7 @@ bool WrappedOpenGL::ProcessChunk(ReadSerialiser &ser, GLChunk chunk)
|
||||
AddEvent();
|
||||
|
||||
ActionDescription action;
|
||||
action.name = "End of Capture";
|
||||
action.customName = "End of Capture";
|
||||
action.flags |= ActionFlags::Present;
|
||||
|
||||
GLuint col = 0;
|
||||
|
||||
@@ -281,7 +281,7 @@ bool WrappedOpenGL::Serialise_glDebugMessageInsert(SerialiserType &ser, GLenum s
|
||||
if(IsLoading(m_State))
|
||||
{
|
||||
ActionDescription action;
|
||||
action.name = name;
|
||||
action.customName = name;
|
||||
action.flags |= ActionFlags::SetMarker;
|
||||
|
||||
AddEvent();
|
||||
@@ -382,7 +382,7 @@ bool WrappedOpenGL::Serialise_glInsertEventMarkerEXT(SerialiserType &ser, GLsize
|
||||
if(IsLoading(m_State))
|
||||
{
|
||||
ActionDescription action;
|
||||
action.name = marker;
|
||||
action.customName = marker;
|
||||
action.flags |= ActionFlags::SetMarker;
|
||||
|
||||
AddEvent();
|
||||
@@ -453,7 +453,7 @@ bool WrappedOpenGL::Serialise_glPushDebugGroup(SerialiserType &ser, GLenum sourc
|
||||
if(IsLoading(m_State))
|
||||
{
|
||||
ActionDescription action;
|
||||
action.name = message;
|
||||
action.customName = message;
|
||||
action.flags |= ActionFlags::PushMarker;
|
||||
|
||||
AddEvent();
|
||||
@@ -498,7 +498,6 @@ bool WrappedOpenGL::Serialise_glPopDebugGroup(SerialiserType &ser)
|
||||
if(IsLoading(m_State))
|
||||
{
|
||||
ActionDescription action;
|
||||
action.name = ToStr(gl_CurChunk) + "()";
|
||||
action.flags |= ActionFlags::PopMarker;
|
||||
|
||||
AddEvent();
|
||||
|
||||
@@ -502,8 +502,8 @@ bool WrappedOpenGL::Serialise_glDispatchComputeIndirect(SerialiserType &ser, GLi
|
||||
AddEvent();
|
||||
|
||||
ActionDescription action;
|
||||
action.name = StringFormat::Fmt("%s(<%u, %u, %u>)", ToStr(gl_CurChunk).c_str(), groupSizes[0],
|
||||
groupSizes[1], groupSizes[2]);
|
||||
action.customName = StringFormat::Fmt("%s(<%u, %u, %u>)", ToStr(gl_CurChunk).c_str(),
|
||||
groupSizes[0], groupSizes[1], groupSizes[2]);
|
||||
action.flags |= ActionFlags::Dispatch | ActionFlags::Indirect;
|
||||
|
||||
action.dispatchDimension[0] = groupSizes[0];
|
||||
@@ -673,7 +673,7 @@ bool WrappedOpenGL::Serialise_glDrawTransformFeedback(SerialiserType &ser, GLenu
|
||||
GLNOTIMP("Not fetching feedback object count for glDrawTransformFeedback() display");
|
||||
|
||||
ActionDescription action;
|
||||
action.name = ToStr(gl_CurChunk) + "(<?>)";
|
||||
action.customName = ToStr(gl_CurChunk) + "(<?>)";
|
||||
action.numIndices = 1;
|
||||
action.numInstances = 1;
|
||||
action.indexOffset = 0;
|
||||
@@ -745,7 +745,7 @@ bool WrappedOpenGL::Serialise_glDrawTransformFeedbackInstanced(SerialiserType &s
|
||||
GLNOTIMP("Not fetching feedback object count for glDrawTransformFeedbackInstanced() display");
|
||||
|
||||
ActionDescription action;
|
||||
action.name = StringFormat::Fmt("%s(<?, %u>)", ToStr(gl_CurChunk).c_str(), instancecount);
|
||||
action.customName = StringFormat::Fmt("%s(<?, %u>)", ToStr(gl_CurChunk).c_str(), instancecount);
|
||||
action.numIndices = 1;
|
||||
action.numInstances = 1;
|
||||
action.indexOffset = 0;
|
||||
@@ -816,7 +816,7 @@ bool WrappedOpenGL::Serialise_glDrawTransformFeedbackStream(SerialiserType &ser,
|
||||
GLNOTIMP("Not fetching feedback object count for glDrawTransformFeedbackStream() display");
|
||||
|
||||
ActionDescription action;
|
||||
action.name = ToStr(gl_CurChunk) + "(<?>)";
|
||||
action.customName = ToStr(gl_CurChunk) + "(<?>)";
|
||||
action.numIndices = 1;
|
||||
action.numInstances = 1;
|
||||
action.indexOffset = 0;
|
||||
@@ -891,7 +891,7 @@ bool WrappedOpenGL::Serialise_glDrawTransformFeedbackStreamInstanced(SerialiserT
|
||||
"display");
|
||||
|
||||
ActionDescription action;
|
||||
action.name = StringFormat::Fmt("%s(<?, %u>)", ToStr(gl_CurChunk).c_str(), instancecount);
|
||||
action.customName = StringFormat::Fmt("%s(<?, %u>)", ToStr(gl_CurChunk).c_str(), instancecount);
|
||||
action.numIndices = 1;
|
||||
action.numInstances = 1;
|
||||
action.indexOffset = 0;
|
||||
@@ -1221,8 +1221,8 @@ bool WrappedOpenGL::Serialise_glDrawArraysIndirect(SerialiserType &ser, GLenum m
|
||||
AddEvent();
|
||||
|
||||
ActionDescription action;
|
||||
action.name = StringFormat::Fmt("%s(<%u, %u>)", ToStr(gl_CurChunk).c_str(), params.count,
|
||||
params.instanceCount);
|
||||
action.customName = StringFormat::Fmt("%s(<%u, %u>)", ToStr(gl_CurChunk).c_str(),
|
||||
params.count, params.instanceCount);
|
||||
action.numIndices = params.count;
|
||||
action.numInstances = params.instanceCount;
|
||||
action.vertexOffset = params.first;
|
||||
@@ -1535,8 +1535,8 @@ bool WrappedOpenGL::Serialise_glDrawElementsIndirect(SerialiserType &ser, GLenum
|
||||
uint32_t IdxSize = GetIdxSize(type);
|
||||
|
||||
ActionDescription action;
|
||||
action.name = StringFormat::Fmt("%s(<%u, %u>)", ToStr(gl_CurChunk).c_str(), params.count,
|
||||
params.instanceCount);
|
||||
action.customName = StringFormat::Fmt("%s(<%u, %u>)", ToStr(gl_CurChunk).c_str(),
|
||||
params.count, params.instanceCount);
|
||||
action.numIndices = params.count;
|
||||
action.numInstances = params.instanceCount;
|
||||
action.indexOffset = params.firstIndex;
|
||||
@@ -2198,7 +2198,7 @@ bool WrappedOpenGL::Serialise_glMultiDrawArrays(SerialiserType &ser, GLenum mode
|
||||
GL.glMultiDrawArrays(mode, first, count, drawcount);
|
||||
|
||||
ActionDescription action;
|
||||
action.name = StringFormat::Fmt("%s(%i)", ToStr(gl_CurChunk).c_str(), drawcount);
|
||||
action.customName = StringFormat::Fmt("%s(%i)", ToStr(gl_CurChunk).c_str(), drawcount);
|
||||
action.flags |= ActionFlags::MultiAction;
|
||||
|
||||
m_LastTopology = MakePrimitiveTopology(mode);
|
||||
@@ -2217,7 +2217,7 @@ bool WrappedOpenGL::Serialise_glMultiDrawArrays(SerialiserType &ser, GLenum mode
|
||||
multidraw.numIndices = count[i];
|
||||
multidraw.vertexOffset = first[i];
|
||||
|
||||
multidraw.name =
|
||||
multidraw.customName =
|
||||
StringFormat::Fmt("%s[%i](%u)", ToStr(gl_CurChunk).c_str(), i, multidraw.numIndices);
|
||||
|
||||
multidraw.flags |= ActionFlags::Drawcall;
|
||||
@@ -2357,7 +2357,7 @@ bool WrappedOpenGL::Serialise_glMultiDrawElements(SerialiserType &ser, GLenum mo
|
||||
uint32_t IdxSize = GetIdxSize(type);
|
||||
|
||||
ActionDescription action;
|
||||
action.name = StringFormat::Fmt("%s(%i)", ToStr(gl_CurChunk).c_str(), drawcount);
|
||||
action.customName = StringFormat::Fmt("%s(%i)", ToStr(gl_CurChunk).c_str(), drawcount);
|
||||
|
||||
action.flags |= ActionFlags::MultiAction;
|
||||
m_LastIndexWidth = IdxSize;
|
||||
@@ -2382,7 +2382,7 @@ bool WrappedOpenGL::Serialise_glMultiDrawElements(SerialiserType &ser, GLenum mo
|
||||
|
||||
multidraw.indexOffset /= IdxSize;
|
||||
|
||||
multidraw.name =
|
||||
multidraw.customName =
|
||||
StringFormat::Fmt("%s[%i](%u)", ToStr(gl_CurChunk).c_str(), i, multidraw.numIndices);
|
||||
|
||||
multidraw.flags |= ActionFlags::Drawcall | ActionFlags::Indexed;
|
||||
@@ -2527,7 +2527,7 @@ bool WrappedOpenGL::Serialise_glMultiDrawElementsBaseVertex(SerialiserType &ser,
|
||||
uint32_t IdxSize = GetIdxSize(type);
|
||||
|
||||
ActionDescription action;
|
||||
action.name = StringFormat::Fmt("%s(%i)", ToStr(gl_CurChunk).c_str(), drawcount);
|
||||
action.customName = StringFormat::Fmt("%s(%i)", ToStr(gl_CurChunk).c_str(), drawcount);
|
||||
|
||||
action.flags |= ActionFlags::MultiAction;
|
||||
|
||||
@@ -2551,7 +2551,7 @@ bool WrappedOpenGL::Serialise_glMultiDrawElementsBaseVertex(SerialiserType &ser,
|
||||
|
||||
multidraw.indexOffset /= IdxSize;
|
||||
|
||||
multidraw.name =
|
||||
multidraw.customName =
|
||||
StringFormat::Fmt("%s[%i](%u)", ToStr(gl_CurChunk).c_str(), i, multidraw.numIndices);
|
||||
|
||||
multidraw.flags |= ActionFlags::Drawcall | ActionFlags::Indexed;
|
||||
@@ -2682,7 +2682,7 @@ bool WrappedOpenGL::Serialise_glMultiDrawArraysIndirect(SerialiserType &ser, GLe
|
||||
GL.glMultiDrawArraysIndirect(mode, (const void *)offset, drawcount, stride);
|
||||
|
||||
ActionDescription action;
|
||||
action.name = StringFormat::Fmt("%s(<%i>)", ToStr(gl_CurChunk).c_str(), drawcount);
|
||||
action.customName = StringFormat::Fmt("%s(<%i>)", ToStr(gl_CurChunk).c_str(), drawcount);
|
||||
|
||||
action.flags |= ActionFlags::MultiAction;
|
||||
|
||||
@@ -2725,15 +2725,15 @@ bool WrappedOpenGL::Serialise_glMultiDrawArraysIndirect(SerialiserType &ser, GLe
|
||||
multidraw.vertexOffset = params.first;
|
||||
multidraw.instanceOffset = params.baseInstance;
|
||||
|
||||
multidraw.name = StringFormat::Fmt("%s[%i](<%u, %u>)", ToStr(gl_CurChunk).c_str(), i,
|
||||
multidraw.numIndices, multidraw.numInstances);
|
||||
multidraw.customName = StringFormat::Fmt("%s[%i](<%u, %u>)", ToStr(gl_CurChunk).c_str(), i,
|
||||
multidraw.numIndices, multidraw.numInstances);
|
||||
|
||||
multidraw.flags |= ActionFlags::Drawcall | ActionFlags::Instanced | ActionFlags::Indirect;
|
||||
|
||||
m_LastTopology = MakePrimitiveTopology(mode);
|
||||
|
||||
// add a fake chunk for this individual indirect draw
|
||||
SDChunk *fakeChunk = new SDChunk(multidraw.name);
|
||||
SDChunk *fakeChunk = new SDChunk(multidraw.customName);
|
||||
fakeChunk->metadata = baseChunk->metadata;
|
||||
fakeChunk->metadata.chunkID = (uint32_t)GLChunk::glIndirectSubCommand;
|
||||
|
||||
@@ -2904,7 +2904,7 @@ bool WrappedOpenGL::Serialise_glMultiDrawElementsIndirect(SerialiserType &ser, G
|
||||
GL.glMultiDrawElementsIndirect(mode, type, (const void *)offset, drawcount, stride);
|
||||
|
||||
ActionDescription action;
|
||||
action.name = StringFormat::Fmt("%s(<%i>)", ToStr(gl_CurChunk).c_str(), drawcount);
|
||||
action.customName = StringFormat::Fmt("%s(<%i>)", ToStr(gl_CurChunk).c_str(), drawcount);
|
||||
|
||||
action.flags |= ActionFlags::MultiAction;
|
||||
|
||||
@@ -2949,8 +2949,8 @@ bool WrappedOpenGL::Serialise_glMultiDrawElementsIndirect(SerialiserType &ser, G
|
||||
multidraw.baseVertex = params.baseVertex;
|
||||
multidraw.instanceOffset = params.baseInstance;
|
||||
|
||||
multidraw.name = StringFormat::Fmt("%s[%i](<%u, %u>)", ToStr(gl_CurChunk).c_str(), i,
|
||||
multidraw.numIndices, multidraw.numInstances);
|
||||
multidraw.customName = StringFormat::Fmt("%s[%i](<%u, %u>)", ToStr(gl_CurChunk).c_str(), i,
|
||||
multidraw.numIndices, multidraw.numInstances);
|
||||
|
||||
multidraw.flags |= ActionFlags::Drawcall | ActionFlags::Indexed | ActionFlags::Instanced |
|
||||
ActionFlags::Indirect;
|
||||
@@ -2959,7 +2959,7 @@ bool WrappedOpenGL::Serialise_glMultiDrawElementsIndirect(SerialiserType &ser, G
|
||||
m_LastIndexWidth = IdxSize;
|
||||
|
||||
// add a fake chunk for this individual indirect draw
|
||||
SDChunk *fakeChunk = new SDChunk(multidraw.name);
|
||||
SDChunk *fakeChunk = new SDChunk(multidraw.customName);
|
||||
fakeChunk->metadata = baseChunk->metadata;
|
||||
fakeChunk->metadata.chunkID = (uint32_t)GLChunk::glIndirectSubCommand;
|
||||
|
||||
@@ -3134,7 +3134,7 @@ bool WrappedOpenGL::Serialise_glMultiDrawArraysIndirectCount(SerialiserType &ser
|
||||
maxdrawcount, stride);
|
||||
|
||||
ActionDescription action;
|
||||
action.name = StringFormat::Fmt("%s(<%i>)", ToStr(gl_CurChunk).c_str(), realdrawcount);
|
||||
action.customName = StringFormat::Fmt("%s(<%i>)", ToStr(gl_CurChunk).c_str(), realdrawcount);
|
||||
|
||||
action.flags |= ActionFlags::MultiAction;
|
||||
|
||||
@@ -3177,15 +3177,15 @@ bool WrappedOpenGL::Serialise_glMultiDrawArraysIndirectCount(SerialiserType &ser
|
||||
multidraw.vertexOffset = params.first;
|
||||
multidraw.instanceOffset = params.baseInstance;
|
||||
|
||||
multidraw.name = StringFormat::Fmt("%s[%i](<%u, %u>)", ToStr(gl_CurChunk).c_str(), i,
|
||||
multidraw.numIndices, multidraw.numInstances);
|
||||
multidraw.customName = StringFormat::Fmt("%s[%i](<%u, %u>)", ToStr(gl_CurChunk).c_str(), i,
|
||||
multidraw.numIndices, multidraw.numInstances);
|
||||
|
||||
multidraw.flags |= ActionFlags::Drawcall | ActionFlags::Instanced | ActionFlags::Indirect;
|
||||
|
||||
m_LastTopology = MakePrimitiveTopology(mode);
|
||||
|
||||
// add a fake chunk for this individual indirect draw
|
||||
SDChunk *fakeChunk = new SDChunk(multidraw.name);
|
||||
SDChunk *fakeChunk = new SDChunk(multidraw.customName);
|
||||
fakeChunk->metadata = baseChunk->metadata;
|
||||
fakeChunk->metadata.chunkID = (uint32_t)GLChunk::glIndirectSubCommand;
|
||||
|
||||
@@ -3365,7 +3365,7 @@ bool WrappedOpenGL::Serialise_glMultiDrawElementsIndirectCount(SerialiserType &s
|
||||
maxdrawcount, stride);
|
||||
|
||||
ActionDescription action;
|
||||
action.name = StringFormat::Fmt("%s(<%i>)", ToStr(gl_CurChunk).c_str(), realdrawcount);
|
||||
action.customName = StringFormat::Fmt("%s(<%i>)", ToStr(gl_CurChunk).c_str(), realdrawcount);
|
||||
|
||||
action.flags |= ActionFlags::MultiAction;
|
||||
|
||||
@@ -3410,8 +3410,8 @@ bool WrappedOpenGL::Serialise_glMultiDrawElementsIndirectCount(SerialiserType &s
|
||||
multidraw.baseVertex = params.baseVertex;
|
||||
multidraw.instanceOffset = params.baseInstance;
|
||||
|
||||
multidraw.name = StringFormat::Fmt("%s[%i](<%u, %u>)", ToStr(gl_CurChunk).c_str(), i,
|
||||
multidraw.numIndices, multidraw.numInstances);
|
||||
multidraw.customName = StringFormat::Fmt("%s[%i](<%u, %u>)", ToStr(gl_CurChunk).c_str(), i,
|
||||
multidraw.numIndices, multidraw.numInstances);
|
||||
|
||||
multidraw.flags |= ActionFlags::Drawcall | ActionFlags::Indexed | ActionFlags::Instanced |
|
||||
ActionFlags::Indirect;
|
||||
@@ -3420,7 +3420,7 @@ bool WrappedOpenGL::Serialise_glMultiDrawElementsIndirectCount(SerialiserType &s
|
||||
m_LastIndexWidth = IdxSize;
|
||||
|
||||
// add a fake chunk for this individual indirect draw
|
||||
SDChunk *fakeChunk = new SDChunk(multidraw.name);
|
||||
SDChunk *fakeChunk = new SDChunk(multidraw.customName);
|
||||
fakeChunk->metadata = baseChunk->metadata;
|
||||
fakeChunk->metadata.chunkID = (uint32_t)GLChunk::glIndirectSubCommand;
|
||||
|
||||
@@ -4445,7 +4445,7 @@ bool WrappedOpenGL::Serialise_glClear(SerialiserType &ser, GLbitfield mask)
|
||||
name += ")";
|
||||
|
||||
ActionDescription action;
|
||||
action.name = name;
|
||||
action.customName = name;
|
||||
action.flags |= ActionFlags::Clear;
|
||||
if(mask & GL_COLOR_BUFFER_BIT)
|
||||
action.flags |= ActionFlags::ClearColor;
|
||||
|
||||
@@ -3449,7 +3449,7 @@ bool WrappedVulkan::ProcessChunk(ReadSerialiser &ser, VulkanChunk chunk)
|
||||
AddEvent();
|
||||
|
||||
ActionDescription action;
|
||||
action.name = "End of Capture";
|
||||
action.customName = "End of Capture";
|
||||
action.flags |= ActionFlags::Present;
|
||||
|
||||
action.copyDestination = m_LastPresentedImage;
|
||||
|
||||
@@ -1584,7 +1584,7 @@ bool WrappedVulkan::Serialise_vkCmdBeginRenderPass(SerialiserType &ser, VkComman
|
||||
|
||||
AddEvent();
|
||||
ActionDescription action;
|
||||
action.name =
|
||||
action.customName =
|
||||
StringFormat::Fmt("vkCmdBeginRenderPass(%s)", MakeRenderPassOpString(false).c_str());
|
||||
action.flags |= ActionFlags::PassBoundary | ActionFlags::BeginPass;
|
||||
|
||||
@@ -1761,8 +1761,8 @@ bool WrappedVulkan::Serialise_vkCmdNextSubpass(SerialiserType &ser, VkCommandBuf
|
||||
|
||||
AddEvent();
|
||||
ActionDescription action;
|
||||
action.name = StringFormat::Fmt("vkCmdNextSubpass() => %u",
|
||||
m_BakedCmdBufferInfo[m_LastCmdBufferID].state.subpass);
|
||||
action.customName = StringFormat::Fmt("vkCmdNextSubpass() => %u",
|
||||
m_BakedCmdBufferInfo[m_LastCmdBufferID].state.subpass);
|
||||
action.flags |= ActionFlags::PassBoundary | ActionFlags::BeginPass | ActionFlags::EndPass;
|
||||
|
||||
AddAction(action);
|
||||
@@ -1888,7 +1888,8 @@ bool WrappedVulkan::Serialise_vkCmdEndRenderPass(SerialiserType &ser, VkCommandB
|
||||
|
||||
AddEvent();
|
||||
ActionDescription action;
|
||||
action.name = StringFormat::Fmt("vkCmdEndRenderPass(%s)", MakeRenderPassOpString(true).c_str());
|
||||
action.customName =
|
||||
StringFormat::Fmt("vkCmdEndRenderPass(%s)", MakeRenderPassOpString(true).c_str());
|
||||
action.flags |= ActionFlags::PassBoundary | ActionFlags::EndPass;
|
||||
|
||||
AddAction(action);
|
||||
@@ -2208,7 +2209,7 @@ bool WrappedVulkan::Serialise_vkCmdBeginRenderPass2(SerialiserType &ser,
|
||||
|
||||
AddEvent();
|
||||
ActionDescription action;
|
||||
action.name =
|
||||
action.customName =
|
||||
StringFormat::Fmt("vkCmdBeginRenderPass2(%s)", MakeRenderPassOpString(false).c_str());
|
||||
action.flags |= ActionFlags::PassBoundary | ActionFlags::BeginPass;
|
||||
|
||||
@@ -2402,8 +2403,8 @@ bool WrappedVulkan::Serialise_vkCmdNextSubpass2(SerialiserType &ser, VkCommandBu
|
||||
|
||||
AddEvent();
|
||||
ActionDescription action;
|
||||
action.name = StringFormat::Fmt("vkCmdNextSubpass2() => %u",
|
||||
m_BakedCmdBufferInfo[m_LastCmdBufferID].state.subpass);
|
||||
action.customName = StringFormat::Fmt("vkCmdNextSubpass2() => %u",
|
||||
m_BakedCmdBufferInfo[m_LastCmdBufferID].state.subpass);
|
||||
action.flags |= ActionFlags::PassBoundary | ActionFlags::BeginPass | ActionFlags::EndPass;
|
||||
|
||||
AddAction(action);
|
||||
@@ -2545,7 +2546,7 @@ bool WrappedVulkan::Serialise_vkCmdEndRenderPass2(SerialiserType &ser, VkCommand
|
||||
|
||||
AddEvent();
|
||||
ActionDescription action;
|
||||
action.name =
|
||||
action.customName =
|
||||
StringFormat::Fmt("vkCmdEndRenderPass2(%s)", MakeRenderPassOpString(true).c_str());
|
||||
action.flags |= ActionFlags::PassBoundary | ActionFlags::EndPass;
|
||||
|
||||
@@ -4162,7 +4163,7 @@ bool WrappedVulkan::Serialise_vkCmdExecuteCommands(SerialiserType &ser, VkComman
|
||||
AddEvent();
|
||||
|
||||
ActionDescription action;
|
||||
action.name = StringFormat::Fmt("vkCmdExecuteCommands(%u)", commandBufferCount);
|
||||
action.customName = StringFormat::Fmt("vkCmdExecuteCommands(%u)", commandBufferCount);
|
||||
action.flags = ActionFlags::CmdList | ActionFlags::PushMarker;
|
||||
|
||||
AddAction(action);
|
||||
@@ -4183,8 +4184,8 @@ bool WrappedVulkan::Serialise_vkCmdExecuteCommands(SerialiserType &ser, VkComman
|
||||
|
||||
// add a fake marker
|
||||
ActionDescription marker;
|
||||
marker.name = StringFormat::Fmt("=> vkCmdExecuteCommands()[%u]: vkBeginCommandBuffer(%s)",
|
||||
c, ToStr(cmd).c_str());
|
||||
marker.customName = StringFormat::Fmt(
|
||||
"=> vkCmdExecuteCommands()[%u]: vkBeginCommandBuffer(%s)", c, ToStr(cmd).c_str());
|
||||
marker.flags =
|
||||
ActionFlags::CommandBufferBoundary | ActionFlags::PassBoundary | ActionFlags::BeginPass;
|
||||
AddEvent();
|
||||
@@ -4249,8 +4250,8 @@ bool WrappedVulkan::Serialise_vkCmdExecuteCommands(SerialiserType &ser, VkComman
|
||||
|
||||
cmdBufInfo.curEvents.clear();
|
||||
|
||||
marker.name = StringFormat::Fmt("=> vkCmdExecuteCommands()[%u]: vkEndCommandBuffer(%s)", c,
|
||||
ToStr(cmd).c_str());
|
||||
marker.customName = StringFormat::Fmt(
|
||||
"=> vkCmdExecuteCommands()[%u]: vkEndCommandBuffer(%s)", c, ToStr(cmd).c_str());
|
||||
marker.flags =
|
||||
ActionFlags::CommandBufferBoundary | ActionFlags::PassBoundary | ActionFlags::EndPass;
|
||||
AddEvent();
|
||||
@@ -4511,7 +4512,7 @@ bool WrappedVulkan::Serialise_vkCmdDebugMarkerBeginEXT(SerialiserType &ser,
|
||||
ObjDisp(commandBuffer)->CmdDebugMarkerBeginEXT(Unwrap(commandBuffer), &Marker);
|
||||
|
||||
ActionDescription action;
|
||||
action.name = Marker.pMarkerName ? Marker.pMarkerName : "";
|
||||
action.customName = Marker.pMarkerName ? Marker.pMarkerName : "";
|
||||
action.flags |= ActionFlags::PushMarker;
|
||||
|
||||
action.markerColor.x = RDCCLAMP(Marker.color[0], 0.0f, 1.0f);
|
||||
@@ -4582,7 +4583,6 @@ bool WrappedVulkan::Serialise_vkCmdDebugMarkerEndEXT(SerialiserType &ser,
|
||||
// dummy action that is consumed when this command buffer
|
||||
// is being in-lined into the call stream
|
||||
ActionDescription action;
|
||||
action.name = "vkCmdDebugMarkerEndEXT()";
|
||||
action.flags = ActionFlags::PopMarker;
|
||||
|
||||
AddEvent();
|
||||
@@ -4643,7 +4643,7 @@ bool WrappedVulkan::Serialise_vkCmdDebugMarkerInsertEXT(SerialiserType &ser,
|
||||
ObjDisp(commandBuffer)->CmdDebugMarkerInsertEXT(Unwrap(commandBuffer), &Marker);
|
||||
|
||||
ActionDescription action;
|
||||
action.name = Marker.pMarkerName ? Marker.pMarkerName : "";
|
||||
action.customName = Marker.pMarkerName ? Marker.pMarkerName : "";
|
||||
action.flags |= ActionFlags::SetMarker;
|
||||
|
||||
action.markerColor.x = RDCCLAMP(Marker.color[0], 0.0f, 1.0f);
|
||||
@@ -5500,7 +5500,7 @@ bool WrappedVulkan::Serialise_vkCmdBeginDebugUtilsLabelEXT(SerialiserType &ser,
|
||||
ObjDisp(commandBuffer)->CmdBeginDebugUtilsLabelEXT(Unwrap(commandBuffer), &Label);
|
||||
|
||||
ActionDescription action;
|
||||
action.name = Label.pLabelName ? Label.pLabelName : "";
|
||||
action.customName = Label.pLabelName ? Label.pLabelName : "";
|
||||
action.flags |= ActionFlags::PushMarker;
|
||||
|
||||
action.markerColor.x = RDCCLAMP(Label.color[0], 0.0f, 1.0f);
|
||||
@@ -5569,7 +5569,6 @@ bool WrappedVulkan::Serialise_vkCmdEndDebugUtilsLabelEXT(SerialiserType &ser,
|
||||
ObjDisp(commandBuffer)->CmdEndDebugUtilsLabelEXT(Unwrap(commandBuffer));
|
||||
|
||||
ActionDescription action;
|
||||
action.name = "vkCmdEndDebugUtilsLabelEXT()";
|
||||
action.flags = ActionFlags::PopMarker;
|
||||
|
||||
AddEvent();
|
||||
@@ -5630,7 +5629,7 @@ bool WrappedVulkan::Serialise_vkCmdInsertDebugUtilsLabelEXT(SerialiserType &ser,
|
||||
ObjDisp(commandBuffer)->CmdInsertDebugUtilsLabelEXT(Unwrap(commandBuffer), &Label);
|
||||
|
||||
ActionDescription action;
|
||||
action.name = Label.pLabelName ? Label.pLabelName : "";
|
||||
action.customName = Label.pLabelName ? Label.pLabelName : "";
|
||||
action.flags |= ActionFlags::SetMarker;
|
||||
|
||||
action.markerColor.x = RDCCLAMP(Label.color[0], 0.0f, 1.0f);
|
||||
|
||||
@@ -690,7 +690,7 @@ bool WrappedVulkan::Serialise_vkCmdDrawIndirect(SerialiserType &ser, VkCommandBu
|
||||
|
||||
AddEvent();
|
||||
|
||||
action.name = name;
|
||||
action.customName = name;
|
||||
action.flags = ActionFlags::Drawcall | ActionFlags::Instanced | ActionFlags::Indirect;
|
||||
|
||||
AddAction(action);
|
||||
@@ -706,13 +706,13 @@ bool WrappedVulkan::Serialise_vkCmdDrawIndirect(SerialiserType &ser, VkCommandBu
|
||||
}
|
||||
|
||||
ActionDescription action;
|
||||
action.name = name;
|
||||
action.customName = name;
|
||||
action.flags = ActionFlags::MultiAction | ActionFlags::PushMarker;
|
||||
|
||||
if(count == 0)
|
||||
{
|
||||
action.flags = ActionFlags::Drawcall | ActionFlags::Instanced | ActionFlags::Indirect;
|
||||
action.name += "(0)";
|
||||
action.customName += "(0)";
|
||||
}
|
||||
|
||||
AddEvent();
|
||||
@@ -732,7 +732,7 @@ bool WrappedVulkan::Serialise_vkCmdDrawIndirect(SerialiserType &ser, VkCommandBu
|
||||
{
|
||||
ActionDescription multi;
|
||||
|
||||
multi.name = name;
|
||||
multi.customName = name;
|
||||
|
||||
multi.flags |= ActionFlags::Drawcall | ActionFlags::Instanced | ActionFlags::Indirect;
|
||||
|
||||
@@ -763,7 +763,7 @@ bool WrappedVulkan::Serialise_vkCmdDrawIndirect(SerialiserType &ser, VkCommandBu
|
||||
if(count > 0)
|
||||
{
|
||||
AddEvent();
|
||||
action.name = name + " end";
|
||||
action.customName = name + " end";
|
||||
action.flags = ActionFlags::PopMarker;
|
||||
AddAction(action);
|
||||
}
|
||||
@@ -1075,7 +1075,7 @@ bool WrappedVulkan::Serialise_vkCmdDrawIndexedIndirect(SerialiserType &ser,
|
||||
|
||||
AddEvent();
|
||||
|
||||
action.name = name;
|
||||
action.customName = name;
|
||||
action.flags = ActionFlags::Drawcall | ActionFlags::Instanced | ActionFlags::Indexed |
|
||||
ActionFlags::Indirect;
|
||||
|
||||
@@ -1092,12 +1092,12 @@ bool WrappedVulkan::Serialise_vkCmdDrawIndexedIndirect(SerialiserType &ser,
|
||||
}
|
||||
|
||||
ActionDescription action;
|
||||
action.name = name;
|
||||
action.customName = name;
|
||||
action.flags = ActionFlags::MultiAction | ActionFlags::PushMarker;
|
||||
|
||||
if(count == 0)
|
||||
{
|
||||
action.name += "(0)";
|
||||
action.customName += "(0)";
|
||||
action.flags = ActionFlags::Drawcall | ActionFlags::Instanced | ActionFlags::Indexed |
|
||||
ActionFlags::Indirect;
|
||||
}
|
||||
@@ -1119,7 +1119,7 @@ bool WrappedVulkan::Serialise_vkCmdDrawIndexedIndirect(SerialiserType &ser,
|
||||
{
|
||||
ActionDescription multi;
|
||||
|
||||
multi.name = name;
|
||||
multi.customName = name;
|
||||
|
||||
multi.flags |= ActionFlags::Drawcall | ActionFlags::Instanced | ActionFlags::Indexed |
|
||||
ActionFlags::Indirect;
|
||||
@@ -1151,7 +1151,7 @@ bool WrappedVulkan::Serialise_vkCmdDrawIndexedIndirect(SerialiserType &ser,
|
||||
if(count > 0)
|
||||
{
|
||||
AddEvent();
|
||||
action.name = name + " end";
|
||||
action.customName = name + " end";
|
||||
action.flags = ActionFlags::PopMarker;
|
||||
AddAction(action);
|
||||
}
|
||||
@@ -1312,7 +1312,7 @@ bool WrappedVulkan::Serialise_vkCmdDispatchIndirect(SerialiserType &ser,
|
||||
AddEvent();
|
||||
|
||||
ActionDescription action;
|
||||
action.name = "vkCmdDispatchIndirect(<?, ?, ?>)";
|
||||
action.customName = "vkCmdDispatchIndirect(<?, ?, ?>)";
|
||||
action.dispatchDimension[0] = 0;
|
||||
action.dispatchDimension[1] = 0;
|
||||
action.dispatchDimension[2] = 0;
|
||||
@@ -2890,11 +2890,11 @@ bool WrappedVulkan::Serialise_vkCmdDrawIndirectCount(SerialiserType &ser,
|
||||
SDChunk *baseChunk = m_StructuredFile->chunks.back();
|
||||
|
||||
ActionDescription action;
|
||||
action.name = name;
|
||||
action.customName = name;
|
||||
action.flags = ActionFlags::MultiAction | ActionFlags::PushMarker;
|
||||
|
||||
if(maxDrawCount == 0)
|
||||
action.name = name + "(0)";
|
||||
action.customName = name + "(0)";
|
||||
|
||||
AddEvent();
|
||||
AddAction(action);
|
||||
@@ -2914,7 +2914,7 @@ bool WrappedVulkan::Serialise_vkCmdDrawIndirectCount(SerialiserType &ser,
|
||||
{
|
||||
ActionDescription multi;
|
||||
|
||||
multi.name = name;
|
||||
multi.customName = name;
|
||||
|
||||
multi.flags |= ActionFlags::Drawcall | ActionFlags::Instanced | ActionFlags::Indirect;
|
||||
|
||||
@@ -2943,7 +2943,7 @@ bool WrappedVulkan::Serialise_vkCmdDrawIndirectCount(SerialiserType &ser,
|
||||
}
|
||||
|
||||
AddEvent();
|
||||
action.name = name + " end";
|
||||
action.customName = name + " end";
|
||||
action.flags = ActionFlags::PopMarker;
|
||||
AddAction(action);
|
||||
}
|
||||
@@ -3253,11 +3253,11 @@ bool WrappedVulkan::Serialise_vkCmdDrawIndexedIndirectCount(
|
||||
SDChunk *baseChunk = m_StructuredFile->chunks.back();
|
||||
|
||||
ActionDescription action;
|
||||
action.name = name;
|
||||
action.customName = name;
|
||||
action.flags = ActionFlags::MultiAction | ActionFlags::PushMarker;
|
||||
|
||||
if(maxDrawCount == 0)
|
||||
action.name = name + "(0)";
|
||||
action.customName = name + "(0)";
|
||||
|
||||
AddEvent();
|
||||
AddAction(action);
|
||||
@@ -3277,7 +3277,7 @@ bool WrappedVulkan::Serialise_vkCmdDrawIndexedIndirectCount(
|
||||
{
|
||||
ActionDescription multi;
|
||||
|
||||
multi.name = name;
|
||||
multi.customName = name;
|
||||
|
||||
multi.flags |= ActionFlags::Drawcall | ActionFlags::Instanced | ActionFlags::Indexed |
|
||||
ActionFlags::Indirect;
|
||||
@@ -3307,7 +3307,7 @@ bool WrappedVulkan::Serialise_vkCmdDrawIndexedIndirectCount(
|
||||
}
|
||||
|
||||
AddEvent();
|
||||
action.name = name + " end";
|
||||
action.customName = name + " end";
|
||||
action.flags = ActionFlags::PopMarker;
|
||||
AddAction(action);
|
||||
}
|
||||
@@ -3406,8 +3406,6 @@ bool WrappedVulkan::Serialise_vkCmdDrawIndirectByteCountEXT(
|
||||
Unwrap(counterBuffer), counterBufferOffset, counterOffset,
|
||||
vertexStride);
|
||||
|
||||
rdcstr name = "vkCmdDrawIndirectByteCountEXT";
|
||||
|
||||
if(!IsDrawInRenderPass())
|
||||
{
|
||||
AddDebugMessage(MessageCategory::Execution, MessageSeverity::High,
|
||||
@@ -3420,7 +3418,6 @@ bool WrappedVulkan::Serialise_vkCmdDrawIndirectByteCountEXT(
|
||||
|
||||
AddEvent();
|
||||
|
||||
action.name = name;
|
||||
action.instanceOffset = firstInstance;
|
||||
action.numInstances = instanceCount;
|
||||
action.flags = ActionFlags::Drawcall | ActionFlags::Instanced | ActionFlags::Indirect;
|
||||
|
||||
@@ -268,7 +268,7 @@ void WrappedVulkan::ReplayQueueSubmit(VkQueue queue, VkSubmitInfo2KHR submitInfo
|
||||
ActionDescription action;
|
||||
{
|
||||
// add a fake marker
|
||||
action.name = name;
|
||||
action.customName = name;
|
||||
action.flags |=
|
||||
ActionFlags::CommandBufferBoundary | ActionFlags::PassBoundary | ActionFlags::BeginPass;
|
||||
AddEvent();
|
||||
@@ -327,7 +327,7 @@ void WrappedVulkan::ReplayQueueSubmit(VkQueue queue, VkSubmitInfo2KHR submitInfo
|
||||
|
||||
name = StringFormat::Fmt("=> %s[%u]: vkEndCommandBuffer(%s)", basename.c_str(), c,
|
||||
ToStr(cmd).c_str());
|
||||
action.name = name;
|
||||
action.customName = name;
|
||||
action.flags =
|
||||
ActionFlags::CommandBufferBoundary | ActionFlags::PassBoundary | ActionFlags::EndPass;
|
||||
AddEvent();
|
||||
@@ -577,7 +577,7 @@ void WrappedVulkan::InsertActionsAndRefreshIDs(BakedCmdBufferInfo &cmdBufInfo)
|
||||
args = &unknown;
|
||||
}
|
||||
|
||||
n.action.name =
|
||||
n.action.customName =
|
||||
StringFormat::Fmt("vkCmdDispatchIndirect(<%u, %u, %u>)", args->x, args->y, args->z);
|
||||
n.action.dispatchDimension[0] = args->x;
|
||||
n.action.dispatchDimension[1] = args->y;
|
||||
@@ -721,6 +721,8 @@ void WrappedVulkan::InsertActionsAndRefreshIDs(BakedCmdBufferInfo &cmdBufInfo)
|
||||
// be in-lined as a single action, so we patch in-place
|
||||
if(!hasCount && indirectCount == 1)
|
||||
{
|
||||
rdcstr name = GetStructuredFile().chunks[n.action.events.back().chunkIndex]->name;
|
||||
|
||||
bool valid =
|
||||
PatchIndirectDraw(0, n.indirectPatch.stride, n.indirectPatch.type, n.action, ptr, end);
|
||||
|
||||
@@ -738,10 +740,10 @@ void WrappedVulkan::InsertActionsAndRefreshIDs(BakedCmdBufferInfo &cmdBufInfo)
|
||||
const char *countString = (n.indirectPatch.count > 1 ? "<1>" : "1");
|
||||
|
||||
if(valid)
|
||||
n.action.name = StringFormat::Fmt("%s(%s) => <%u, %u>", n.action.name.c_str(),
|
||||
countString, n.action.numIndices, n.action.numInstances);
|
||||
n.action.customName = StringFormat::Fmt("%s(%s) => <%u, %u>", name.c_str(), countString,
|
||||
n.action.numIndices, n.action.numInstances);
|
||||
else
|
||||
n.action.name = StringFormat::Fmt("%s(%s) => <?, ?>", n.action.name.c_str(), countString);
|
||||
n.action.customName = StringFormat::Fmt("%s(%s) => <?, ?>", name.c_str(), countString);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -749,12 +751,14 @@ void WrappedVulkan::InsertActionsAndRefreshIDs(BakedCmdBufferInfo &cmdBufInfo)
|
||||
RDCASSERT(i + indirectCount < cmdBufNodes.size(), i, indirectCount, n.indirectPatch.count,
|
||||
cmdBufNodes.size());
|
||||
|
||||
rdcstr name = GetStructuredFile().chunks[n.action.events.back().chunkIndex]->name;
|
||||
|
||||
// patch the count onto the root action name. The root is otherwise un-suffixed to allow
|
||||
// for collapsing non-multidraws and making everything generally simpler
|
||||
if(hasCount)
|
||||
n.action.name = StringFormat::Fmt("%s(<%u>)", n.action.name.c_str(), indirectCount);
|
||||
n.action.customName = StringFormat::Fmt("%s(<%u>)", name.c_str(), indirectCount);
|
||||
else
|
||||
n.action.name = StringFormat::Fmt("%s(%u)", n.action.name.c_str(), n.indirectPatch.count);
|
||||
n.action.customName = StringFormat::Fmt("%s(%u)", name.c_str(), n.indirectPatch.count);
|
||||
|
||||
for(size_t j = 0; j < (size_t)indirectCount && i + j + 1 < cmdBufNodes.size(); j++)
|
||||
{
|
||||
@@ -763,11 +767,13 @@ void WrappedVulkan::InsertActionsAndRefreshIDs(BakedCmdBufferInfo &cmdBufInfo)
|
||||
bool valid = PatchIndirectDraw(j, n.indirectPatch.stride, n.indirectPatch.type, n2.action,
|
||||
ptr, end);
|
||||
|
||||
name = GetStructuredFile().chunks[n2.action.events.back().chunkIndex]->name;
|
||||
|
||||
if(valid)
|
||||
n2.action.name = StringFormat::Fmt("%s[%zu](<%u, %u>)", n2.action.name.c_str(), j,
|
||||
n2.action.numIndices, n2.action.numInstances);
|
||||
n2.action.customName = StringFormat::Fmt("%s[%zu](<%u, %u>)", name.c_str(), j,
|
||||
n2.action.numIndices, n2.action.numInstances);
|
||||
else
|
||||
n2.action.name = StringFormat::Fmt("%s[%zu](<?, ?>)", n2.action.name.c_str(), j);
|
||||
n2.action.customName = StringFormat::Fmt("%s[%zu](<?, ?>)", name.c_str(), j);
|
||||
|
||||
if(ptr)
|
||||
ptr += n.indirectPatch.stride;
|
||||
@@ -1843,7 +1849,7 @@ bool WrappedVulkan::Serialise_vkQueueBeginDebugUtilsLabelEXT(SerialiserType &ser
|
||||
if(IsLoading(m_State))
|
||||
{
|
||||
ActionDescription action;
|
||||
action.name = Label.pLabelName ? Label.pLabelName : "";
|
||||
action.customName = Label.pLabelName ? Label.pLabelName : "";
|
||||
action.flags |= ActionFlags::PushMarker;
|
||||
|
||||
action.markerColor.x = RDCCLAMP(Label.color[0], 0.0f, 1.0f);
|
||||
@@ -1897,7 +1903,6 @@ bool WrappedVulkan::Serialise_vkQueueEndDebugUtilsLabelEXT(SerialiserType &ser,
|
||||
if(IsLoading(m_State))
|
||||
{
|
||||
ActionDescription action;
|
||||
action.name = "vkQueueEndDebugUtilsLabelEXT()";
|
||||
action.flags = ActionFlags::PopMarker;
|
||||
|
||||
AddEvent();
|
||||
@@ -1947,7 +1952,7 @@ bool WrappedVulkan::Serialise_vkQueueInsertDebugUtilsLabelEXT(SerialiserType &se
|
||||
if(IsLoading(m_State))
|
||||
{
|
||||
ActionDescription action;
|
||||
action.name = Label.pLabelName ? Label.pLabelName : "";
|
||||
action.customName = Label.pLabelName ? Label.pLabelName : "";
|
||||
action.flags |= ActionFlags::SetMarker;
|
||||
|
||||
action.markerColor.x = RDCCLAMP(Label.color[0], 0.0f, 1.0f);
|
||||
|
||||
@@ -724,7 +724,7 @@ bool WrappedVulkan::Serialise_vkQueuePresentKHR(SerialiserType &ser, VkQueue que
|
||||
|
||||
ActionDescription action;
|
||||
|
||||
action.name = StringFormat::Fmt("vkQueuePresentKHR(%s)", ToStr(PresentedImage).c_str());
|
||||
action.customName = StringFormat::Fmt("vkQueuePresentKHR(%s)", ToStr(PresentedImage).c_str());
|
||||
action.flags |= ActionFlags::Present;
|
||||
|
||||
m_LastPresentedImage = action.copyDestination = PresentedImage;
|
||||
|
||||
@@ -550,7 +550,7 @@ void DoSerialise(SerialiserType &ser, ActionDescription &el)
|
||||
SERIALISE_MEMBER(eventId);
|
||||
SERIALISE_MEMBER(actionId);
|
||||
|
||||
SERIALISE_MEMBER(name);
|
||||
SERIALISE_MEMBER(customName);
|
||||
|
||||
SERIALISE_MEMBER(flags);
|
||||
|
||||
|
||||
@@ -368,16 +368,16 @@ void ReplayController::AddFakeMarkers()
|
||||
const char *targets = actions[end].depthOut == ResourceId() ? "Targets" : "Targets + Depth";
|
||||
|
||||
if(copyOnly)
|
||||
mark.name = StringFormat::Fmt("Copy/Clear Pass #%d", copypassID++);
|
||||
mark.customName = StringFormat::Fmt("Copy/Clear Pass #%d", copypassID++);
|
||||
else if(actions[refaction].flags & ActionFlags::Dispatch)
|
||||
mark.name = StringFormat::Fmt("Compute Pass #%d", computepassID++);
|
||||
mark.customName = StringFormat::Fmt("Compute Pass #%d", computepassID++);
|
||||
else if(maxOutCount == 0)
|
||||
mark.name = StringFormat::Fmt("Depth-only Pass #%d", depthpassID++);
|
||||
mark.customName = StringFormat::Fmt("Depth-only Pass #%d", depthpassID++);
|
||||
else if(minOutCount == maxOutCount)
|
||||
mark.name = StringFormat::Fmt("Colour Pass #%d (%d %s)", passID++, minOutCount, targets);
|
||||
mark.customName = StringFormat::Fmt("Colour Pass #%d (%d %s)", passID++, minOutCount, targets);
|
||||
else
|
||||
mark.name = StringFormat::Fmt("Colour Pass #%d (%d-%d %s)", passID++, minOutCount,
|
||||
maxOutCount, targets);
|
||||
mark.customName = StringFormat::Fmt("Colour Pass #%d (%d-%d %s)", passID++, minOutCount,
|
||||
maxOutCount, targets);
|
||||
|
||||
mark.children.resize(end - start + 1);
|
||||
|
||||
|
||||
Reference in new issue
Block a user