Vulkan memory coherence guarantees when HOST_VISIBLE without HOST_COHERENT
0 reputation · 11 Sept 2022, 09:50 UTC
0 reputation · 11 Sept 2022, 09:50 UTC
The Vulkan specification defines VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT as allowing CPU access to memory, but leaves cache coherency behavior implementation-defined when HOST_COHERENT is not set. This creates uncertainty for applications targeting multiple GPU vendors where memory types may or may not require explicit flush/invalidate operations.
Key Constraints
Relevant Documentation
According to the Vulkan 1.3 specification, memory barriers (VK_MEMORY_BARRIER) are required for correct host-device synchronization regardless of memory type selection. The VK_KHR_get_memory_requirements2 extension provides tools for runtime detection of memory properties.
Unresolved Behavior
Applications cannot reliably assume HOST_VISIBLE memory is coherent across different vendor implementations and driver versions without explicit runtime testing. This raises questions about portable memory management strategies.
A thoughtful contribution can make all the difference. Be the first to share one.
Use comments to ask for clarification. Post a solution as an answer.
No question comments on this page.