MPV 0.29.0 on Arch Linux.
Running Mesa master and LLVM master from AUR.
Detects spirv, and plays video with Vulkan backend. (what binary is it expecting, anyways?)
Complains with "[vo/gpu/vulkan] Failed initializing SPIR-V compiler!" for both X11 and Wayland backends
This happens because your mpv is compiled without support for libshaderc, which is the only SPIR-V backend that mpv supports for now (apart from the deprecated nvidia-only VK_NV_glsl_shader which we will be dropping support for eventually). To solve the issue you will need to install libshaderc and make sure mpv is built against it.
Note: It wouldn't be too difficult to support using glslang directly instead of shaderc. I have already written a C wrapper for glslang for this purpose for a different project; if you want to try merging it to mpv I could offer some pointers. That said, using shaderc is still preferred to glslang since it means you (i.e. we) get better diagnostics.
I see... thanks @haasn :)
Is shaderc widely available in distribution repos? Would be great if this didn't strip people from using Vulkan in mpv, at least that's the case with Arch Linux. :)
Now that shaderc have adopted a SOVERSION and are possibly thinking about fixing their other packaging errors (e.g. vendored libraries, lack of pkg-config, wrong .so name, ...) it might be more likely to see shaderc packaged.
This happens because your mpv is compiled without support for libshaderc, which is the only SPIR-V backend that mpv supports for now (apart from the deprecated nvidia-only
VK_NV_glsl_shaderwhich we will be dropping support for eventually). To solve the issue you will need to install libshaderc and make sure mpv is built against it.Note: It wouldn't be too difficult to support using
glslangdirectly instead ofshaderc. I have already written a C wrapper for glslang for this purpose for a different project; if you want to try merging it to mpv I could offer some pointers. That said, using shaderc is still preferred to glslang since it means you (i.e. we) get better diagnostics.
How to do it by using the mpv-build.git in Ubuntu?
Most helpful comment
How to do it by using the mpv-build.git in Ubuntu?