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

Method setSparseFBLayerCount

modules/mpi/ospray/fb/DistributedFrameBuffer.cpp:224–242  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

222}
223
224void DistributedFrameBuffer::setSparseFBLayerCount(size_t numLayers)
225{
226 // Layer 0 is the base owned tiles layer created by the DFB, so we'll always
227 // have numLayers + 1 layers
228 layers.resize(numLayers + 1, nullptr);
229 // The sparse layers don't do accumulation and variance calculation because
230 // this needs data from all ranks rendering a given tile
231 const int channelFlags =
232 getChannelFlags() & ~(OSP_FB_ACCUM | OSP_FB_VARIANCE);
233 // Allocate any new layers that have been added to the DFB
234 for (size_t i = 1; i < layers.size(); ++i) {
235 if (!layers[i]) {
236 layers[i] = rkcommon::make_unique<SparseFrameBuffer>(
237 getISPCDevice(), size, getColorBufferFormat(), channelFlags);
238 }
239 }
240 for (auto &l : layers)
241 l->getSh()->super.targetFrames = getSh()->targetFrames;
242}
243
244size_t DistributedFrameBuffer::getSparseLayerCount() const
245{

Callers 1

renderFrameMethod · 0.80

Calls 2

getShMethod · 0.80
sizeMethod · 0.45

Tested by

no test coverage detected