Skip to content
Yours3lf edited this page Jun 18, 2020 · 13 revisions

Welcome to the rpi-vk-driver wiki!

Driver quirks

  • can only submit 7920 draw calls per renderpass currently due to a hardware limitation
  • can only submit 65535 vertices per draw call
  • unsupported Vulkan® functionality is denoted by the UNSUPPORTED() macro which prints an error message to stderr
  • if VkSamplerCreateInfo's mipLodBias is greater than 0.0, it signals to disable automatic LOD calculation within shaders. Then it's up to the developer to supply an LOD level.
  • semaphores currently don't function as expected, see sync.c

Driver debugging

  • the driver is full of asserts that come handy when trying to debug a driver bug or hardware limitation (they only work in debug mode though)
  • the driver also has a lot of TODOs, so if something doesn't quite behave the way it should according to the spec, it's useful to have a look at the source code
  • kernel side error messages can be retrieved by adding drm.debug=0xf to /boot/cmdline.txt
  • Vulkan functions can be exposed (so one doesn't need the Vulkan-Loader) by setting the EXPOSE_DRIVER define to 1 during compilation
  • the driver's CPU overhead can be profiled by setting the RPI_PROFILE define to 1 during compilation
  • command lists submitted to the kernel side can be printed by setting the RPI_PRINT_COMMAND_LISTS define to 1 during compilation.
  • information about the compiled assembly shaders (including disassembly) can be dumped by setting the RPI_DUMP_SHADER_INFO define to 1 during compilation
  • hardware information can be printed by setting RPI_PRINT_HARDWARE_INFO to 1 during compilation