Skip to content

Geometry buffers are never compacted, leading to excessive VRAM usage #2233

@jellysquid3

Description

@jellysquid3

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%).

Metadata

Metadata

Assignees

No one assigned

    Labels

    P-highPriority: HighT-bugType: Bug

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions