Next revision | Previous revision |
notes:vulkan [2023/09/16 01:06] – created osnr | notes:vulkan [2023/09/30 19:41] (current) – osnr |
---|
===== Vulkan ===== | ===== Vulkan ===== |
| |
need to set up without X or Wayland | Tricky -- need to set up without X or Wayland, exact process depends on your GPU hardware. |
| |
| Install these deps first to get them out of the way: ''sudo apt-get install libvulkan-dev libvulkan1 vulkan-tools libdrm-dev libdrm-tests flex bison python3-mako python3-setuptools libexpat1-dev libudev-dev gettext ca-certificates xz-utils zlib1g-dev pkg-config meson --no-install-recommends'' |
| |
| |
==== Pi 4 ==== | ==== Pi 4 ==== |
| |
Basically follow https:%%//%%forums.libretro.com/t/retroarch-raspberry-pi-4-vulkan-without-x-howto/31164/2 except: | Basically follow [[https://forums.libretro.com/t/retroarch-raspberry-pi-4-vulkan-without-x-howto/31164|this post]] except: |
| |
''%%sudo ninja install%%'' to install Mesa system-wide | Don't bother installing libdrm from source, just do ''sudo apt install libdrm-dev'' as we say above |
| |
| Run the ''meson'' configure command for Mesa without the ''%%-Ddri-drivers=''%%'' option, which was removed in some recent version of Mesa since the guide was written: |
| |
| ''CFLAGS="-O2 -march=armv8-a+crc+simd -mtune=cortex-a72" CXXFLAGS="-O2 -march=armv8-a+crc+simd -mtune=cortex-a72" meson -Dglx=disabled -Dplatforms= -Dllvm=disabled -Dvulkan-drivers=broadcom -Dgallium-drivers=v3d,vc4,kmsro -Dbuildtype=release ..'' |
| |
| After building Mesa, ''%%sudo ninja install%%'' to install Mesa system-wide |
| |
Clone https:%%//%%github.com/krh/vkcube and ''%%mkdir build%%'' and ''%%meson ..%%'' and ''%%ninja%%'' and ''%%./vkcube -m khr -k 0:0:0%%''. | Clone https:%%//%%github.com/krh/vkcube and ''%%mkdir build%%'' and ''%%meson ..%%'' and ''%%ninja%%'' and ''%%./vkcube -m khr -k 0:0:0%%''. |
| |
Also similar to above Pi 4 instructions. | Also similar to above Pi 4 instructions. |
| |
''%%sudo apt install libdrm-dev libdrm-tests%%'' | |
| |
''%%modetest -M amdgpu%%'' to list connectors and not try the Intel integrated graphics | ''%%modetest -M amdgpu%%'' to list connectors and not try the Intel integrated graphics |
| |
''%%sudo chmod 666 /dev/dri/renderD129%%'' | ''%%sudo chmod 666 /dev/dri/renderD129%%'' |
| |
| ==== Other systems ==== |
| |
| Usually, you need to change the ''-Dvulkan-drivers'' and ''-Dgallium-drivers'' options depending on your GPU. |
| |
| Intel i915 (Charles): ''meson -Dllvm=disabled -Dglx=disabled -Dplatforms= -Dvulkan-drivers=intel -Dgallium-drivers=i915 -Dbuildtype=release ..'' |
| |
| You might need to chmod a different ''/dev/dri'' path if no Vulkan device found. |
| |
| ==== Other deps ==== |
| |
''sudo apt install vulkan-validationlayers'' | ''sudo apt install vulkan-validationlayers'' |
| |
| glslc: https://github.com/google/shaderc/blob/main/downloads.md |
| |
==== Testing ==== | ==== Testing ==== |