vkQueuePresentKHR上的vkMapMemory验证错误,但从未直接调用该函数

问题描述

调用vkQueuePresentKHR时,出现以下验证错误

Validation Error: [ VUID-vkMapMemory-size-00680 ] Object 0: handle = 0x8483000000000025,type = VK_OBJECT_TYPE_DEVICE_MEMORY; | MessageID = 0xff4787ab | VkMapMemory: Attempting to map memory range of size zero The Vulkan spec states: If size is not equal to VK_WHOLE_SIZE,size must be greater than 0 (https://vulkan.lunarg.com/doc/view/1.2.148.0/windows/1.2-extensions/vkspec.html#VUID-vkMapMemory-size-00680)

我从不直接调用vkMapMemory()。

这是我的代码的摘录:https://gist.github.com/alexandru-cazacu/7847161564daa5f93d1bada39280faa8

解决方法

关闭RivaTuner Statistics Server解决了该问题。

我还有其他3个验证错误。

https://vulkan-tutorial.com/FAQ

中所述

我在核心验证层收到访问冲突错误:确保没有MSI Afterburner / RivaTuner Statistics Server 运行,因为它与Vulkan有一些兼容性问题。