haikarainen
Posts: 5
Joined: Sun Nov 22, 2020 12:49 am

Vulkan support on Raspberry Pi 4b

Sun Nov 22, 2020 12:59 am

Do you have Vulkan running on a RPi 4b? then I would LOVE the output from your vulkaninfo!

I'm looking to purchase RPi 4b 8GB for a hobbyist game console project, however I still have questions about compatibility.

I hope to be able to use the VK_KHR_display_swapchain extension to use Vulkan to render and present directly to the monitor output, completely bypassing any X11/Wayland server. For this to happen though, the extension needs to be supported (or at least on the roadmap to become supported in the near future). Does anyone know if this is supported? If you can share your vulkaninfo, I'd gladly appreciate it! It should also list presentable surfaces for any devices.

My fallback at this time, in case it's not supported or even planned, seems to be writing a Wayland compositor with Mir, and simply design the system to just have a single client rendering. However it just feels so wasteful when you know how close VK_KHR_display_swapchain is..

If you have any information you think could be useful for me (regarding compatibility with Vulkan, Wayland, Mir, X11, etc. or alternate solutions) then I'd gladly appreciate it.

Thanks in advance! :D

User avatar
Gavinmc42
Posts: 5084
Joined: Wed Aug 28, 2013 3:31 am

Re: Vulkan support on Raspberry Pi 4b

Sun Nov 22, 2020 11:14 pm

Code: Select all

Vulkan Instance Version: 1.1.97

Instance Extensions:
====================
Instance Extensions     count = 17
        VK_EXT_acquire_xlib_display         : extension revision  1
        VK_EXT_debug_report                 : extension revision  9
        VK_EXT_debug_utils                  : extension revision  1
        VK_EXT_direct_mode_display          : extension revision  1
        VK_EXT_display_surface_counter      : extension revision  1
        VK_KHR_device_group_creation        : extension revision  1
        VK_KHR_display                      : extension revision 23
        VK_KHR_external_fence_capabilities  : extension revision  1
        VK_KHR_external_memory_capabilities : extension revision  1
        VK_KHR_external_semaphore_capabilities: extension revision  1
        VK_KHR_get_display_properties2      : 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_wayland_surface              : extension revision  6
        VK_KHR_xcb_surface                  : extension revision  6
        VK_KHR_xlib_surface                 : extension revision  6
Layers: count = 2
...........

Device Extensions       count = 4
        VK_EXT_external_memory_dma_buf      : extension revision  1
        VK_KHR_external_memory              : extension revision  1
        VK_KHR_external_memory_fd           : extension revision  1
        VK_KHR_swapchain                    : extension revision 68
Is that last one the extension?

It is still a work in progress, but not too bad.
The VKquakes work, VulkanSceneGraph does., even Zink is working.
You can DIY install it yourself, not yet preinstalled?

I have yet to get it to work without X11, but I am still new to V.
I'm dancing on Rainbows.
Raspberries are not Apples or Oranges

haikarainen
Posts: 5
Joined: Sun Nov 22, 2020 12:49 am

Re: Vulkan support on Raspberry Pi 4b

Mon Nov 23, 2020 3:03 am

Gavinmc42 wrote:
Sun Nov 22, 2020 11:14 pm

Code: Select all

Vulkan Instance Version: 1.1.97

Instance Extensions:
====================
Instance Extensions     count = 17
        VK_EXT_acquire_xlib_display         : extension revision  1
        VK_EXT_debug_report                 : extension revision  9
        VK_EXT_debug_utils                  : extension revision  1
        VK_EXT_direct_mode_display          : extension revision  1
        VK_EXT_display_surface_counter      : extension revision  1
        VK_KHR_device_group_creation        : extension revision  1
        VK_KHR_display                      : extension revision 23
        VK_KHR_external_fence_capabilities  : extension revision  1
        VK_KHR_external_memory_capabilities : extension revision  1
        VK_KHR_external_semaphore_capabilities: extension revision  1
        VK_KHR_get_display_properties2      : 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_wayland_surface              : extension revision  6
        VK_KHR_xcb_surface                  : extension revision  6
        VK_KHR_xlib_surface                 : extension revision  6
Layers: count = 2
...........

Device Extensions       count = 4
        VK_EXT_external_memory_dma_buf      : extension revision  1
        VK_KHR_external_memory              : extension revision  1
        VK_KHR_external_memory_fd           : extension revision  1
        VK_KHR_swapchain                    : extension revision 68
Is that last one the extension?

It is still a work in progress, but not too bad.
The VKquakes work, VulkanSceneGraph does., even Zink is working.
You can DIY install it yourself, not yet preinstalled?

I have yet to get it to work without X11, but I am still new to V.
Thank you! No, thats just the swapchain extension. Vulkan needs something to present its "backbuffer" to, and usually does this to a surface, by using a swapchain.
The extension Im looking for is VK_KHR_display_swapchain. This allows one to present directly to the display, rather than to a surface (windoe) on the display.

As per Vulkan docs:
This extension provides an API to create a swapchain directly on a device’s display without any underlying window system.
I already bit the bullet and implemented a custom wayland compositor for now, using Mir Abstraction Layer. I will try to implement direct rendering using a display swapchain on x86, and hope that it comes to RPi soon.

You can follow my project on github if youre curious btw! https://github.com/haikarainen/bootleg

User avatar
Gavinmc42
Posts: 5084
Joined: Wed Aug 28, 2013 3:31 am

Re: Vulkan support on Raspberry Pi 4b

Mon Nov 23, 2020 3:29 am

Cool.
I prefer PiCore Linux myself, it is smaller, but much also smaller user group.
Would love to get Vulkan on baremetal in Ultibo, that is a longer term goal.

Keep and eye on the driver progress?
https://cgit.freedesktop.org/mesa/mesa/ ... ee594787e3
Does not mean that much to me, yet.

No idea what ODIN, KIT, WIR are.
I'm dancing on Rainbows.
Raspberries are not Apples or Oranges

haikarainen
Posts: 5
Joined: Sun Nov 22, 2020 12:49 am

Re: Vulkan support on Raspberry Pi 4b

Mon Nov 23, 2020 4:14 am

Gavinmc42 wrote:
Mon Nov 23, 2020 3:29 am
Cool.
I prefer PiCore Linux myself, it is smaller, but much also smaller user group.
Would love to get Vulkan on baremetal in Ultibo, that is a longer term goal.

Keep and eye on the driver progress?
https://cgit.freedesktop.org/mesa/mesa/ ... ee594787e3
Does not mean that much to me, yet.

No idea what ODIN, KIT, WIR are.
Those seem like interesting projects. Might scale the distro back a bit when I get something sort of stable up and running!

Sorry, Odin, KIT, WIR are other projects of mine which basically make up a game engine. My plan is to reuse that stack, but adapt it to the RPi, to make games for the console, as well as the dashboard app.

User avatar
Gavinmc42
Posts: 5084
Joined: Wed Aug 28, 2013 3:31 am

Re: Vulkan support on Raspberry Pi 4b

Mon Jan 11, 2021 9:46 pm

A GUI based on ImGUI, for VulkanSceneGraph is working :D
Attachments
vsgimgui.jpg
vsgimgui.jpg (195.2 KiB) Viewed 227 times
I'm dancing on Rainbows.
Raspberries are not Apples or Oranges

Return to “Graphics programming”