Crafter.Graphics/tests
catbot 7316e51dca fix(window): silence per-frame and setup-path Vulkan validation errors (#153)
Two distinct validation errors the native frame loop emitted, both
originating in Crafter.Graphics with no consumer-side influence.

Problem 1 — per-frame acquire-barrier access/stage mismatch. The
acquire->GENERAL barrier hardcoded dstAccessMask =
SHADER_WRITE|TRANSFER_WRITE but used the per-pass stage union as its dst
stage mask. For an all-compute frame the union narrows to COMPUTE_SHADER,
which does not support TRANSFER_WRITE, so VUID-02820 fired every frame.
Derive the access mask from the same stage union via a new
SwapchainWriterAccess() helper (mirroring SwapchainStageUnion), and apply
it to both the acquire dst and present src masks for symmetry.

Problem 2 — mid-session StartInit/FinishInit (and GetCmd/EndCmd) reuse the
shared drawCmdBuffers[currentBuffer]. With no steady-state wait-idle the
loop's last submission of that buffer may still be in flight when scene
setup runs (building map meshes / acceleration structures), so the old
code re-began (VUID-00049) and re-submitted (VUID-00071) a pending buffer,
and resources freed in the StartInit..FinishInit bracket could still be
referenced by it. Drain the queue at the start of StartInit/GetCmd before
re-recording; setup is rare, so a wait-idle is fine (FinishInit/EndCmd
already wait-idle at the end).

Tests: extend SwapchainBarrierScope with SwapchainWriterAccess coverage
(pure CPU), and add SetupCmdBufferReuse — a real-frame-loop regression
test driving a compute pass plus interleaved mid-session StartInit rounds,
asserting the validation layer stays silent. Verified both halves fail
(reproducing the exact VUIDs) when their respective fix is reverted.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-18 18:04:25 +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
ImageStagingRelease perf(image): release static texture staging after upload (#114) 2026-06-17 19:40:35 +00:00
InputFieldCaretCache perf(ui): memoize the input-field caret prefix width (#128) 2026-06-18 13:29:55 +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
SetupCmdBufferReuse fix(window): silence per-frame and setup-path Vulkan validation errors (#153) 2026-06-18 18:04:25 +00:00
ShapeTextCache perf(ui): LRU-evict the shaped-run cache instead of clearing it (#123) 2026-06-18 13:23:34 +00:00
SwapchainBarrierScope fix(window): silence per-frame and setup-path Vulkan validation errors (#153) 2026-06-18 18:04:25 +00:00
TLASHighWaterMark perf(rt): allocate TLAS metadata buffer in BAR/VRAM, not system RAM (#75) 2026-06-17 17:50:01 +00:00
TLASInstanceDirtyTracking perf(tlas): dirty-track the per-frame TLAS instance+metadata upload (#118) 2026-06-17 19:58:45 +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