Sodium

Sodium

35M Downloads

Geometry buffers are never compacted, leading to excessive VRAM usage

jellysquid3 opened this issue ยท 0 comments

commented

Sodium currently does not ever attempt to compact the geometry buffers used by render regions. Since we cannot predict the amount of memory a given area of the world is going to need, it will be required to periodically check the memory usage of each geometry buffer, and periodically defragment/compact it to release memory that is being wasted.

The most promising way of implementing this is simply to maintain a "high water mark", and to invoke compaction when the high water mark is below the current size of the geometry buffer for a while. We should only perform compaction if all chunks within the render region are loaded, and when there is a non-trivial amount of memory being wasted (perhaps >10%).