Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mpv: fix drm and vulkan support #64442

Closed
wants to merge 3 commits into from
Closed

Conversation

tadeokondrak
Copy link
Member

Motivation for this change

Noticed my Vulkan settings in my mpv config weren't doing anything

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nix-review --run "nix-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Ensured that relevant documentation is up to date
  • Fits CONTRIBUTING.md.

Can someone on Darwin test to see if libplacebo builds on it, and if not, if removing a dependency would fix it (all are optional)?

I was originally going to add libplacebo as only a vulkan dependency (it's required for it), but mpv uses it for more than just vulkan.

@tadeokondrak

This comment has been minimized.

@worldofpeace
Copy link
Contributor

worldofpeace commented Jul 8, 2019

@GrahamcOfBorg build mpv libplacebo

@nixos-discourse
Copy link

This pull request has been mentioned on Nix community. There might be relevant details there:

https://discourse.nixos.org/t/prs-ready-for-review-may-2019/3032/24

@worldofpeace
Copy link
Contributor

@GrahamcOfBorg build libplacebo

@worldofpeace
Copy link
Contributor

We're getting

Package ‘vulkan-headers-1.1.106’ in /private/var/lib/ofborg/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/lnl7-mac/pkgs/development/libraries/vulkan-headers/default.nix:16 is not supported on ‘x86_64-darwin’, refusing to evaluate.

on darwin.

vulkan-headers has darwin support

But I'm not sure how much work would be required for that to be useful on MacOS.
So I guess mpv shouldn't have libplacebo on darwin.

@worldofpeace
Copy link
Contributor

Made libplacebo use fetchFromGitLab.

@tadeokondrak Do you have any instructions on how I can test that this works properly?

@primeos
Copy link
Member

primeos commented Aug 6, 2019

Noticed my Vulkan settings in my mpv config weren't doing anything

@tadeokondrak I'd also be interested how you've noticed this.

Also: According to the changelog the switch to libplacebo is not part of the current release (0.29.1, 0.30.0 is not yet released). So from a quick look it seems to early for the change to mpv.

But I would like to merge the addition of libplacebo as I could use that for another package (dav1d) as well (that's how I just noticed this PR).

Even without this PR Vulkan support seems fine according to the log (I haven't had a closer look though):

mpv -v --gpu-api=vulkan "$video" | grep vulkan
[cplayer] Command line options: '-v' '--gpu-api=vulkan' "$video"
[cplayer] List of enabled features: 52 alsa asm atomics caca cplayer cplugins cuda-hwaccel debug-build drm drmprime dvbin dvdnav dvdread dvdread-common egl-helpers egl-x11 fchmod ffmpeg ffnvcodec gbm.h gl gl-wayland gl-x11 glibc-thread-name glob glob-posix gnuc gpl iconv javascript jpeg lcms2 libaf libass libass-osd libav-any libavcodec libavdevice libbluray libdl libm libmpv-shared librt linux-fstatfs lua optimize oss-audio plain-gl posix posix-or-mingw posix-spawn posix-spawn-native pthreads pulse rubberband shaderc shaderc-shared stdatomic uchardet vaapi vaapi-egl vaapi-glx vaapi-wayland vaapi-x-egl vaapi-x11 vdpau vdpau-gl-x11 vt.h vulkan wayland wayland-protocols x11 xv zlib zsh-comp
[vo/gpu/vulkan] Initializing GPU context 'waylandvk'
[vo/gpu/vulkan] Creating instance with extensions:
[vo/gpu/vulkan]     VK_KHR_surface
[vo/gpu/vulkan]     VK_KHR_wayland_surface
[vo/gpu/vulkan] Initializing GPU context 'x11vk'
[vo/gpu/vulkan] Creating instance with extensions:
[vo/gpu/vulkan]     VK_KHR_surface
[vo/gpu/vulkan]     VK_KHR_xlib_surface
[vo/gpu/vulkan] Probing for vulkan devices:
[vo/gpu/vulkan]     GPU 0: Intel(R) Iris Plus Graphics 640 (Kaby Lake GT3e) (integrated)
[vo/gpu/vulkan]     GPU 1: Intel(R) Iris Plus Graphics 640 (Kaby Lake GT3e) (integrated)
[vo/gpu/vulkan] Chose device:
[vo/gpu/vulkan]     Device Name: Intel(R) Iris Plus Graphics 640 (Kaby Lake GT3e)
[...]
[vo/gpu/vulkan] Initializing SPIR-V compiler 'shaderc'
[vo/gpu/vulkan] Queue families supported by device:
[vo/gpu/vulkan]     QF 0: flags 0x7 num 1
[vo/gpu/vulkan] Using graphics queue (QF 0)
[vo/gpu/vulkan] Creating vulkan device with extensions:
[vo/gpu/vulkan]     VK_KHR_swapchain

@primeos
Copy link
Member

primeos commented Aug 27, 2019

FYI: I've just pushed the commit that adds libplacebo to master (0a72c32) so that dav1d and other packages can use it in the meantime.

(The rest of this PR has most likely to be delayed until the release of mpv 0.30.0.)

@tadeokondrak tadeokondrak mentioned this pull request Oct 25, 2019
10 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants