Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dynamic GPU memory allocation for extracted surfaces #52

Open
Ralith opened this issue Apr 10, 2020 · 1 comment
Open

Dynamic GPU memory allocation for extracted surfaces #52

Ralith opened this issue Apr 10, 2020 · 1 comment
Labels
enhancement New feature or request performance Something's slower than it should be visuals Something should be prettier

Comments

@Ralith
Copy link
Owner

Ralith commented Apr 10, 2020

We currently allocate a hardcoded number (4096) of worst-case sized slots for extracted surfaces. This makes inefficient use of memory, putting us uncomfortably close to storage buffer range limits, and gets much worse as chunk size increases. If we hand off metadata to the CPU after surface extraction, we could maintain only a small temporary buffer for worst-case surface extraction results, and more efficiently pack the main buffer using an allocator data structure on the CPU. This would also simplify #51 as the CPU could track the number of vertices in each surface, allowing it to construct indirect draw commands itself.

@Ralith Ralith added enhancement New feature or request performance Something's slower than it should be visuals Something should be prettier labels Apr 10, 2020
@Ralith
Copy link
Owner Author

Ralith commented May 3, 2024

https://github.com/pcwalton/offset-allocator/ looks like a promising candidate for managing the main buffer.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request performance Something's slower than it should be visuals Something should be prettier
Projects
None yet
Development

No branches or pull requests

1 participant