Crafter.Graphics/tests
catbot 1f4c77000a perf(mesh): dirty-range vertex upload for deforming-mesh Refit (#119)
Mesh::Refit re-uploaded the entire vertex array every frame on the
in-place UPDATE path (full host write + flush + barrier on the direct
path; full re-stage + copy on the staged path), even when only a handful
of vertices moved.

Add VulkanBuffer::UploadDeviceLocalRange — a dirty-range counterpart to
UploadDeviceLocal that writes/flushes/stages/copies and barriers only the
half-open element range [offset, offset+count) of an already-allocated
device-local buffer. It picks direct-map vs staged-copy from the memory
type the buffer was actually allocated with (not the sub-range size, which
PreferDirectDeviceWrite would mis-route), and the direct path's ranged
flush is rounded to nonCoherentAtomSize and clamped to the allocation size
(mappedSize is now recorded for every buffer, not just mapped ones).

Add a dirty-range Refit overload taking the full vertex/index arrays plus
a (dirtyVertexOffset, dirtyVertexCount) window. The full-span Refit now
delegates to it with the whole array as the window. On the in-place UPDATE
path only the declared window is uploaded — the rest of the device buffer
retains last refit's positions; when an UPDATE isn't possible it falls
back to the full-span rebuild, which is why the full arrays are still
passed. The WebGPU/DOM backend keeps API symmetry: it has no hardware AS,
so it ignores the window and rebuilds the host BVH from the full geometry.

BLASBuildOptions exercises the dirty-range refit on the direct path, the
staged path, and the count-change rebuild fallback, asserting AS-handle /
blasAddr stability and zero Vulkan validation errors.

Resolves #119

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-17 19:50:48 +00:00
..
BLASBuildOptions perf(mesh): dirty-range vertex upload for deforming-mesh Refit (#119) 2026-06-17 19:50:48 +00:00
DeferredDeletion fix(device): fence-keyed deferred resource-deletion queue (#101) 2026-06-17 13:21:12 +00:00
FontAdvanceCache perf(font): cache per-codepoint advances in font units (#57) 2026-06-16 17:00:48 +00:00
FontAtlasDirtyRect perf(font): upload only the dirty sub-rect of the glyph atlas (#51) 2026-06-16 15:40:37 +00:00
FrameLoopSync feat(window): multi-frame-in-flight frame pacing (#40) 2026-06-16 15:37:11 +00:00
InputFieldHitTest perf(input-field): O(n) cursor hit test via Font::NearestCursorByte (#56) 2026-06-16 16:55:03 +00:00
MemoryTypeFallback fix(device): add preferred mask + required-only fallback to GetMemoryType (#59) 2026-06-16 16:03:50 +00:00
MeshDecompressStagingRelease test(mesh): pin static-build deletion count in #67 staging-release test (#110) 2026-06-17 18:50:38 +00:00
MipChainBarrierBatch perf(image): batch final mip-chain layout transition (#70) 2026-06-16 18:30:44 +00:00
MouseScroll feat(input): wire native mouse-wheel scroll on Wayland + Win32, normalize all backends to ±1/detent (#32) 2026-06-12 15:02:28 +00:00
PipelineCacheValidation test(pipeline): cover pipeline-cache header validation (#69) 2026-06-16 18:23:25 +00:00
PushConstantRewrite fix(vulkan-rt): configurable recursion depth + per-shader TLAS push for compute (#21) 2026-06-03 18:35:39 +00:00
ShapeTextCache perf(text): cache shaped runs in ShapeText (#52) 2026-06-16 15:40:52 +00:00
TLASHighWaterMark perf(rt): allocate TLAS metadata buffer in BAR/VRAM, not system RAM (#75) 2026-06-17 17:50:01 +00:00
UIClipFlag perf(ui): gate per-pixel clip compares behind a flags bit (#50) 2026-06-16 16:57:07 +00:00
UIFusedShader perf(ui): add additive DispatchFused to collapse consecutive UI passes (#47) 2026-06-16 17:03:24 +00:00
UploadStrategy cache directwrite 2026-06-16 20:10:23 +02:00
VulkanBufferFlushGate perf(vulkan-buffer): skip flush/invalidate on coherent memory (#60) 2026-06-16 17:04:26 +00:00
VulkanBufferRangedFlush perf(ui): flush only the written descriptor range, not the whole heap (#61) 2026-06-16 18:29:24 +00:00
VulkanBufferResizeReuse perf(buffer): capacity-reuse in VulkanBuffer::Resize (#63) 2026-06-16 18:22:09 +00:00