krh / vkcube

Spinning Vulkan Cube

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

VK_ERROR_MEMORY_MAP_FAILED on radv

ChristophHaag opened this issue · comments

Weird that nobody has made an issue yet because it has long been known to be broken

$ vkcube                                                                                                                                                                  
WARNING: radv is not a conformant vulkan implementation, testing use only.
1 physical devices
vendor id 1002, device name AMD RADV POLARIS10 (LLVM 7.0.0)
../src/amd/vulkan/radv_device.c:2359: VK_ERROR_MEMORY_MAP_FAILED
[1]    28927 segmentation fault (core dumped)  vkcube

Relevant upstream issue: https://bugs.freedesktop.org/show_bug.cgi?id=100951#c2

vkcube is known broken, it allocates memory from a non-mappable memory type and then tries to map it.

Thanks for filing the issue, I wasn't aware of this. It's not entirely surprising either, since we just pick the first memory type. Just before the call to vkAllocateMemory in cube.c we should probably look through the kinds of memory in reqs.memoryTypeBits and pick one that supports mapping. If there isn't one, we'll need to use staging buffers, which will be more work.

fixed by #27