-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
vulkanize: Safely delete chunk buffers
There are a few kinds of vertex buffers that have been treated differently. Some are the same throughout and they are created at startup and deleted only at termination. Some are more volatile, but have constant size or have a reasonable upper bound. So those are made dynamic. Chunk buffers aren't quite like either. They stay the same for the most unless you change the landscape. Then they are completely destroyed and recreated, as is this program's wont. They have to be allowed to change, but can't be made dynamic because of the size changes and large size. So I gave up and reimplemented the GL driver approach. Whenever any buffer is deleted, it's added to a frame-specific queue. It is only deleted when that frame index is encountered again, ensuring that the command buffer also associated with that frame will have completed so any buffers that were last used in that frame can safely be destroyed.
- Loading branch information
Showing
1 changed file
with
40 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters