WriteBufferDescriptor / WriteSampledImageDescriptor / RegisterSampler / WriteSwapchainDescriptors each FlushDevice()'d the entire multi-KB per-frame descriptor heap after writing one few-byte descriptor. Add a ranged VulkanBuffer::FlushDevice(offset, bytes) that flushes only the touched bytes, rounding the range outward to nonCoherentAtomSize as vkFlushMappedMemoryRanges requires (the WHOLE_SIZE path sidestepped that). The coherent-memory gate from issue #60 is preserved — coherent memory still skips the flush entirely. The descriptor writers now self-flush their written range, so the redundant whole-heap flushes in UIRenderer::Initialize and the resize callback are gone. Rounding lives in AlignMappedFlushRange (pure math) and is unit-tested without a device in the new VulkanBufferRangedFlush test; the change was also verified end-to-end by running HelloUI on a real GPU with validation layers (font-atlas glyphs, sampler and storage-image descriptors all flush correctly, no VUIDs). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| BLASBuildOptions | ||
| FontAdvanceCache | ||
| FontAtlasDirtyRect | ||
| FrameLoopSync | ||
| InputFieldHitTest | ||
| MemoryTypeFallback | ||
| MouseScroll | ||
| PushConstantRewrite | ||
| ShapeTextCache | ||
| UIClipFlag | ||
| UIFusedShader | ||
| UploadStrategy | ||
| VulkanBufferFlushGate | ||
| VulkanBufferRangedFlush | ||