mirror of
https://github.com/Yours3lf/rpi-vk-driver.git
synced 2025-02-07 04:54:20 +01:00
1
Shader compilation using the open source OpenGL driver
Yours3lf edited this page 2020-06-23 18:26:59 +01:00
You can compile GLSL shaders to Broadcom Videocore IV assembly using the open source OpenGL driver by setting an environment variable.
See here: 4a50bae125/docs/envvars.html (L357)
export VC4_DEBUG=qpu
This will make the OpenGL driver dump assembly in the form of 64 bit hexadecimal numbers that you can just load using rpi-vk-driver. You will need to create a mapping table between the Vulkan descriptors/push constants and the assembly, take a look at the tests that come with the driver for examples on how to do that.