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

Method CreateMapping

qrenderdoc/Code/RGPInterop.cpp:253–298  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

251}
252
253void RGPInterop::CreateMapping(const rdcarray<ActionDescription> &actions)
254{
255 const SDFile &file = m_Ctx.GetStructuredFile();
256
257 for(const ActionDescription &action : actions)
258 {
259 for(const APIEvent &ev : action.events)
260 {
261 if(ev.chunkIndex == 0 || ev.chunkIndex == APIEvent::NoChunk ||
262 ev.chunkIndex >= file.chunks.size())
263 continue;
264
265 const SDChunk *chunk = file.chunks[ev.chunkIndex];
266
267 if(m_EventNames.contains(chunk->name, Qt::CaseSensitive))
268 {
269 m_Event2RGP[ev.eventId].interoplinearid = (uint32_t)m_RGP2Event.size();
270 rdcstr n = chunk->name;
271 if(n.contains(':'))
272 n.erase(0, n.find_last_of(":") + 1);
273 n += "(";
274 bool first = true;
275 for(size_t i = 0; i < chunk->NumChildren(); i++)
276 {
277 const SDObject *o = chunk->GetChild(i);
278 if(o->type.flags & SDTypeFlags::Important)
279 {
280 if(!first)
281 n += ", ";
282 first = false;
283 n += ToStr(o->AsUInt32());
284 }
285 }
286 n += ")";
287
288 m_Event2RGP[ev.eventId].eventname = n;
289
290 m_RGP2Event.push_back(ev.eventId);
291 }
292 }
293
294 // if we have children, step into them first before going to our next sibling
295 if(!action.children.empty())
296 CreateMapping(action.children);
297 }
298}
299
300void RGPInterop::CreateMapping(uint32_t version)
301{

Callers

nothing calls this directly

Calls 12

ToStrFunction · 0.85
find_last_ofMethod · 0.80
GetStructuredFileMethod · 0.45
sizeMethod · 0.45
containsMethod · 0.45
eraseMethod · 0.45
GetChildMethod · 0.45
push_backMethod · 0.45
emptyMethod · 0.45
isEmptyMethod · 0.45
resizeMethod · 0.45
GetLastActionMethod · 0.45

Tested by

no test coverage detected