Quick answer: Vulkan vkMapMemory write not visible to GPU without an explicit flush? Memory not host-coherent - call vkFlushMappedMemoryRanges before submit.

Updated uniform buffer; submitted; shader reads stale data.

Use host-coherent memory

Allocate with VK_MEMORY_PROPERTY_HOST_COHERENT_BIT. Writes auto-visible.

Or flush manually

vkFlushMappedMemoryRanges(...);

Explicit; required for non-coherent memory.

Audit memory flags

Each allocation's memory type. Mismatched assumptions = the visibility bug.

“Memory coherency is explicit in Vulkan. Choose deliberately.”

Build a small allocator helper that returns coherent memory by default. Manual flushing surfaces the bug class.

Related reading