[perf][LOW] Per-descriptor write flushes all numFrames heap copies whole-size #61
Labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Catcrafts/Crafter.Graphics#61
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: UI descriptor registration
Location:
implementations/Crafter.Graphics-UI.cpp:275-302, 315-318Impact: LOW · Effort: Small · Not hot path (setup-time registration APIs)
Problem
WriteBufferDescriptor/WriteSampledImageDescriptor/RegisterSamplereachFlushDevice()every per-frame heap copy whole-size after writing one few-byte descriptor.Proposed fix
Flush only the written descriptor byte range (destination address+size already known); batch into a single flush after multiple writes.
Correctness caveat
Ranged flush must respect
nonCoherentAtomSizealignment (the WHOLE_SIZE call currently sidesteps this). "Skip if coherent" requires real coherence detection (see FlushDevice issue) — a blanket skip is a bug on non-coherent memory.