MCPcopy Create free account
hub / github.com/NVIDIAGameWorks/Falcor / startEvent

Method startEvent

Source/Falcor/Utils/Timing/Profiler.cpp:320–348  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

318}
319
320void Profiler::startEvent(RenderContext* pRenderContext, const std::string& name, Flags flags)
321{
322 if (mEnabled && is_set(flags, Flags::Internal))
323 {
324 // '/' is used as a "path delimiter", so it cannot be used in the event name.
325 if (name.find('/') != std::string::npos)
326 {
327 logWarning("Profiler event names must not contain '/'. Ignoring this profiler event.");
328 return;
329 }
330
331 mCurrentEventName = mCurrentEventName + "/" + name;
332
333 Event* pEvent = getEvent(mCurrentEventName);
334 FALCOR_ASSERT(pEvent != nullptr);
335 if (!mPaused)
336 pEvent->start(*this, mFrameIndex);
337
338 if (std::find(mCurrentFrameEvents.begin(), mCurrentFrameEvents.end(), pEvent) == mCurrentFrameEvents.end())
339 {
340 mCurrentFrameEvents.push_back(pEvent);
341 }
342 }
343 if (is_set(flags, Flags::Pix))
344 {
345 FALCOR_ASSERT(pRenderContext);
346 pRenderContext->getLowLevelData()->beginDebugEvent(name.c_str());
347 }
348}
349
350void Profiler::endEvent(RenderContext* pRenderContext, const std::string& name, Flags flags)
351{

Callers 4

ScopedProfilerEventMethod · 0.80
enterMethod · 0.80
renderUIMethod · 0.80
renderUIMethod · 0.80

Calls 7

findFunction · 0.85
beginDebugEventMethod · 0.80
logWarningFunction · 0.50
startMethod · 0.45
beginMethod · 0.45
endMethod · 0.45
push_backMethod · 0.45

Tested by 1

renderUIMethod · 0.64