Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Bug#924862: mpv: missing libshaderc support (for Vulkan use)

201 views
Skip to first unread message

Patrik S.

unread,
Mar 17, 2019, 3:40:03 PM3/17/19
to
Package: mpv
Version: 0.29.1-1
Severity: wishlist

Dear Maintainer,

MPV complains that it cannot find SPIR-V, if you are using gpu-api=vulkan.
According this bug report https://github.com/mpv-player/mpv/issues/6124, mpv
need to be built with libshaderc support. Would it be possible to built mpv
with libshaderc support?.


mpv --spirv-compiler=help
Valid values for option spirv-compiler are:
auto
nvidia


mpv '/mnt/Transfer/test.mkv'
Resuming playback. This behavior can be disabled with --no-resume-playback.
Playing: /mnt/Transfer/test.mkv
(+) Video --vid=1 (*) (h264 1920x1080 23.976fps)
(+) Audio --aid=1 --alang=jpn (*) (aac 2ch 44100Hz)
(+) Subs --sid=1 --slang=eng (*) (ass)
[vo/gpu/vulkan] Failed initializing SPIR-V compiler!
Failed to open VDPAU backend libvdpau_nvidia.so: cannot open shared object
file: No such file or directory
[vo/vdpau] Error when calling vdp_device_create_x11: 1
[vo/xv] Warning: this legacy VO has bad quality and performance, and will in
particular result in blurry OSD and subtitles. You should fix your graphics
drivers, or not force the xv VO.
AO: [pulse] 44100Hz stereo 2ch float
VO: [xv] 1920x1080 yuv420p
AV: 00:00:57 / 00:23:17 (4%) A-V: -0.005 DS: 3.833/1 Cache: 306s+726MB


mpv.conf
profile=gpu-hq
gpu-api=vulkan
hwdec=vaapi
gpu-context=waylandvk



-- System Information:
Debian Release: buster/sid
APT prefers testing
APT policy: (500, 'testing'), (90, 'unstable')
Architecture: amd64 (x86_64)

Kernel: Linux 4.19.0-2-amd64 (SMP w/8 CPU cores)
Kernel taint flags: TAINT_OOT_MODULE, TAINT_UNSIGNED_MODULE
Locale: LANG=de_DE.UTF-8, LC_CTYPE=de_DE.UTF-8 (charmap=UTF-8), LANGUAGE=de_DE.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages mpv depends on:
ii libarchive13 3.3.3-4
ii libasound2 1.1.8-1
ii libass9 1:0.14.0-2
ii libavcodec58 7:4.1.1-1
ii libavdevice58 7:4.1.1-1
ii libavfilter7 7:4.1.1-1
ii libavformat58 7:4.1.1-1
ii libavutil56 7:4.1.1-1
ii libbluray2 1:1.1.0-1
ii libc6 2.28-8
ii libcaca0 0.99.beta19-2+b3
ii libcdio-cdda2 10.2+0.94+2-4
ii libcdio-paranoia2 10.2+0.94+2-4
ii libcdio18 2.0.0-2
ii libdrm2 2.4.97-1
ii libdvdnav4 6.0.0-1
ii libdvdread4 6.0.1-1
ii libegl1 1.1.0-1
ii libgbm1 18.3.4-2
ii libgl1 1.1.0-1
ii libjack-jackd2-0 [libjack-0.125] 1.9.12~dfsg-2
ii libjpeg62-turbo 1:1.5.2-2+b1
ii liblcms2-2 2.9-3
ii liblua5.2-0 5.2.4-1.1+b2
ii libpulse0 12.2-4
ii librubberband2 1.8.1-7
ii libsdl2-2.0-0 2.0.9+dfsg1-1
ii libsmbclient 2:4.9.4+dfsg-4
ii libsndio7.0 1.5.0-3
ii libswresample3 7:4.1.1-1
ii libswscale5 7:4.1.1-1
ii libuchardet0 0.0.6-3
ii libva-drm2 2.4.0-1
ii libva-wayland2 2.4.0-1
ii libva-x11-2 2.4.0-1
ii libva2 2.4.0-1
ii libvdpau1 1.1.1-10
ii libvulkan1 1.1.97-2
ii libwayland-client0 1.16.0-1
ii libwayland-cursor0 1.16.0-1
ii libwayland-egl1 1.16.0-1
ii libx11-6 2:1.6.7-1
ii libxext6 2:1.3.3-1+b2
ii libxinerama1 2:1.1.4-2
ii libxkbcommon0 0.8.2-1
ii libxrandr2 2:1.5.1-1
ii libxss1 1:1.2.3-1
ii libxv1 2:1.0.11-1
ii zlib1g 1:1.2.11.dfsg-1

Versions of packages mpv recommends:
ii xdg-utils 1.1.3-1
pn youtube-dl <none>

mpv suggests no packages.

-- no debconf information

Shmerl

unread,
Jan 17, 2023, 4:10:04 PM1/17/23
to
Now that shaderc was added to Debian unstable / testing, can you please
enable building mpv with it?


Thanks!

Shmerl.

Shmerl

unread,
Nov 27, 2023, 1:50:05 AM11/27/23
to
I just noticed that mpv somehow managed to work with Vulkan without shaderc!

Here is my configuration in $HOME/.config/mpv/config

[gpu-vulkan]
vo=gpu-next
gpu-api=vulkan
hwdec=vaapi
gpu-context=waylandvk

[default]
profile=gpu-vulkan

Here is some of what I see when running with --msg-level=all=debug

[vo/gpu-next/vulkan] Initializing GPU context 'waylandvk'
...
[vo/gpu-next/libplacebo] Spent 2.067 ms creating vulkan instance
...
[vo/gpu-next/libplacebo] Requested alpha compositing mode: VK_COMPOSITE_ALPHA_PRE_MULTIPLIED_BIT_KHR
[vo/gpu-next/libplacebo] Requested surface transform: VK_SURFACE_TRANSFORM_IDENTITY_BIT_KHR
...
[vo/gpu-next] Loading hwdec driver 'vaapi'
...
[vo/gpu-next/libplacebo] vertex shader source:
[vo/gpu-next/libplacebo] [  1] #version 450
...
[vo/gpu-next/libplacebo] [ 38]
[vo/gpu-next/libplacebo] [ 39] void main() {
[vo/gpu-next/libplacebo] [ 40] out_color = _1();
[vo/gpu-next/libplacebo] [ 41] }
[vo/gpu-next/libplacebo] Spent 0.796 ms translating SPIR-V
[vo/gpu-next/libplacebo] Spent 0.802 ms translating SPIR-V
[vo/gpu-next/libplacebo] Spent 0.004 ms compiling shader
[vo/gpu-next/libplacebo] Spent 0.070 ms creating pipeline
[vo/gpu-next/libplacebo] Pass statistics: size 0, SPIR-V: vert 0 frag 0 comp 0
...

So it clearly somehow manages to compile shaders to SPIR-V without shaderc!
May be libplacebo has some built in compiler?

Just wanted to share if anyone was waiting to start using Vulkan with your mpv.

Regards,
Shmerl.


Shmerl

unread,
Nov 27, 2023, 11:40:05 PM11/27/23
to
I asked mpv developers, and apparently libplacebo indeed now can handle shader
compilation without need for shaderc. So this seems to be not even needed at all
on Linux.


Regards,
Shmerl.
0 new messages