[Mesa-users] Vulkan bring-up issues on new distro on RPI4
Kenneth Snyder
kenneth.snyder at lordstownmotors.com
Wed Mar 3 18:09:00 UTC 2021
Hi,
I am in the process of trying to bring-up Vulkan based application on a new distro of linux based on Automotive Grade Linux (AGL) with Xserver running on a Raspberry Pi 4, but receiving memory based errors. I can run the applications and Vulkan demos on Raspbian on the same hardware so I know this is purely a software issue. I believe I'm missing either a library, or some initialization/config. I'm using Yocto to build the distro and have it setup to compile mesa with native Vulkan support (-Dvulkan-drivers=broadcom)
When I run my custom application I get this error:
memory wait for map failed
[2020.06.29-03.11.55:019][ 0]LogVulkanRHI: Error: VulkanRHI::vkCreateDescriptorPool(Device->GetInstanceHandle(), &PoolInfo, VULKAN_CPU_ALLOCATOR, &DescriptorPool) failed, VkResult=-2
at /home/ken/source/UnrealEngine/Engine/Source/Runtime/VulkanRHI/Private/VulkanPendingState.cpp:723
with error VK_ERROR_OUT_OF_DEVICE_MEMORY
It throws VK_ERROR_OUT_OF_DEVICE_MEMORY which seems misleading because this is an 8GB Pi and the same application can run on Raspbian. The first line points me back to v3dv_bo.c:
v3dv_bo_map(struct v3dv_device *device, struct v3dv_bo *bo, uint32_t size)
{
assert(bo && size <= bo->size);
bool ok = v3dv_bo_map_unsynchronized(device, bo, size);
if (!ok)
return false;
const uint64_t infinite = 0xffffffffffffffffull;
ok = v3dv_bo_wait(device, bo, infinite);
if (!ok) {
fprintf(stderr, "memory wait for map failed\n"); // This is the line that prints, so the wait has failed?
return false;
}
return true;
}
What could be missing library or configuration-wise that would prevent the buffer object from succeeding?
I'm trying the Vulkan demos in parallel and when I attempt to run vkcube, I get this error:
# vkcube
Selected GPU 0: V3D 4.2, type: 1
memory wait for map failed
failed to map command list buffer
memory wait for map failed
failed to map command list buffer
memory wait for map failed
failed to map command list buffer
vkcube: /usr/src/debug/vulkan-tools/1.2.169.0-r0/git/cube/cube.c:1338: demo_prepare_buffers: Assertion `!err' failed.
Aborted
That line number points back to this in cube.c:
err = demo->fpCreateSwapchainKHR(demo->device, &swapchain_ci, NULL, &demo->swapchain);
assert(!err);
// note: fpCreateSwapchainKHR is a pointer to vkCreateSwapchainKHR
So this issue appears to be with creating the swapchain. Swapchain as an extension appears to be included/enabled:
Device Extensions: count = 6
----------------------------
...
VK_KHR_swapchain : extension revision 68
I initially followed this tutorial for the testing applications on Raspbian:
https://github.com/rdeioris/UnrealOnRPI4
And I believe I pulled all the requirements/dependencies (libdrm, libxcb, etc) from that tutorial into my new AGL distro and their versions match or exceed those in Raspbian.
>From vulkaninfo:
# vulkaninfo
==========
VULKANINFO
==========
Vulkan Instance Version: 1.2.168
Instance Extensions: count = 9
==============================
VK_EXT_debug_report : extension revision 9
VK_EXT_debug_utils : extension revision 2
VK_KHR_display : extension revision 23
VK_KHR_external_memory_capabilities : extension revision 1
VK_KHR_get_physical_device_properties2 : extension revision 1
VK_KHR_get_surface_capabilities2 : extension revision 1
VK_KHR_surface : extension revision 25
VK_KHR_xcb_surface : extension revision 6
VK_KHR_xlib_surface : extension revision 6
Regards,
Ken Snyder
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/mesa-users/attachments/20210303/45a1f59a/attachment-0001.htm>
More information about the mesa-users
mailing list