MCPcopy Create free account
hub / github.com/RenderKit/ospray / getRenderTaskIDs

Method getRenderTaskIDs

modules/cpu/fb/LocalFB.cpp:230–253  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

228}
229
230utility::ArrayView<uint32_t> LocalFrameBuffer::getRenderTaskIDs(
231 const float errorThreshold_, const uint32_t spp)
232{
233 if (accumulationFinished())
234 return utility::ArrayView<uint32_t>();
235
236 errorThreshold = errorThreshold_; // remember
237 if (errorThreshold > 0.0f && varianceFrameOp
238 && (getFrameID() >= minimumAdaptiveFrames(spp))) {
239 // Select render tasks that needs to be processed
240 auto last = std::copy_if(renderTaskIDs->begin(),
241 renderTaskIDs->end(),
242 activeTaskIDs->begin(),
243 [=](uint32_t i) {
244 return varianceFrameOp->getError(i) > errorThreshold;
245 });
246
247 activeTaskIDs->copyToDevice();
248 const size_t numActive = last - activeTaskIDs->begin();
249 return utility::ArrayView<uint32_t>(activeTaskIDs->devicePtr(), numActive);
250 } else
251 return utility::ArrayView<uint32_t>(
252 renderTaskIDs->devicePtr(), renderTaskIDs->size());
253}
254
255float LocalFrameBuffer::getVariance() const
256{

Callers 1

renderFrameMethod · 0.45

Calls 6

getErrorMethod · 0.80
copyToDeviceMethod · 0.80
devicePtrMethod · 0.80
beginMethod · 0.45
endMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected