Commit Graph

2 Commits

Author SHA1 Message Date
1f1248b95d runtime: unlock ImageMemoryPool across driver allocations and fix BlockRanges alignment overflow 2026-11-25 18:12:54 +01:00
2b72fb53d1 d3d12_vulkan: textures share blocks of device memory (VK-IMAGE-MEMORY-POOL)
Every committed and placed texture made its own vkAllocateMemory and
released it with its own vkFreeMemory, about 100 us and 200 us on an
RTX 3080. Small device-local textures now take ranges of 64 MiB blocks
(runtime/src/image_memory.h). Render targets, depth buffers, CPU-visible
textures and textures over an eighth of a block keep their own
allocation. A range goes back to its block through the deferred
deletion queue, and a texture in a reused range is zeroed before a
shader reads it.

Tests: image_memory (CPU) and d3d12_texture_memory (GPU).
2026-11-25 00:25:24 +01:00