mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-05-06 01:50:38 +00:00
Fix naming getting muddled for indirect draws
This commit is contained in:
@@ -604,7 +604,7 @@ bool WrappedVulkan::Serialise_vkCmdDrawIndirect(SerialiserType &ser, VkCommandBu
|
||||
m_IndirectBufferSize = RDCMAX(m_IndirectBufferSize, sizeof(VkDrawIndirectCommand) +
|
||||
(count > 0 ? count - 1 : 0) * stride);
|
||||
|
||||
rdcstr name = StringFormat::Fmt("vkCmdDrawIndirect(%u)", count);
|
||||
rdcstr name = "vkCmdDrawIndirect";
|
||||
|
||||
if(!IsDrawInRenderPass())
|
||||
{
|
||||
@@ -667,6 +667,7 @@ bool WrappedVulkan::Serialise_vkCmdDrawIndirect(SerialiserType &ser, VkCommandBu
|
||||
if(count == 0)
|
||||
{
|
||||
draw.flags = DrawFlags::Drawcall | DrawFlags::Instanced | DrawFlags::Indirect;
|
||||
draw.name += "(0)";
|
||||
}
|
||||
|
||||
AddEvent();
|
||||
@@ -986,7 +987,7 @@ bool WrappedVulkan::Serialise_vkCmdDrawIndexedIndirect(SerialiserType &ser,
|
||||
m_IndirectBufferSize = RDCMAX(m_IndirectBufferSize, sizeof(VkDrawIndexedIndirectCommand) +
|
||||
(count > 0 ? count - 1 : 0) * stride);
|
||||
|
||||
rdcstr name = StringFormat::Fmt("vkCmdDrawIndexedIndirect(%u)", count);
|
||||
rdcstr name = "vkCmdDrawIndexedIndirect";
|
||||
|
||||
if(!IsDrawInRenderPass())
|
||||
{
|
||||
@@ -1049,7 +1050,7 @@ bool WrappedVulkan::Serialise_vkCmdDrawIndexedIndirect(SerialiserType &ser,
|
||||
|
||||
if(count == 0)
|
||||
{
|
||||
draw.name = name;
|
||||
draw.name += "(0)";
|
||||
draw.flags =
|
||||
DrawFlags::Drawcall | DrawFlags::Instanced | DrawFlags::Indexed | DrawFlags::Indirect;
|
||||
}
|
||||
|
||||
@@ -737,13 +737,14 @@ void WrappedVulkan::InsertDrawsAndRefreshIDs(BakedCmdBufferInfo &cmdBufInfo)
|
||||
n.draw.numIndices /= n.indirectPatch.stride;
|
||||
}
|
||||
|
||||
// if the actual draw count was greater than 1, display this as an indirect count
|
||||
const char *countString = (n.indirectPatch.count > 1 ? "<1>" : "1");
|
||||
|
||||
if(valid)
|
||||
n.draw.name =
|
||||
StringFormat::Fmt("%s(%u) => <%u, %u>", n.draw.name.c_str(), n.indirectPatch.count,
|
||||
n.draw.numIndices, n.draw.numInstances);
|
||||
n.draw.name = StringFormat::Fmt("%s(%s) => <%u, %u>", n.draw.name.c_str(), countString,
|
||||
n.draw.numIndices, n.draw.numInstances);
|
||||
else
|
||||
n.draw.name =
|
||||
StringFormat::Fmt("%s(%u) => <?, ?>", n.draw.name.c_str(), n.indirectPatch.count);
|
||||
n.draw.name = StringFormat::Fmt("%s(%s) => <?, ?>", n.draw.name.c_str(), countString);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -751,11 +752,12 @@ void WrappedVulkan::InsertDrawsAndRefreshIDs(BakedCmdBufferInfo &cmdBufInfo)
|
||||
RDCASSERT(i + indirectCount < cmdBufNodes.size(), i, indirectCount, n.indirectPatch.count,
|
||||
cmdBufNodes.size());
|
||||
|
||||
// if there was a count, patch that onto the root drawcall name
|
||||
// patch the count onto the root drawcall name. The root is otherwise un-suffixed to allow
|
||||
// for collapsing non-multidraws and making everything generally simpler
|
||||
if(hasCount)
|
||||
{
|
||||
n.draw.name = StringFormat::Fmt("%s(<%u>)", n.draw.name.c_str(), indirectCount);
|
||||
}
|
||||
else
|
||||
n.draw.name = StringFormat::Fmt("%s(%u)", n.draw.name.c_str(), n.indirectPatch.count);
|
||||
|
||||
for(size_t j = 0; j < (size_t)indirectCount && i + j + 1 < cmdBufNodes.size(); j++)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user