SpiecsEngine
 
Loading...
Searching...
No Matches

◆ ConsumeSample()

void Spices::NsightPerfGPUProfilerHUD::ConsumeSample ( )

Samples to be periodically fetched and processed by the sampler utility classes. Caveat: If this is not done, the sampler can fall into an irrecoverable state. Choose maxDecodeLatency to cover for a large-enough delay. Frame boundaries are recorded so that per-frame values, of e.g. draw call counts, can be shown as well as per-sample values.

Definition at line 126 of file NsightPerfGPUProfilerHUD.cpp.

127 {
129
130 if (!m_IsInSession) return;
131
132 const bool decoded = m_Sampler.DecodeCounters();
133 const bool consumed = m_Sampler.ConsumeSamples([&](
134 const uint8_t* pCounterDataImage ,
135 size_t counterDataImageSize ,
136 uint32_t rangeIndex ,
137 bool& stop
138 ) {
139 stop = false;
140 return m_HudDataModel.AddSample(pCounterDataImage, counterDataImageSize, rangeIndex);
141 });
142
143 for (const auto& frameDelimiter : m_Sampler.GetFrameDelimiters())
144 {
145 m_HudDataModel.AddFrameDelimiter(frameDelimiter.frameEndTime);
146 }
147
148 m_IsReachBufferBound = !decoded || !consumed;
149 }
#define SPICES_PROFILE_ZONE
nv::perf::sampler::PeriodicSamplerTimeHistoryVulkan m_Sampler
Sampler.
bool m_IsReachBufferBound
True if Decode and Consume failed.
nv::perf::hud::HudDataModel m_HudDataModel
HUD data.

References m_IsInSession, and m_IsReachBufferBound.