Skip to content

Commit

Permalink
fix a typo that broke the resourceallocator cache
Browse files Browse the repository at this point in the history
the cache size is given in MiB not bytes, so we needed to convert it
to bytes.
  • Loading branch information
pixelflinger authored and z3moon committed Feb 13, 2024
1 parent cdd9c4a commit 31b8362
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion filament/src/ResourceAllocator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ size_t ResourceAllocator::TextureKey::getSize() const noexcept {
}

ResourceAllocator::ResourceAllocator(Engine::Config const& config, DriverApi& driverApi) noexcept
: mCacheCapacity(config.resourceAllocatorCacheSizeMB),
: mCacheCapacity(config.resourceAllocatorCacheSizeMB << 20),
mCacheMaxAge(config.resourceAllocatorCacheMaxAge),
mBackend(driverApi) {
}
Expand Down

0 comments on commit 31b8362

Please sign in to comment.