We are currently migrating Bugzilla to GitHub issues.
Any changes made to the bug tracker now will be lost, so please do not post new bugs or make changes to them.
When we're done, all bug URLs will redirect to their equivalent location on the new bug tracker.

Bug 5478 - Vulkan KMS/DRM doesn’t work on Pi4
Summary: Vulkan KMS/DRM doesn’t work on Pi4
Status: ASSIGNED
Alias: None
Product: SDL
Classification: Unclassified
Component: video (show other bugs)
Version: 2.0.15
Hardware: ARM Linux
: P2 normal
Assignee: Ryan C. Gordon
QA Contact: Sam Lantinga
URL:
Keywords: target-2.0.16
Depends on:
Blocks:
 
Reported: 2021-01-18 05:03 UTC by bluestang2006
Modified: 2021-02-07 07:48 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description bluestang2006 2021-01-18 05:03:47 UTC
Hello,

I’ve been following the recent Vulkan KMS/DRM implementation in SDL2 and have tried it countless times but I cannot get it to work on my Raspberry Pi4 with the latest 5.10 kernel, libdrm library and OpenGL/Vulkan drivers built from MESA.

I can use other Vulkan apps that do not use SDL2, i.e. RetroArch in KMS/DRM without any problems because the windowing system is not using SDL2.

I’ve been primarily using vkQuake3 to test the SDL2/Vulkan/KMS backend to no avail. The display I’m using is an LG LED TV because I don’t have a PC monitor at the moment.

I have contacted Manuel but he could not help me figure this out.

I’m not sure if there has been others testing the new backend but I’d figure I’d post a bug to get some assistance.
Comment 1 bluestang2006 2021-02-06 18:10:58 UTC
Update:

Here is gdb backtrace on the segfault I am getting:

Program received signal SIGSEGV, Segmentation fault.
0x0000007fedfc1f28 in vkGetPhysicalDeviceDisplayPropertiesKHR () from /usr/lib/aarch64-linux-gnu/libvulkan.so.1
(gdb) 
(gdb) bt full
#0  0x0000007fedfc1f28 in vkGetPhysicalDeviceDisplayPropertiesKHR () from /usr/lib/aarch64-linux-gnu/libvulkan.so.1
No symbol table info available.
#1  0x0000007ff7f1fed4 in ?? () from /usr/lib/aarch64-linux-gnu/libSDL2-2.0.so.0
No symbol table info available.
#2  0x0000007fee12b3c0 in vk_createSurfaceImpl () at code/renderer_vulkan/vk_create_window_SDL.c:353
No locals.
#3  0x0000007fee0fbef4 in vk_getProcAddress () at code/renderer_vulkan/vk_instance.c:747
No locals.
#4  0x0000007fee0fd8c0 in vk_initialize () at code/renderer_vulkan/vk_init.c:21
        width = 127
        height = -301132196
#5  0x0000007fee0d166c in R_Init () at code/renderer_vulkan/tr_init.c:124
        i = 1024
#6  0x0000007fee0d1844 in RE_BeginRegistration (pGlCfg=0x5555e29218 <cls+966856>) at code/renderer_vulkan/tr_init.c:201
No locals.
#7  0x0000005555577e18 in CL_InitRenderer () at code/client/cl_main.c:3125
No locals.
#8  0x0000005555577f50 in CL_StartHunkUsers (rendererOnly=qfalse) at code/client/cl_main.c:3154
No locals.
#9  0x00000055555a0b0c in Com_Init (commandLine=0x7fffffefc8 "") at code/qcommon/common.c:2814
        s = 0x5555cfb0f0 <string> "09"
        qport = -2088452435
#10 0x000000555564849c in main (argc=1, argv=0x7ffffff518) at code/sys/sys_main.c:756
        i = 1
        commandLine = '\000' <repeats 1023 times>
        ver = {major = 2 '\002', minor = 0 '\000', patch = 15 '\017'}
Comment 2 Manuel Alfayate Corchete 2021-02-06 19:30:09 UTC
@bluestang:

I don't know what could be going on here. VKQuake3 is working very well here with KMSDRM, using it's Vulkan renderer.

@Sam et all: Any ideas?
Comment 3 Sam Lantinga 2021-02-07 07:48:28 UTC
Ryan, can you reproduce this and see what's happening here?