Skip to content

v1.21.0

Choose a tag to compare

@github-actions github-actions released this 10 Nov 05:11
· 75 commits to main since this release

Creating thousands of meshes at once no longer leaves the GPU driver holding gigabytes of upload memory. RecursiveAI.OneGame.Physics ships as 1.21.0-preview.1.

Fixed

  • Creating thousands of meshes (or any burst of buffer and texture uploads) in one frame no longer leaves gigabytes of driver memory mapped. The Vulkan backend stages uploads through a few fixed 4 MiB chunks, at most GpuDevice.StagingBudgetBytes (32 MiB) in all: when they are all in use, the writing call waits for the GPU to finish the oldest copies instead of making more buffers. Idle chunks and empty device-memory blocks are returned after a while. A burst of 2,500 chunk-sized meshes used to hold about 1.5 GB of staging for the life of the device; it now peaks at 32 MiB and settles at 16 MiB.

Added

  • GpuMemoryStats.StagingBytes and GpuDevice.StagingBudgetBytes.