| 222 | } |
| 223 | |
| 224 | void 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 | |
| 244 | size_t DistributedFrameBuffer::getSparseLayerCount() const |
| 245 | { |
no test coverage detected