[perf][LOW] Refit re-uploads immutable index buffer on UPDATE #68
Labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Catcrafts/Crafter.Graphics#68
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: Mesh / RT refit
Location:
implementations/Crafter.Graphics-Mesh.cpp:362-367Impact: Low · Effort: Small · Genuinely per-frame for deforming meshes
Problem
Refitre-uploads the index buffer on UPDATE — one extra memcpy + flush + barrier of immutable index data per refit.Proposed fix
Skip the index memcpy + its
FlushDeviceon the UPDATE branch (a hardware AS UPDATE cannot change topology).Correctness caveat
Slightly changes the API contract — a bitwise-different-but-equivalent index array on refit would be ignored; consistent with the documented "may only move vertex positions."