1 /* 2 * Copyright © 2024 Valve Corporation 3 * 4 * SPDX-License-Identifier: MIT 5 */ 6 7 #include "radv_entrypoints.h" 8 9 VKAPI_ATTR VkResult VKAPI_CALL quantic_dream_UnmapMemory2KHR(VkDevice _device,const VkMemoryUnmapInfoKHR * pMemoryUnmapInfo)10quantic_dream_UnmapMemory2KHR(VkDevice _device, const VkMemoryUnmapInfoKHR *pMemoryUnmapInfo) 11 { 12 /* Detroit: Become Human repeatedly calls vkMapMemory and vkUnmapMemory on the same buffer. 13 * This creates high overhead in the kernel due to mapping operation and page fault costs. 14 * 15 * Simply skip the unmap call to workaround it. Mapping an already-mapped region is UB in Vulkan, 16 * but will correctly return the mapped pointer on RADV. 17 */ 18 return VK_SUCCESS; 19 } 20