20 Mar
2023
20 Mar
'23
12:59 p.m.
Note that we would only need to invalidate and flush when the memory isn't coherent. I.e., when device->memory_properties[heap->vk_memory_type] doesn't include VK_MEMORY_PROPERTY_HOST_COHERENT_BIT. (Which isn't that common, actually.) I don't think the d3d12_heap_update_mapping_locked() helper is that helpful; it mostly just obfuscates whether we're doing a vkFlushMappedMemoryRanges() or vkInvalidateMappedMemoryRanges() call, and constructing the VkMappedMemoryRange structure isn't that complicated. -- https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/126#note_27279