[perf] compressedStaging reallocated and kept per compressed Build #67

Closed
opened 2026-06-16 16:51:34 +02:00 by jorijnvdgraaf · 0 comments

Subsystem: Mesh / Image decompression
Location: implementations/Crafter.Graphics-Mesh.cpp:230-237 (same pattern interfaces/Crafter.Graphics-ImageVulkan.cppm:198-215)
Impact: Memory pinning · Effort: Medium · Load-time, not per-frame
Builds on: #101 / #102 (fence-keyed deferred-deletion queue — landed)

Problem

compressedStaging is reallocated and kept per compressed Build — persistent per-mesh host-visible staging pins memory for the mesh's life.

Proposed fix

Either: (a) release after the decompress submitcompressedStaging.DeferredClear() via the deletion queue (#102), which retires it once the submit's frame has cleared the fence (the decompress references compressedStaging.address, so it must outlive the submit — exactly what the queue guarantees;

**Subsystem:** Mesh / Image decompression **Location:** `implementations/Crafter.Graphics-Mesh.cpp:230-237` (same pattern `interfaces/Crafter.Graphics-ImageVulkan.cppm:198-215`) **Impact:** Memory pinning · **Effort:** Medium · Load-time, not per-frame **Builds on:** #101 / #102 (fence-keyed deferred-deletion queue — landed) ### Problem `compressedStaging` is reallocated and kept per compressed Build — persistent per-mesh host-visible staging pins memory for the mesh's life. ### Proposed fix Either: (a) **release after the decompress submit** — `compressedStaging.DeferredClear()` via the deletion queue (#102), which retires it once the submit's frame has cleared the fence (the decompress references `compressedStaging.address`, so it must outlive the submit — exactly what the queue guarantees;
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Catcrafts/Crafter.Graphics#67
No description provided.