| 74 | static SharedCache<SDFSBS::SharedData, Device*> sSharedCache; |
| 75 | |
| 76 | SDFSBS::SDFSBS(ref<Device> pDevice, uint32_t brickWidth, bool compressed, uint32_t defaultGridWidth) |
| 77 | : SDFGrid(pDevice) |
| 78 | , mDefaultGridWidth(defaultGridWidth) |
| 79 | , mBrickWidth(brickWidth) |
| 80 | , mCompressed(compressed) |
| 81 | { |
| 82 | FALCOR_CHECK(!compressed || (brickWidth + 1) % 4 == 0, "'brickWidth' ({}) must be a multiple of 4 minus 1 for compressed SDFSBSs", brickWidth); |
| 83 | |
| 84 | |
| 85 | mpSharedData = sSharedCache.acquire(mpDevice.get(), [this]() { return std::make_shared<SharedData>(mpDevice); }); |
| 86 | } |
| 87 | |
| 88 | size_t SDFSBS::getSize() const |
| 89 | { |