Skip to content

RFC: turnip, wsi: Allow building without drm/msm

Valentine Burley requested to merge Valentine/mesa:kgsl into main

What does this MR do and why?

Various changes to allow compiling Turnip with only kgsl and X11 enabled.

With these patches it's possible to build Turnip without drm/msm via meson setup build -D platforms=x11 -D dri3=enabled -D gallium-drivers= -D vulkan-drivers=freedreno -D freedreno-kmds=kgsl -D buildtype=release and then use it with MESA_VK_WSI_DEBUG=sw.

The commits here fix the following compilation errors:

rc/vulkan/wsi/wsi_common_x11.c
In file included from ../src/vulkan/wsi/wsi_common_x11.c:45:
/usr/local/include/xf86drm.h:40:10: fatal error: drm.h: No such file or directory
   40 | #include <drm.h>
      |          ^~~~~~~

/usr/bin/ld: src/freedreno/vulkan/libvulkan_freedreno.so.p/tu_wsi.cc.o: in function `tu_wsi_can_present_on_device(VkPhysicalDevice_T*, int)':
tu_wsi.cc:(.text._ZL28tu_wsi_can_present_on_deviceP18VkPhysicalDevice_Ti+0xc): undefined reference to `wsi_common_drm_devices_equal'

/usr/bin/ld: src/vulkan/wsi/libvulkan_wsi.a.p/wsi_common_x11.c.o: in function `wsi_x11_check_dri3_compatible':
wsi_common_x11.c:(.text.wsi_x11_check_dri3_compatible+0xa8): undefined reference to `wsi_device_matches_drm_fd'

Draft/WIP because I'm not sure what to return in tu_wsi_can_present_on_device and if the check in wsi_x11_check_dri3_compatible is appropriate.

Closes: #8637

Closes: #9240

Edited by Valentine Burley

Merge request reports