MCPcopy Create free account
hub / github.com/baldurk/renderdoc / exportFOZ

Method exportFOZ

qrenderdoc/Windows/PipelineState/VulkanPipelineStateViewer.cpp:5037–5350  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

5035}
5036
5037void VulkanPipelineStateViewer::exportFOZ(QString dir, ResourceId pso)
5038{
5039 enum
5040 {
5041 TagAppInfo = 0,
5042 TagSampler = 1,
5043 TagDescriptorSetLayout = 2,
5044 TagPipelineLayout = 3,
5045 TagShaderModule = 4,
5046 TagRenderPass = 5,
5047 TagGraphicsPipe = 6,
5048 TagComputePipe = 7,
5049 };
5050
5051 QDir d(dir);
5052
5053 const SDFile &sdfile = m_Ctx.GetStructuredFile();
5054
5055 const VKPipe::State *pipe = m_Ctx.CurVulkanPipelineState();
5056
5057 // enumerate all the parents of the pipeline, and cache the name of the first initialisation
5058 // chunk (easy way to find things by type)
5059 rdcarray<rdcpair<rdcstr, const ResourceDescription *>> resources;
5060
5061 {
5062 rdcarray<ResourceId> todo;
5063 rdcarray<ResourceId> done;
5064
5065 todo.push_back(pso);
5066
5067 while(!todo.empty())
5068 {
5069 ResourceId cur = todo.back();
5070 todo.pop_back();
5071
5072 const ResourceDescription *desc = m_Ctx.GetResource(cur);
5073 resources.push_back({sdfile.chunks[desc->initialisationChunks[0]]->name, desc});
5074 done.push_back(cur);
5075
5076 for(ResourceId parent : desc->parentResources)
5077 {
5078 if(!done.contains(parent))
5079 todo.push_back(parent);
5080 }
5081 }
5082 }
5083
5084 {
5085 const ResourceDescription *instance = NULL;
5086 const ResourceDescription *device = NULL;
5087
5088 for(size_t i = 0; i < resources.size(); i++)
5089 {
5090 if(resources[i].first == "vkCreateInstance")
5091 instance = resources[i].second;
5092 else if(resources[i].first == "vkCreateDevice")
5093 device = resources[i].second;
5094 }

Callers

nothing calls this directly

Calls 15

criticalFunction · 0.85
trFunction · 0.50
QByteArrayClass · 0.50
GetStructuredFileMethod · 0.45
push_backMethod · 0.45
emptyMethod · 0.45
backMethod · 0.45
pop_backMethod · 0.45
GetResourceMethod · 0.45
containsMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected