Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 884301 - dev-util/glslang update to 1.3.231 breaks vulkan in media-video/mpv
Summary: dev-util/glslang update to 1.3.231 breaks vulkan in media-video/mpv
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Nick Sarnie
URL:
Whiteboard:
Keywords:
Depends on: 884381
Blocks:
  Show dependency tree
 
Reported: 2022-12-04 14:12 UTC by Hadrien Lacour
Modified: 2022-12-05 17:22 UTC (History)
2 users (show)

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


Attachments
emerge --info (emerge_info.txt,16.73 KB, text/plain)
2022-12-04 19:46 UTC, Hadrien Lacour
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Hadrien Lacour 2022-12-04 14:12:42 UTC
Hello,

basically mpv's vulkan mode breaks with this update (reverting only glslang fixes it). Maybe a hairy problem, someone on IRC using mpv on Gentoo with same glslang and libplacebo (5.229.1, tried with git too) versions didn't have any problem.

The exact assertion is:
$ mpv --no-config --gpu-api=vulkan my.mkv
...
mpv: /var/tmp/portage/dev-util/glslang-1.3.231-r2/work/glslang-sdk-1.3.231.0/SPIRV/SpvBuilder.cpp:1075: spv::Id spv::Builder::createDebugGlobalVariable(spv::Id, const char*, spv::Id): Assertion `type != 0' failed.


https://github.com/mpv-player/mpv/issues/10965 for details
Comment 1 Hadrien Lacour 2022-12-04 14:17:49 UTC
Oh, and I tried with mainline mpv, to be sure the vapoursynth build option wasn't the culprit. Same problem.

emerge -pqv mpv:
[ebuild  N    ] media-video/mpv-0.35.0  USE="X alsa archive bluray cli drm iconv jpeg libmpv libplacebo lua opengl uchardet vapoursynth vulkan zlib (-aqua) -cdda (-coreaudio) -debug -dvb -dvd -egl -gamepad -jack -javascript -lcms -libcaca (-mmal) -nvenc -openal -pipewire -pulseaudio (-raspberry-pi) -rubberband -sdl (-selinux) -sndio -test -tools -vaapi -vdpau -wayland -xv -zimg" LUA_SINGLE_TARGET="luajit -lua5-1" PYTHON_SINGLE_TARGET="python3_10 -python3_9 -python3_11"
Comment 2 Nick Sarnie gentoo-dev 2022-12-04 18:38:18 UTC
Just tired the repro steps and it works for me, so probably an upstream issue with specific mpv input. Will let the upstream bug figure it out.
Comment 3 Hadrien Lacour 2022-12-04 18:55:24 UTC
I see. Could it be hardware specific (with a codepath conditional on hardware)?
Comment 4 Nick Sarnie gentoo-dev 2022-12-04 18:56:54 UTC
Sure, it could be that too. A developer for either glslang or mpv needs to investigate, it doesn't seem like a packaging issue.
Comment 5 Ionen Wolkens gentoo-dev 2022-12-04 19:02:58 UTC
fwiw no issues either, same glslang-1.3.231 + libplacebo, built with exact same USE (minus vapoursynth), same mpv command and it works (using nvidia-drivers-525.60.1 fwiw)

with -v, shown being used too:
    [vo/gpu] Probing for best GPU context.
    [vo/gpu/vulkan] Initializing GPU context 'x11vk'
    [vo/gpu/libplacebo] Initialized libplacebo v5.229.0 (API v229)

emerge --info? sometime even different optimizations could trigger these issues
Comment 6 Ionen Wolkens gentoo-dev 2022-12-04 19:29:03 UTC
The new assert non-trivially comes from https://github.com/KhronosGroup/glslang/pull/2985, not that I can say what's up with it and why it's failing for you (as sarnex says, that looks more for upstream).
Comment 7 Hadrien Lacour 2022-12-04 19:46:21 UTC
Created attachment 840103 [details]
emerge --info

I use -O3 -march=native and stable mesa with a RX580. Nothing out-of-the-ordinary for a Gentoo user, I'd say.
Comment 8 Nick Sarnie gentoo-dev 2022-12-04 20:17:27 UTC
If you want to try stuff, maybe
1) Try dropping to -O2 for glslang/mpv, which is what I'm using
2) Try unstable mesa, which is what I'm using
Comment 9 Hadrien Lacour 2022-12-04 20:34:42 UTC
No luck. Guess I'll just wait for upstream to inspect my gdb backtrace.
Comment 10 Nick Sarnie gentoo-dev 2022-12-04 20:35:52 UTC
Just to be complete, you could also try O2 for libplacebo and shaderc since those are involved in the backtrace. But just a hail mary.
Comment 11 Hadrien Lacour 2022-12-04 22:09:29 UTC
So:
* According to upstream, I tried rebuilding media-libs/shaderc, but hit https://bugs.gentoo.org/show_bug.cgi?id=884379
* After unmasking everything that needed to in that unholy dependency mess, problem is fixed.

I don't know if something is breaking ABI contract or anything, sadly.
Comment 12 Nick Sarnie gentoo-dev 2022-12-04 22:12:46 UTC
I think I see the problem. If you have irc can you join #gentoo-desktop and ping me (sarnex)