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.