When we click on a node in Event Viewer: see renderdoc\qrenderdoc\Windows\APIInspector.cpp
:
void APIInspector::OnSelectedEventChanged(uint32_t eventId)
{
ui->apiEvents->saveExpansion(ui->apiEvents->getInternalExpansion(m_EventID), 0);
ui->apiEvents->clearSelection();
fillAPIView();
m_EventID = eventId;
ui->apiEvents->applyExpansion(ui->apiEvents->getInternalExpansion(m_EventID), 0);
}
There is a selected event:
void APIInspector::fillAPIView()
{
ui->apiEvents->setUpdatesEnabled(false);
ui->apiEvents->clear();
m_Chunks.clear();
const ActionDescription *action = m_Ctx.CurSelectedAction();
if(action != NULL && !action->events.isEmpty())
{
if(action->IsFakeMarker())
{
RDTreeWidgetItem *root = new RDTreeWidgetItem({lit("---"), QString(action->customName)});
root->setBold(true);
ui->apiEvents->addTopLevelItem(root);
ui->apiEvents->setSelectedItem(root);
}
else
{
for(const APIEvent &ev : action->events)
{
addEvent(ev, ev.eventId == action->eventId);
}
}
}
else
{
APIEvent ev = m_Ctx.GetEventBrowser()->GetAPIEventForEID(m_Ctx.CurSelectedEvent());
if(ev.eventId > 0)
addEvent(ev, true);
}
ui->apiEvents->setUpdatesEnabled(true);
}
And there is an SDFile
that consists of chunks:
The action has eventId
and flags
:
Textual representation of chunks from VS2022 watch window:
- file {chunks={ size=344 } buffers={ size=0 } version=21 } const SDFile &
- chunks { size=344 } StructuredChunkList
[size] 344 unsigned __int64
[capacity] 512 unsigned __int64
+ [0] 0x0000025b76902af0 SDChunk: "vkCreateInstance" (1) SDChunk *
+ [1] 0x0000025b76901ff0 SDChunk: "vkEnumeratePhysicalDevices" (1000) SDChunk *
+ [2] 0x0000025b769031d0 SDChunk: "vkEnumeratePhysicalDevices" (1000) SDChunk *
+ [3] 0x0000025b76902d00 SDChunk: "vkEnumeratePhysicalDevices" (1000) SDChunk *
+ [4] 0x0000025b76900cb0 SDChunk: "vkEnumeratePhysicalDevices" (1000) SDChunk *
+ [5] 0x0000025b76902ba0 SDChunk: "vkCreateDevice" (1001) SDChunk *
+ [6] 0x0000025b76903540 SDChunk: "vkGetDeviceQueue" (1002) SDChunk *
+ [7] 0x0000025b76903750 SDChunk: "vkCreateSemaphore" (1025) SDChunk *
+ [8] 0x0000025b769041a0 SDChunk: "vkCreateSemaphore" (1025) SDChunk *
+ [9] 0x0000025b769045c0 SDChunk: "vkCreateCommandPool" (1006) SDChunk *
+ [10] 0x0000025b76903c20 SDChunk: "vkCreateSwapchainKHR" (1093) SDChunk *
+ [11] 0x0000025b76903cd0 SDChunk: "vkGetSwapchainImagesKHR" (1024) SDChunk *
+ [12] 0x0000025b76903490 SDChunk: "vkGetSwapchainImagesKHR" (1024) SDChunk *
+ [13] 0x0000025b76903ac0 SDChunk: "vkGetSwapchainImagesKHR" (1024) SDChunk *
+ [14] 0x0000025b76903f90 SDChunk: "vkCreateImageView" (1016) SDChunk *
+ [15] 0x0000025b76903ee0 SDChunk: "vkAllocateCommandBuffers" (1008) SDChunk *
+ [16] 0x0000025b76904300 SDChunk: "vkCreateImage" (1015) SDChunk *
+ [17] 0x0000025b76904040 SDChunk: "vkAllocateMemory" (1003) SDChunk *
+ [18] 0x0000025b76903d80 SDChunk: "vkBindImageMemory" (1043) SDChunk *
+ [19] 0x0000025b76903b70 SDChunk: "vkCreateImageView" (1016) SDChunk *
+ [20] 0x0000025b769035f0 SDChunk: "vkCreateRenderPass" (1010) SDChunk *
+ [21] 0x0000025b769038b0 SDChunk: "vkCreatePipelineCache" (1021) SDChunk *
+ [22] 0x0000025b76903e30 SDChunk: "vkCreateFramebuffer" (1009) SDChunk *
+ [23] 0x0000025b6a137cf0 SDChunk: "vkCreateShaderModule" (1019) SDChunk *
+ [24] 0x0000025b6a1381c0 SDChunk: "vkCreateShaderModule" (1019) SDChunk *
+ [25] 0x0000025b6a1392f0 SDChunk: "vkCreateImage" (1015) SDChunk *
+ [26] 0x0000025b6a137ae0 SDChunk: "vkAllocateMemory" (1003) SDChunk *
+ [27] 0x0000025b6a1393a0 SDChunk: "vkBindImageMemory" (1043) SDChunk *
+ [28] 0x0000025b6a137fb0 SDChunk: "vkCreateImageView" (1016) SDChunk *
+ [29] 0x0000025b6a139450 SDChunk: "vkCreateSampler" (1018) SDChunk *
+ [30] 0x0000025b6a136bc0 SDChunk: "vkCreateDescriptorPool" (1011) SDChunk *
+ [31] 0x0000025b6a1383d0 SDChunk: "vkCreateDescriptorSetLayout" (1012) SDChunk *
+ [32] 0x0000025b6a138f80 SDChunk: "vkAllocateDescriptorSets" (1035) SDChunk *
+ [33] 0x0000025b6a138a00 SDChunk: "vkCreatePipelineLayout" (1020) SDChunk *
+ [34] 0x0000025b6a137a30 SDChunk: "vkCreateGraphicsPipelines" (1022) SDChunk *
+ [35] 0x0000025b6a138320 SDChunk: "vkCreateBuffer" (1013) SDChunk *
+ [36] 0x0000025b6a138c10 SDChunk: "vkAllocateMemory" (1003) SDChunk *
+ [37] 0x0000025b6a138ed0 SDChunk: "vkBindBufferMemory" (1042) SDChunk *
+ [38] 0x0000025b6a139030 SDChunk: "vkCreateBuffer" (1013) SDChunk *
+ [39] 0x0000025b6a138060 SDChunk: "vkAllocateMemory" (1003) SDChunk *
+ [40] 0x0000025b6a137b90 SDChunk: "vkBindBufferMemory" (1042) SDChunk *
+ [41] 0x0000025b6a137f00 SDChunk: "vkCreateBuffer" (1013) SDChunk *
+ [42] 0x0000025b6a137610 SDChunk: "vkAllocateMemory" (1003) SDChunk *
+ [43] 0x0000025b6a136dd0 SDChunk: "vkBindBufferMemory" (1042) SDChunk *
+ [44] 0x0000025b6a1369b0 SDChunk: "vkCreateBuffer" (1013) SDChunk *
+ [45] 0x0000025b6a138b60 SDChunk: "vkAllocateMemory" (1003) SDChunk *
+ [46] 0x0000025b6a137da0 SDChunk: "vkBindBufferMemory" (1042) SDChunk *
+ [47] 0x0000025b6a138270 SDChunk: "vkCreateBuffer" (1013) SDChunk *
+ [48] 0x0000025b6a136c70 SDChunk: "vkAllocateMemory" (1003) SDChunk *
+ [49] 0x0000025b6a137e50 SDChunk: "vkBindBufferMemory" (1042) SDChunk *
+ [50] 0x0000025b6a1387f0 SDChunk: "vkCreateBuffer" (1013) SDChunk *
+ [51] 0x0000025b6a139500 SDChunk: "vkAllocateMemory" (1003) SDChunk *
+ [52] 0x0000025b6a136e80 SDChunk: "vkBindBufferMemory" (1042) SDChunk *
+ [53] 0x0000025b6a136d20 SDChunk: "vkCreateImage" (1015) SDChunk *
+ [54] 0x0000025b6a138cc0 SDChunk: "vkAllocateMemory" (1003) SDChunk *
+ [55] 0x0000025b6a136a60 SDChunk: "vkBindImageMemory" (1043) SDChunk *
+ [56] 0x0000025b6a138530 SDChunk: "vkCreateSampler" (1018) SDChunk *
+ [57] 0x0000025b6a137c40 SDChunk: "vkCreateImageView" (1016) SDChunk *
+ [58] 0x0000025b6a1385e0 SDChunk: "vkCreateBuffer" (1013) SDChunk *
+ [59] 0x0000025b6a138ab0 SDChunk: "vkAllocateMemory" (1003) SDChunk *
+ [60] 0x0000025b6a138690 SDChunk: "vkBindBufferMemory" (1042) SDChunk *
+ [61] 0x0000025b6a138740 SDChunk: "vkCreateBuffer" (1013) SDChunk *
+ [62] 0x0000025b6a137140 SDChunk: "vkAllocateMemory" (1003) SDChunk *
+ [63] 0x0000025b6a1371f0 SDChunk: "vkBindBufferMemory" (1042) SDChunk *
+ [64] 0x0000025b6a138e20 SDChunk: "vkCreateBuffer" (1013) SDChunk *
+ [65] 0x0000025b6a137350 SDChunk: "vkAllocateMemory" (1003) SDChunk *
+ [66] 0x0000025b6a137820 SDChunk: "vkBindBufferMemory" (1042) SDChunk *
+ [67] 0x0000025b6a138950 SDChunk: "vkCreateRenderPass" (1010) SDChunk *
+ [68] 0x0000025b6a137400 SDChunk: "vkCreateSampler" (1018) SDChunk *
+ [69] 0x0000025b6a138d70 SDChunk: "vkCreateImage" (1015) SDChunk *
+ [70] 0x0000025b6a136f30 SDChunk: "vkAllocateMemory" (1003) SDChunk *
+ [71] 0x0000025b6a136fe0 SDChunk: "vkBindImageMemory" (1043) SDChunk *
+ [72] 0x0000025b6a1388a0 SDChunk: "vkCreateImageView" (1016) SDChunk *
+ [73] 0x0000025b6a1390e0 SDChunk: "vkCreateImage" (1015) SDChunk *
+ [74] 0x0000025b6a139190 SDChunk: "vkAllocateMemory" (1003) SDChunk *
+ [75] 0x0000025b6a139240 SDChunk: "vkBindImageMemory" (1043) SDChunk *
+ [76] 0x0000025b6a137090 SDChunk: "vkCreateImageView" (1016) SDChunk *
+ [77] 0x0000025b6a136b10 SDChunk: "vkCreateFramebuffer" (1009) SDChunk *
+ [78] 0x0000025b6a1376c0 SDChunk: "vkCreateImage" (1015) SDChunk *
+ [79] 0x0000025b6a1372a0 SDChunk: "vkAllocateMemory" (1003) SDChunk *
+ [80] 0x0000025b6a1374b0 SDChunk: "vkBindImageMemory" (1043) SDChunk *
+ [81] 0x0000025b6a137560 SDChunk: "vkCreateImageView" (1016) SDChunk *
+ [82] 0x0000025b6a137770 SDChunk: "vkCreateImage" (1015) SDChunk *
+ [83] 0x0000025b6a1378d0 SDChunk: "vkAllocateMemory" (1003) SDChunk *
+ [84] 0x0000025b6a139a80 SDChunk: "vkBindImageMemory" (1043) SDChunk *
+ [85] 0x0000025b6a139b30 SDChunk: "vkCreateImageView" (1016) SDChunk *
+ [86] 0x0000025b6a139be0 SDChunk: "vkCreateFramebuffer" (1009) SDChunk *
+ [87] 0x0000025b6a13a790 SDChunk: "vkCreateDescriptorSetLayout" (1012) SDChunk *
+ [88] 0x0000025b6a139660 SDChunk: "vkCreatePipelineLayout" (1020) SDChunk *
+ [89] 0x0000025b6a13a2c0 SDChunk: "vkCreateDescriptorSetLayout" (1012) SDChunk *
+ [90] 0x0000025b6a1397c0 SDChunk: "vkCreatePipelineLayout" (1020) SDChunk *
+ [91] 0x0000025b6a13a370 SDChunk: "vkCreateShaderModule" (1019) SDChunk *
+ [92] 0x0000025b6a139710 SDChunk: "vkCreateShaderModule" (1019) SDChunk *
+ [93] 0x0000025b6a13a840 SDChunk: "vkCreateGraphicsPipelines" (1022) SDChunk *
+ [94] 0x0000025b6a139df0 SDChunk: "vkCreateGraphicsPipelines" (1022) SDChunk *
+ [95] 0x0000025b6a139ea0 SDChunk: "vkCreateShaderModule" (1019) SDChunk *
+ [96] 0x0000025b6a139f50 SDChunk: "vkCreateShaderModule" (1019) SDChunk *
+ [97] 0x0000025b6a13a000 SDChunk: "vkCreateGraphicsPipelines" (1022) SDChunk *
+ [98] 0x0000025b6a13a4d0 SDChunk: "vkCreateShaderModule" (1019) SDChunk *
+ [99] 0x0000025b6a1395b0 SDChunk: "vkCreateShaderModule" (1019) SDChunk *
+ [100] 0x0000025b6a13a0b0 SDChunk: "vkCreateGraphicsPipelines" (1022) SDChunk *
+ [101] 0x0000025b6a13a160 SDChunk: "vkCreateShaderModule" (1019) SDChunk *
+ [102] 0x0000025b6a13a420 SDChunk: "vkCreateShaderModule" (1019) SDChunk *
+ [103] 0x0000025b6a13a210 SDChunk: "vkCreateGraphicsPipelines" (1022) SDChunk *
+ [104] 0x0000025b6a139870 SDChunk: "vkCreateDescriptorPool" (1011) SDChunk *
+ [105] 0x0000025b6a13a630 SDChunk: "vkAllocateDescriptorSets" (1035) SDChunk *
+ [106] 0x0000025b6a13a6e0 SDChunk: "vkAllocateDescriptorSets" (1035) SDChunk *
+ [107] 0x0000025b6a139920 SDChunk: "vkAllocateDescriptorSets" (1035) SDChunk *
+ [108] 0x0000025b6a1399d0 SDChunk: "vkAllocateDescriptorSets" (1035) SDChunk *
+ [109] 0x0000025b6a216ed0 SDChunk: "vkCreateBuffer" (1013) SDChunk *
+ [110] 0x0000025b6a2173a0 SDChunk: "vkAllocateMemory" (1003) SDChunk *
+ [111] 0x0000025b6a217030 SDChunk: "vkBindBufferMemory" (1042) SDChunk *
+ [112] 0x0000025b6a217d40 SDChunk: "vkCreateBuffer" (1013) SDChunk *
+ [113] 0x0000025b6a218630 SDChunk: "vkAllocateMemory" (1003) SDChunk *
+ [114] 0x0000025b6a218bb0 SDChunk: "vkBindBufferMemory" (1042) SDChunk *
+ [115] 0x0000025b6a217190 SDChunk: "Internal::Initial Contents" (3) SDChunk *
+ [116] 0x0000025b6a217870 SDChunk: "Internal::Initial Contents" (3) SDChunk *
+ [117] 0x0000025b6a218b00 SDChunk: "Internal::Initial Contents" (3) SDChunk *
+ [118] 0x0000025b6a2170e0 SDChunk: "Internal::Initial Contents" (3) SDChunk *
+ [119] 0x0000025b6a2184d0 SDChunk: "Internal::Initial Contents" (3) SDChunk *
+ [120] 0x0000025b6a217b30 SDChunk: "Internal::Initial Contents" (3) SDChunk *
+ [121] 0x0000025b6a217450 SDChunk: "Internal::Initial Contents" (3) SDChunk *
+ [122] 0x0000025b6a217c90 SDChunk: "Internal::Initial Contents" (3) SDChunk *
+ [123] 0x0000025b6a218000 SDChunk: "Internal::Initial Contents" (3) SDChunk *
+ [124] 0x0000025b6a217500 SDChunk: "Internal::Initial Contents" (3) SDChunk *
+ [125] 0x0000025b6a218370 SDChunk: "Internal::Initial Contents" (3) SDChunk *
+ [126] 0x0000025b6a217a80 SDChunk: "Internal::Initial Contents" (3) SDChunk *
+ [127] 0x0000025b6a2180b0 SDChunk: "Internal::Initial Contents" (3) SDChunk *
+ [128] 0x0000025b6a2189a0 SDChunk: "Internal::Initial Contents" (3) SDChunk *
+ [129] 0x0000025b6a2179d0 SDChunk: "Internal::Initial Contents" (3) SDChunk *
+ [130] 0x0000025b6a218790 SDChunk: "Internal::Initial Contents" (3) SDChunk *
+ [131] 0x0000025b6a217920 SDChunk: "Internal::Initial Contents" (3) SDChunk *
+ [132] 0x0000025b6a218d10 SDChunk: "Internal::Initial Contents" (3) SDChunk *
+ [133] 0x0000025b6a216f80 SDChunk: "Internal::Initial Contents" (3) SDChunk *
+ [134] 0x0000025b76839f50 SDChunk: "Internal::Initial Contents" (3) SDChunk *
+ [135] 0x0000025b7683adc0 SDChunk: "Internal::Initial Contents" (3) SDChunk *
+ [136] 0x0000025b7683b550 SDChunk: "Internal::List of Initial Contents Resources" (2) SDChunk *
+ [137] 0x0000025b7683a580 SDChunk: "Internal::Device Memory References" (1132) SDChunk *
+ [138] 0x0000025b7683ae70 SDChunk: "Internal::Frame Metadata" (5) SDChunk *
+ [139] 0x0000025b7683bc30 SDChunk: "Internal::Beginning of Capture" (4) SDChunk *
+ [140] 0x0000025b7683bce0 SDChunk: "vkBeginCommandBuffer" (1037) SDChunk *
+ [141] 0x0000025b7683bd90 SDChunk: "vkCmdSetViewport" (1050) SDChunk *
+ [142] 0x0000025b76839ea0 SDChunk: "vkCmdSetScissor" (1051) SDChunk *
+ [143] 0x0000025b7683af20 SDChunk: "vkCmdBeginRenderPass" (1045) SDChunk *
+ [144] 0x0000025b7683a160 SDChunk: "vkCmdBindDescriptorSets" (1059) SDChunk *
+ [145] 0x0000025b7683a4d0 SDChunk: "vkCmdBindPipeline" (1049) SDChunk *
+ [146] 0x0000025b7683a6e0 SDChunk: "vkCmdBindVertexBuffers" (1060) SDChunk *
+ [147] 0x0000025b7683a210 SDChunk: "vkCmdBindIndexBuffer" (1061) SDChunk *
+ [148] 0x0000025b69c1d9b0 SDChunk: "vkCmdDrawIndexed" (1085) SDChunk *
+ [149] 0x0000025b69c1db10 SDChunk: "vkCmdDrawIndexed" (1085) SDChunk *
+ [150] 0x0000025b69c1d640 SDChunk: "vkCmdDrawIndexed" (1085) SDChunk *
+ [151] 0x0000025b69c1d590 SDChunk: "vkCmdDrawIndexed" (1085) SDChunk *
+ [152] 0x0000025b69c1d380 SDChunk: "vkCmdDrawIndexed" (1085) SDChunk *
+ [153] 0x0000025b69c1ce00 SDChunk: "vkCmdDrawIndexed" (1085) SDChunk *
+ [154] 0x0000025b69c1d6f0 SDChunk: "vkCmdDrawIndexed" (1085) SDChunk *
+ [155] 0x0000025b69c1ceb0 SDChunk: "vkCmdDrawIndexed" (1085) SDChunk *
+ [156] 0x0000025b69c1cf60 SDChunk: "vkCmdDrawIndexed" (1085) SDChunk *
+ [157] 0x0000025b69c1d850 SDChunk: "vkCmdDrawIndexed" (1085) SDChunk *
+ [158] 0x0000025b69c1d010 SDChunk: "vkCmdDrawIndexed" (1085) SDChunk *
+ [159] 0x0000025b69c1d170 SDChunk: "vkCmdDrawIndexed" (1085) SDChunk *
+ [160] 0x0000025b69c1d220 SDChunk: "vkCmdDrawIndexed" (1085) SDChunk *
+ [161] 0x0000025b76903800 SDChunk: "vkCmdDrawIndexed" (1085) SDChunk *
+ [162] 0x0000025b74cdd6c0 SDChunk: "vkCmdDrawIndexed" (1085) SDChunk *
+ [163] 0x0000025b74cddc40 SDChunk: "vkCmdDrawIndexed" (1085) SDChunk *
+ [164] 0x0000025b74cddcf0 SDChunk: "vkCmdDrawIndexed" (1085) SDChunk *
+ [165] 0x0000025b74cdce80 SDChunk: "vkCmdDrawIndexed" (1085) SDChunk *
+ [166] 0x0000025b74cdd820 SDChunk: "vkCmdDrawIndexed" (1085) SDChunk *
+ [167] 0x0000025b74cdd8d0 SDChunk: "vkCmdDrawIndexed" (1085) SDChunk *
+ [168] 0x0000025b74cdd090 SDChunk: "vkCmdDrawIndexed" (1085) SDChunk *
+ [169] 0x0000025b74cdcf30 SDChunk: "vkCmdDrawIndexed" (1085) SDChunk *
+ [170] 0x0000025b74cdd980 SDChunk: "vkCmdDrawIndexed" (1085) SDChunk *
+ [171] 0x0000025b74cdda30 SDChunk: "vkCmdDrawIndexed" (1085) SDChunk *
+ [172] 0x0000025b74cdd140 SDChunk: "vkCmdDrawIndexed" (1085) SDChunk *
+ [173] 0x0000025b74cdcfe0 SDChunk: "vkCmdDrawIndexed" (1085) SDChunk *
+ [174] 0x0000025b74cddae0 SDChunk: "vkCmdDrawIndexed" (1085) SDChunk *
+ [175] 0x0000025b74cdcd20 SDChunk: "vkCmdDrawIndexed" (1085) SDChunk *
+ [176] 0x0000025b74cdcdd0 SDChunk: "vkCmdDrawIndexed" (1085) SDChunk *
+ [177] 0x0000025b74cddb90 SDChunk: "vkCmdDrawIndexed" (1085) SDChunk *
+ [178] 0x0000025b74cdcc70 SDChunk: "vkCmdDrawIndexed" (1085) SDChunk *
+ [179] 0x0000025b74cdd1f0 SDChunk: "vkCmdDrawIndexed" (1085) SDChunk *
+ [180] 0x0000025b74cddda0 SDChunk: "vkCmdDrawIndexed" (1085) SDChunk *
+ [181] 0x0000025b74cdd770 SDChunk: "vkCmdDrawIndexed" (1085) SDChunk *
+ [182] 0x0000025b74cdd2a0 SDChunk: "vkCmdDrawIndexed" (1085) SDChunk *
+ [183] 0x0000025b74cdde50 SDChunk: "vkCmdDrawIndexed" (1085) SDChunk *
+ [184] 0x0000025b74cddf00 SDChunk: "vkCmdDrawIndexed" (1085) SDChunk *
+ [185] 0x0000025b74cdd350 SDChunk: "vkCmdDrawIndexed" (1085) SDChunk *
+ [186] 0x0000025b74cdd4b0 SDChunk: "vkCmdDrawIndexed" (1085) SDChunk *
+ [187] 0x0000025b74cdd400 SDChunk: "vkCmdDrawIndexed" (1085) SDChunk *
+ [188] 0x0000025b74cdd560 SDChunk: "vkCmdDrawIndexed" (1085) SDChunk *
+ [189] 0x0000025b74cdd610 SDChunk: "vkCmdDrawIndexed" (1085) SDChunk *
+ [190] 0x0000025b74cdcb10 SDChunk: "vkCmdDrawIndexed" (1085) SDChunk *
+ [191] 0x0000025b74cdb7d0 SDChunk: "vkCmdDrawIndexed" (1085) SDChunk *
+ [192] 0x0000025b74cdaac0 SDChunk: "vkCmdDrawIndexed" (1085) SDChunk *
+ [193] 0x0000025b74cdc220 SDChunk: "vkCmdDrawIndexed" (1085) SDChunk *
+ [194] 0x0000025b74cdbb40 SDChunk: "vkCmdDrawIndexed" (1085) SDChunk *
+ [195] 0x0000025b74cdb1a0 SDChunk: "vkCmdDrawIndexed" (1085) SDChunk *
+ [196] 0x0000025b74cda6a0 SDChunk: "vkCmdDrawIndexed" (1085) SDChunk *
+ [197] 0x0000025b74cdcbc0 SDChunk: "vkCmdDrawIndexed" (1085) SDChunk *
+ [198] 0x0000025b74cdc010 SDChunk: "vkCmdDrawIndexed" (1085) SDChunk *
+ [199] 0x0000025b74cdc170 SDChunk: "vkCmdDrawIndexed" (1085) SDChunk *
+ [200] 0x0000025b74cdad80 SDChunk: "vkCmdDrawIndexed" (1085) SDChunk *
+ [201] 0x0000025b74cdb880 SDChunk: "vkCmdDrawIndexed" (1085) SDChunk *
+ [202] 0x0000025b74cdc900 SDChunk: "vkCmdDrawIndexed" (1085) SDChunk *
+ [203] 0x0000025b74cdaa10 SDChunk: "vkCmdDrawIndexed" (1085) SDChunk *
+ [204] 0x0000025b74cdc430 SDChunk: "vkCmdDrawIndexed" (1085) SDChunk *
+ [205] 0x0000025b74cdc0c0 SDChunk: "vkCmdDrawIndexed" (1085) SDChunk *
+ [206] 0x0000025b74cdae30 SDChunk: "vkCmdDrawIndexed" (1085) SDChunk *
+ [207] 0x0000025b74cdc4e0 SDChunk: "vkCmdDrawIndexed" (1085) SDChunk *
+ [208] 0x0000025b74cdbf60 SDChunk: "vkCmdDrawIndexed" (1085) SDChunk *
+ [209] 0x0000025b74cdbeb0 SDChunk: "vkCmdDrawIndexed" (1085) SDChunk *
+ [210] 0x0000025b74cdc380 SDChunk: "vkCmdDrawIndexed" (1085) SDChunk *
+ [211] 0x0000025b74cda1d0 SDChunk: "vkCmdDrawIndexed" (1085) SDChunk *
+ [212] 0x0000025b74cdb3b0 SDChunk: "vkCmdDrawIndexed" (1085) SDChunk *
+ [213] 0x0000025b74cdab70 SDChunk: "vkCmdDrawIndexed" (1085) SDChunk *
+ [214] 0x0000025b74cdb9e0 SDChunk: "vkCmdDrawIndexed" (1085) SDChunk *
+ [215] 0x0000025b74cdb040 SDChunk: "vkCmdDrawIndexed" (1085) SDChunk *
+ [216] 0x0000025b74cdc590 SDChunk: "vkCmdDrawIndexed" (1085) SDChunk *
+ [217] 0x0000025b74cdb930 SDChunk: "vkCmdDrawIndexed" (1085) SDChunk *
+ [218] 0x0000025b74cda490 SDChunk: "vkCmdDrawIndexed" (1085) SDChunk *
+ [219] 0x0000025b74cdb300 SDChunk: "vkCmdDrawIndexed" (1085) SDChunk *
+ [220] 0x0000025b74cdc9b0 SDChunk: "vkCmdDrawIndexed" (1085) SDChunk *
+ [221] 0x0000025b74cda3e0 SDChunk: "vkCmdDrawIndexed" (1085) SDChunk *
+ [222] 0x0000025b74cdc6f0 SDChunk: "vkCmdEndRenderPass" (1048) SDChunk *
+ [223] 0x0000025b74cda750 SDChunk: "vkCmdBeginRenderPass" (1045) SDChunk *
+ [224] 0x0000025b74cdaee0 SDChunk: "vkCmdBindDescriptorSets" (1059) SDChunk *
+ [225] 0x0000025b74cdca60 SDChunk: "vkCmdBindPipeline" (1049) SDChunk *
+ [226] 0x0000025b74cdba90 SDChunk: "vkCmdDraw" (1083) SDChunk *
+ [227] 0x0000025b74cdb510 SDChunk: "vkCmdEndRenderPass" (1048) SDChunk *
+ [228] 0x0000025b74cdc640 SDChunk: "vkCmdBeginRenderPass" (1045) SDChunk *
+ [229] 0x0000025b74cda070 SDChunk: "vkCmdSetViewport" (1050) SDChunk *
+ [230] 0x0000025b74cdbbf0 SDChunk: "vkCmdSetScissor" (1051) SDChunk *
+ [231] 0x0000025b74cdc7a0 SDChunk: "vkCmdBindDescriptorSets" (1059) SDChunk *
+ [232] 0x0000025b74cdb5c0 SDChunk: "vkCmdBindPipeline" (1049) SDChunk *
+ [233] 0x0000025b74cda5f0 SDChunk: "vkCmdBindVertexBuffers" (1060) SDChunk *
+ [234] 0x0000025b74cdc850 SDChunk: "vkCmdBindIndexBuffer" (1061) SDChunk *
+ [235] 0x0000025b74cda120 SDChunk: "vkCmdDrawIndexed" (1085) SDChunk *
+ [236] 0x0000025b74cda800 SDChunk: "vkCmdBindDescriptorSets" (1059) SDChunk *
+ [237] 0x0000025b74cdb670 SDChunk: "vkCmdBindPipeline" (1049) SDChunk *
+ [238] 0x0000025b74cdb720 SDChunk: "vkCmdBindVertexBuffers" (1060) SDChunk *
+ [239] 0x0000025b74cdaf90 SDChunk: "vkCmdBindIndexBuffer" (1061) SDChunk *
+ [240] 0x0000025b74cdb250 SDChunk: "vkCmdDrawIndexed" (1085) SDChunk *
+ [241] 0x0000025b74cdbca0 SDChunk: "vkCmdDrawIndexed" (1085) SDChunk *
+ [242] 0x0000025b74cda280 SDChunk: "vkCmdDrawIndexed" (1085) SDChunk *
+ [243] 0x0000025b74cdb0f0 SDChunk: "vkCmdDrawIndexed" (1085) SDChunk *
+ [244] 0x0000025b74cdb460 SDChunk: "vkCmdDrawIndexed" (1085) SDChunk *
+ [245] 0x0000025b74cdbd50 SDChunk: "vkCmdDrawIndexed" (1085) SDChunk *
+ [246] 0x0000025b74cdac20 SDChunk: "vkCmdDrawIndexed" (1085) SDChunk *
+ [247] 0x0000025b74cdbe00 SDChunk: "vkCmdDrawIndexed" (1085) SDChunk *
+ [248] 0x0000025b74cda540 SDChunk: "vkCmdDrawIndexed" (1085) SDChunk *
+ [249] 0x0000025b74cda330 SDChunk: "vkCmdDrawIndexed" (1085) SDChunk *
+ [250] 0x0000025b74cda8b0 SDChunk: "vkCmdDrawIndexed" (1085) SDChunk *
+ [251] 0x0000025b74cdc2d0 SDChunk: "vkCmdDrawIndexed" (1085) SDChunk *
+ [252] 0x0000025b74cda960 SDChunk: "vkCmdDrawIndexed" (1085) SDChunk *
+ [253] 0x0000025b74cdacd0 SDChunk: "vkCmdDrawIndexed" (1085) SDChunk *
+ [254] 0x0000025b74ce09c0 SDChunk: "vkCmdDrawIndexed" (1085) SDChunk *
+ [255] 0x0000025b74cdeef0 SDChunk: "vkCmdDrawIndexed" (1085) SDChunk *
+ [256] 0x0000025b74ce0860 SDChunk: "vkCmdDrawIndexed" (1085) SDChunk *
+ [257] 0x0000025b74cde290 SDChunk: "vkCmdDrawIndexed" (1085) SDChunk *
+ [258] 0x0000025b74cdf050 SDChunk: "vkCmdDrawIndexed" (1085) SDChunk *
+ [259] 0x0000025b74cde340 SDChunk: "vkCmdDrawIndexed" (1085) SDChunk *
+ [260] 0x0000025b74cde600 SDChunk: "vkCmdDrawIndexed" (1085) SDChunk *
+ [261] 0x0000025b74cdf7e0 SDChunk: "vkCmdDrawIndexed" (1085) SDChunk *
+ [262] 0x0000025b74ce00d0 SDChunk: "vkCmdDrawIndexed" (1085) SDChunk *
+ [263] 0x0000025b74ce0a70 SDChunk: "vkCmdDrawIndexed" (1085) SDChunk *
+ [264] 0x0000025b74cdee40 SDChunk: "vkCmdDrawIndexed" (1085) SDChunk *
+ [265] 0x0000025b74ce0020 SDChunk: "vkCmdDrawIndexed" (1085) SDChunk *
+ [266] 0x0000025b74cdead0 SDChunk: "vkCmdDrawIndexed" (1085) SDChunk *
+ [267] 0x0000025b74cdf9f0 SDChunk: "vkCmdDrawIndexed" (1085) SDChunk *
+ [268] 0x0000025b74cdeb80 SDChunk: "vkCmdDrawIndexed" (1085) SDChunk *
+ [269] 0x0000025b74cdfd60 SDChunk: "vkCmdDrawIndexed" (1085) SDChunk *
+ [270] 0x0000025b74ce0440 SDChunk: "vkCmdDrawIndexed" (1085) SDChunk *
+ [271] 0x0000025b74cdf260 SDChunk: "vkCmdDrawIndexed" (1085) SDChunk *
+ [272] 0x0000025b74cdf890 SDChunk: "vkCmdDrawIndexed" (1085) SDChunk *
+ [273] 0x0000025b74cde6b0 SDChunk: "vkCmdDrawIndexed" (1085) SDChunk *
+ [274] 0x0000025b74cde3f0 SDChunk: "vkCmdDrawIndexed" (1085) SDChunk *
+ [275] 0x0000025b74cdfaa0 SDChunk: "vkCmdDrawIndexed" (1085) SDChunk *
+ [276] 0x0000025b74ce0180 SDChunk: "vkCmdDrawIndexed" (1085) SDChunk *
+ [277] 0x0000025b74cdff70 SDChunk: "vkCmdDrawIndexed" (1085) SDChunk *
+ [278] 0x0000025b74cde970 SDChunk: "vkCmdDrawIndexed" (1085) SDChunk *
+ [279] 0x0000025b74cdf310 SDChunk: "vkCmdDrawIndexed" (1085) SDChunk *
+ [280] 0x0000025b74cde4a0 SDChunk: "vkCmdDrawIndexed" (1085) SDChunk *
+ [281] 0x0000025b74ce0b20 SDChunk: "vkCmdDrawIndexed" (1085) SDChunk *
+ [282] 0x0000025b74cde550 SDChunk: "vkCmdDrawIndexed" (1085) SDChunk *
+ [283] 0x0000025b74ce0bd0 SDChunk: "vkCmdDrawIndexed" (1085) SDChunk *
+ [284] 0x0000025b74cde1e0 SDChunk: "vkCmdDrawIndexed" (1085) SDChunk *
+ [285] 0x0000025b74cdfec0 SDChunk: "vkCmdDrawIndexed" (1085) SDChunk *
+ [286] 0x0000025b74cdfe10 SDChunk: "vkCmdDrawIndexed" (1085) SDChunk *
+ [287] 0x0000025b74cdf3c0 SDChunk: "vkCmdDrawIndexed" (1085) SDChunk *
+ [288] 0x0000025b74cde760 SDChunk: "vkCmdDrawIndexed" (1085) SDChunk *
+ [289] 0x0000025b74cde810 SDChunk: "vkCmdDrawIndexed" (1085) SDChunk *
+ [290] 0x0000025b74cde8c0 SDChunk: "vkCmdDrawIndexed" (1085) SDChunk *
+ [291] 0x0000025b74cdf940 SDChunk: "vkCmdDrawIndexed" (1085) SDChunk *
+ [292] 0x0000025b74ce0230 SDChunk: "vkCmdDrawIndexed" (1085) SDChunk *
+ [293] 0x0000025b74cde080 SDChunk: "vkCmdDrawIndexed" (1085) SDChunk *
+ [294] 0x0000025b74cdefa0 SDChunk: "vkCmdDrawIndexed" (1085) SDChunk *
+ [295] 0x0000025b74ce02e0 SDChunk: "vkCmdDrawIndexed" (1085) SDChunk *
+ [296] 0x0000025b74cdec30 SDChunk: "vkCmdDrawIndexed" (1085) SDChunk *
+ [297] 0x0000025b74cdfb50 SDChunk: "vkCmdDrawIndexed" (1085) SDChunk *
+ [298] 0x0000025b74cdece0 SDChunk: "vkCmdDrawIndexed" (1085) SDChunk *
+ [299] 0x0000025b74ce0390 SDChunk: "vkCmdDrawIndexed" (1085) SDChunk *
+ [300] 0x0000025b74ce04f0 SDChunk: "vkCmdDrawIndexed" (1085) SDChunk *
+ [301] 0x0000025b74ce05a0 SDChunk: "vkCmdDrawIndexed" (1085) SDChunk *
+ [302] 0x0000025b74cded90 SDChunk: "vkCmdDrawIndexed" (1085) SDChunk *
+ [303] 0x0000025b74cdfc00 SDChunk: "vkCmdDrawIndexed" (1085) SDChunk *
+ [304] 0x0000025b74cdf5d0 SDChunk: "vkCmdDrawIndexed" (1085) SDChunk *
+ [305] 0x0000025b74cdf470 SDChunk: "vkCmdDrawIndexed" (1085) SDChunk *
+ [306] 0x0000025b74cdfcb0 SDChunk: "vkCmdDrawIndexed" (1085) SDChunk *
+ [307] 0x0000025b74cdf520 SDChunk: "vkCmdDrawIndexed" (1085) SDChunk *
+ [308] 0x0000025b74ce0650 SDChunk: "vkCmdDrawIndexed" (1085) SDChunk *
+ [309] 0x0000025b74cde130 SDChunk: "vkCmdDrawIndexed" (1085) SDChunk *
+ [310] 0x0000025b74cdf1b0 SDChunk: "vkCmdDrawIndexed" (1085) SDChunk *
+ [311] 0x0000025b74ce0700 SDChunk: "vkCmdDrawIndexed" (1085) SDChunk *
+ [312] 0x0000025b74cdea20 SDChunk: "vkCmdDrawIndexed" (1085) SDChunk *
+ [313] 0x0000025b74ce07b0 SDChunk: "vkCmdDrawIndexed" (1085) SDChunk *
+ [314] 0x0000025b74cdf100 SDChunk: "vkCmdDrawIndexed" (1085) SDChunk *
+ [315] 0x0000025b74cdf680 SDChunk: "vkCmdDrawIndexed" (1085) SDChunk *
+ [316] 0x0000025b74cdf730 SDChunk: "vkCmdDrawIndexed" (1085) SDChunk *
+ [317] 0x0000025b74ce0910 SDChunk: "vkCmdBindDescriptorSets" (1059) SDChunk *
+ [318] 0x0000025b74ce16d0 SDChunk: "vkCmdBindPipeline" (1049) SDChunk *
+ [319] 0x0000025b74ce1360 SDChunk: "vkCmdDraw" (1083) SDChunk *
+ [320] 0x0000025b74ce1e60 SDChunk: "vkCmdSetViewport" (1050) SDChunk *
+ [321] 0x0000025b74ce1f10 SDChunk: "vkCmdSetScissor" (1051) SDChunk *
+ [322] 0x0000025b74ce1ba0 SDChunk: "vkCmdBindPipeline" (1049) SDChunk *
+ [323] 0x0000025b74ce0c80 SDChunk: "vkCmdBindDescriptorSets" (1059) SDChunk *
+ [324] 0x0000025b74ce12b0 SDChunk: "vkCmdPushConstants" (1070) SDChunk *
+ [325] 0x0000025b74ce1410 SDChunk: "vkCmdBindVertexBuffers" (1060) SDChunk *
+ [326] 0x0000025b74ce10a0 SDChunk: "vkCmdBindIndexBuffer" (1061) SDChunk *
+ [327] 0x0000025b74ce1620 SDChunk: "vkCmdSetScissor" (1051) SDChunk *
+ [328] 0x0000025b74ce1150 SDChunk: "vkCmdDrawIndexed" (1085) SDChunk *
+ [329] 0x0000025b74ce1c50 SDChunk: "vkCmdSetScissor" (1051) SDChunk *
+ [330] 0x0000025b74ce1830 SDChunk: "vkCmdDrawIndexed" (1085) SDChunk *
+ [331] 0x0000025b74ce14c0 SDChunk: "vkCmdEndRenderPass" (1048) SDChunk *
+ [332] 0x0000025b74ce0de0 SDChunk: "vkEndCommandBuffer" (1038) SDChunk *
+ [333] 0x0000025b74ce1200 SDChunk: "vkQueueWaitIdle" (1039) SDChunk *
+ [334] 0x0000025b74ce0e90 SDChunk: "vkFlushMappedMemoryRanges" (1005) SDChunk *
+ [335] 0x0000025b74ce1570 SDChunk: "vkFlushMappedMemoryRanges" (1005) SDChunk *
+ [336] 0x0000025b74ce1780 SDChunk: "Internal::Coherent Mapped Memory Write" (1152) SDChunk *
+ [337] 0x0000025b74ce18e0 SDChunk: "Internal::Coherent Mapped Memory Write" (1152) SDChunk *
+ [338] 0x0000025b74ce1990 SDChunk: "Internal::Coherent Mapped Memory Write" (1152) SDChunk *
+ [339] 0x0000025b74ce1a40 SDChunk: "Internal::Coherent Mapped Memory Write" (1152) SDChunk *
+ [340] 0x0000025b74ce1af0 SDChunk: "Internal::Coherent Mapped Memory Write" (1152) SDChunk *
+ [341] 0x0000025b74ce1d00 SDChunk: "vkQueueSubmit" (1041) SDChunk *
+ [342] 0x0000025b74ce1db0 SDChunk: "vkQueuePresentKHR" (1139) SDChunk *
+ [343] 0x0000025b74ce0f40 SDChunk: "Internal::End of Capture" (6) SDChunk *
+ [Raw View] {...} StructuredChunkList
+ buffers { size=0 } StructuredBufferList
version 21 unsigned __int64
Textual representation of a draw call:
- [148] 0x0000025b69c1d9b0 SDChunk: "vkCmdDrawIndexed" (1085) SDChunk *
+ metadata {chunkID=1085 flags=NoFlags (0) length=36 ...} SDChunkMetaData
[size] 7 unsigned __int64
+ [0] 0x0000025b74c7acd0 "commandBuffer" = {id=178 } SDObject *
+ [1] 0x0000025b74c7b7b0 "indexCount" = 6996 SDObject *
+ [2] 0x0000025b74c7b8d0 "instanceCount" = 1 SDObject *
+ [3] 0x0000025b74c7ad30 "firstIndex" = 0 SDObject *
+ [4] 0x0000025b74c7a190 "vertexOffset" = 0 SDObject *
+ [5] 0x0000025b74c7a130 "firstInstance" = 0 SDObject *
+ [6] 0x0000025b74c7a1f0 "DebugMessages" = "DebugMessage"[] SDObject *
+ [Raw View] 0x0000025b69c1d9b0 {metadata={chunkID=1085 flags=NoFlags (0) length=36 ...} } SDChunk *
We probably see this id=178
first time in vkAllocateCommandBuffers
:
- [15] 0x0000025b76903ee0 SDChunk: "vkAllocateCommandBuffers" (1008) SDChunk *
+ metadata {chunkID=1008 flags=NoFlags (0) length=37 ...} SDChunkMetaData
[size] 3 unsigned __int64
+ [0] 0x0000025b6a1d4460 "device" = {id=12 } SDObject *
+ [1] 0x0000025b6a1d4100 SDObject: "VkCommandBufferAllocateInfo" "AllocateInfo" SDObject *
+ [2] 0x0000025b6a1d5600 "CommandBuffer" = {id=178 } SDObject *
+ [Raw View] 0x0000025b76903ee0 {metadata={chunkID=1008 flags=NoFlags (0) length=37 ...} } SDChunk *
There is some resource managers that tracks dependencies, see renderdoc\renderdoc\driver\vulkan\vk_core.cpp
:
void WrappedVulkan::StartFrameCapture(DeviceOwnedWindow devWnd)
{
...
GetResourceManager()->ClearReferencedResources();
GetResourceManager()->ClearReferencedMemory();
...
GetResourceManager()->MarkResourceFrameReferenced(GetResID(m_Instance), eFrameRef_Read);
GetResourceManager()->MarkResourceFrameReferenced(GetResID(m_Device), eFrameRef_Read);
GetResourceManager()->MarkResourceFrameReferenced(GetResID(m_Queue), eFrameRef_Read);
rdcarray<VkResourceRecord *> forced = GetForcedReferences();
// Note we force read-before-write because this resource is implicitly untracked so we have no
// way of knowing how it's used
for(auto it = forced.begin(); it != forced.end(); ++it)
{
// reference the buffer
GetResourceManager()->MarkResourceFrameReferenced((*it)->GetResourceID(), eFrameRef_Read);
// and its backing memory
GetResourceManager()->MarkMemoryFrameReferenced((*it)->baseResource, (*it)->memOffset,
(*it)->memSize, eFrameRef_ReadBeforeWrite);
}
}
.rdc
file is created from WrappedVulkan::EndFrameCapture
function:
RDCFile *rdc =
RenderDoc::Inst().CreateRDC(RDCDriver::Vulkan, m_CapturedFrames.back().frameNumber, fp);
StreamWriter *captureWriter = NULL;
if(rdc)
{
SectionProperties props;
// Compress with LZ4 so that it's fast
props.flags = SectionFlags::LZ4Compressed;
props.version = m_SectionVersion;
props.type = SectionType::FrameCapture;
captureWriter = rdc->WriteSection(props);
}
else
{
captureWriter = new StreamWriter(StreamWriter::InvalidStream);
}
Resource manager usage and SystemChunk::CaptureScope
:
RDCDEBUG("Inserting Resource Serialisers");
GetResourceManager()->InsertReferencedChunks(ser);
GetResourceManager()->InsertInitialContentsChunks(ser);
RDCDEBUG("Creating Capture Scope");
GetResourceManager()->Serialise_InitialContentsNeeded(ser);
GetResourceManager()->InsertDeviceMemoryRefs(ser);
{
SCOPED_SERIALISE_CHUNK(SystemChunk::CaptureScope, 16);
Serialise_CaptureScope(ser);
}
There are ResourceManager, RDC file and SDFile that are involved in the functionality I need to be implemented.