[perf] Per-allocation vkAllocateMemory, no suballocator #62
Labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Catcrafts/Crafter.Graphics#62
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Subsystem: VulkanBuffer / memory allocation
Location:
interfaces/Crafter.Graphics-VulkanBuffer.cppm:73-90Impact: Medium (allocation-count exhaustion) · Effort: Large · Not per-frame (mesh-build/heap-init/topology-change)
Builds on: #101 / #102 (fence-keyed deferred-deletion queue — landed)
Problem
One
VkDeviceMemoryper buffer, no suballocator — counts againstmaxMemoryAllocationCount. The legitimate concern is allocation-count exhaustion for thousand-mesh scenes, not frame cost.Proposed fix
Suballocator / memory pool.
Correctness caveat
A suballocator must honor frame-in-flight lifetimes (fence tracking) — a naive slab that recycles ranges is a GPU-side use-after-free. The fence-keyed retirement primitive now exists (deletion queue from #102): retiring a whole pool block can go straight through
Device::EnqueueDeletion, and a sub-range recycler should reuse the sameframeCounter + framesInFlightretire logic on its free-list entries rather than re-deriving fence tracking. Large effort regardless.