Vulkan Framebuffer example (no X, no Wayland)

Dear Experts,

Is there any example code using Vulkan direct to the display, i.e. not using X or Wayland?

If no examples, any docs about that?

Thanks, Phil.

Hi nvidiadev1,

Please refer to https://developer.nvidia.com/embedded/vulkan

I’ve not spotted anything on that page that answers my question; could you be more specific?

FWIW, I have discovered that the vkcube demo can be made to work direct to the display, but it is not compiled to do so by default. The key thing is the VK_KHR_dsiplay extension. Its docs have a note saying that the example code was moved to the cube demo. The cube demo source (from the Khronos github) has different platforms enabled by #ifdef, but the build doc hasn’t been updated to add “DISPLAY” to X, Wayland, etc, and in any case they get the cmake variable name wrong; the required arg is -DCUBE_WSI_SELECTION=DISPLAY.

So I now have a spinning cube rendered using Vulkan on my nano. The code to set that up is actually simpler than the EGL/drm code to set up OpenGL output direct to the display, which was a pleasant surprise.

Phil.