Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 750260 - media-video/ffmpeg-4.3.1: USE=vulkan doesn't enable vulkan filters
Summary: media-video/ffmpeg-4.3.1: USE=vulkan doesn't enable vulkan filters
Status: UNCONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal with 1 vote (vote)
Assignee: Gentoo Media-video project
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-10-19 22:36 UTC by Gregory Beauregard
Modified: 2022-02-02 10:18 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Gregory Beauregard 2020-10-19 22:36:57 UTC
ffmpeg now has some new vulkan filters, but the +vulkan USE flag in the current ebuild that does --enable-vulkan is not sufficient to enable them, as --enable-libglslang is also needed

See for example scale_vulkan in the configure file:
scale_vulkan_filter_deps="vulkan libglslang"

https://github.com/FFmpeg/FFmpeg/blob/master/configure
Comment 1 Gregory Beauregard 2020-11-24 04:07:57 UTC
Apparently there's some weirdness with glslang not supporting pkgconfig. Upstream referred me to reverting commit 98ea1a662ee172961feaa374fe8d26078838d250 as fixing building with --enable-libglslang on debian, and that worked for me on Gentoo as well. Will probably need to be inspected what this does and included as a .patch/some other method to fixup the glslang detection for our specific packaging whenever this gets looked at.
Comment 2 Gregory Beauregard 2020-11-28 00:28:20 UTC
(In reply to Gregory Beauregard from comment #1)
> Apparently there's some weirdness with glslang not supporting pkgconfig.
> Upstream referred me to reverting commit
> 98ea1a662ee172961feaa374fe8d26078838d250 as fixing building with
> --enable-libglslang on debian, and that worked for me on Gentoo as well.
> Will probably need to be inspected what this does and included as a
> .patch/some other method to fixup the glslang detection for our specific
> packaging whenever this gets looked at.

So as far as I know, a patch that reverts this commit (it just removes a couple things from a line), a dev-util/glslang dependency, and a dev-util/spirv-tools dependency are what's needed here. The spirv-tools dependency isn't obvious, but it's required.
Comment 3 Gregory Beauregard 2021-03-03 03:57:15 UTC
(In reply to Gregory Beauregard from comment #1)
> Apparently there's some weirdness with glslang not supporting pkgconfig.
> Upstream referred me to reverting commit
> 98ea1a662ee172961feaa374fe8d26078838d250 as fixing building with
> --enable-libglslang on debian, and that worked for me on Gentoo as well.
> Will probably need to be inspected what this does and included as a
> .patch/some other method to fixup the glslang detection for our specific
> packaging whenever this gets looked at.

Debian in the last week merged a new version of glslang where this hack/revert isn't required anymore, so depending on when someone gets to this bug it's worth double checking if the current version of glslang in-tree still requires this (currently it does).
Comment 4 Gregory Beauregard 2021-03-28 09:47:09 UTC
(In reply to Gregory Beauregard from comment #3)
> (In reply to Gregory Beauregard from comment #1)
> > Apparently there's some weirdness with glslang not supporting pkgconfig.
> > Upstream referred me to reverting commit
> > 98ea1a662ee172961feaa374fe8d26078838d250 as fixing building with
> > --enable-libglslang on debian, and that worked for me on Gentoo as well.
> > Will probably need to be inspected what this does and included as a
> > .patch/some other method to fixup the glslang detection for our specific
> > packaging whenever this gets looked at.
> 
> Debian in the last week merged a new version of glslang where this
> hack/revert isn't required anymore, so depending on when someone gets to
> this bug it's worth double checking if the current version of glslang
> in-tree still requires this (currently it does).

As of glslang 11.2 (in-tree) this workaround is still needed. I suspect Debian may be making downstream changes to the package, but I haven't had a chance to look into the details yet.
Comment 5 Neshujah 2021-08-09 05:11:48 UTC Comment hidden (spam)
Comment 6 Gregory Beauregard 2021-11-20 18:20:32 UTC
Okay, packaging has changed in ffmpeg and vulkan stuff is integrated so for 9999/next ffmpeg release the status for enabling the vulkan filters is (in addition to --enable-vulkan):

add dependencies on:
dev-util/spirv-tools
media-libs/shaderc

add to configure options:
--enable-libshaderc

For the libplacebo filter (that depends on vulkan and you almost certainly want):
add dependency on:
media-libs/libplacebo (9999 for now, needs pending release)
add to configure options:
--enable-libplacebo

libplacebo support could be a separate use flag or enabled with vulkan

I'll update when libplacebo release happens
Comment 7 Iade Gesso 2022-01-30 19:52:32 UTC
In 4.4.1-r1 version new vulkan filters are still not built and both --enable-libshaderc and --enable-libplacebo are not recognized by ./configure


Iade
Comment 8 Gregory Beauregard 2022-01-30 22:36:46 UTC
Those instructions are for 9999/next (since released as ffmpeg 5.0)
Comment 9 Gregory Beauregard 2022-02-02 10:18:22 UTC
(In reply to Gregory Beauregard from comment #6)
> Okay, packaging has changed in ffmpeg and vulkan stuff is integrated so for
> 9999/next ffmpeg release the status for enabling the vulkan filters is (in
> addition to --enable-vulkan):
> 
> add dependencies on:
> dev-util/spirv-tools
> media-libs/shaderc
> 
> add to configure options:
> --enable-libshaderc
> 
> For the libplacebo filter (that depends on vulkan and you almost certainly
> want):
> add dependency on:
> media-libs/libplacebo (9999 for now, needs pending release)
> add to configure options:
> --enable-libplacebo
> 
> libplacebo support could be a separate use flag or enabled with vulkan
> 
> I'll update when libplacebo release happens

in addition to all this, media-libs/nv-codec-headers is going to need bumped to at least 11.1.5.1 to get vulkan working for nvidia users. Some timeline semaphore stuff was added that is needed for vulkan.