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

shaderc error resulting in blue screen #12510

Closed
eternal-sorrow opened this issue Sep 28, 2023 · 7 comments
Closed

shaderc error resulting in blue screen #12510

eternal-sorrow opened this issue Sep 28, 2023 · 7 comments
Labels
down-upstream features and bugs that need to be implemented and fixed upstream os:linux

Comments

@eternal-sorrow
Copy link

eternal-sorrow commented Sep 28, 2023

Important Information

Provide following Information:

  • mpv version 0.36.0
  • Linux Distribution and Version Gentoo latest
  • Source of the mpv binary Gentoo ebuild
  • If known which version of mpv introduced the problem 0.36.0
  • Window Manager and version sway 1.8.1
  • GPU driver and version AMDGPU Mesa 23.2.0_rc4
  • Possible screenshot or video of visual glitches not required

If you're not using git master or the latest release, update.
Releases are listed here: https://github.com/mpv-player/mpv/releases

Reproduction steps

  1. Open any video file with --gpu-context=waylandvk

Expected behavior

Video playback

Actual behavior

Blue screen and long red error traceback in console starting with
shaderc: internal error: compilation succeeded but failed to optimize: Capability cannot appear before the memory model instruction

Log file

https://0x0.st/HVJw.txt

Sample files

Any video file.

@CounterPillow
Copy link
Contributor

Gentoo

What CFLAGS did you compile with?

@eternal-sorrow
Copy link
Author

Globlally, I use https://github.com/InBetweenNames/gentooLTO, so my CFLAGS are -march=znver3 -O3 -fdevirtualize-at-ltrans -fipa-pta -fno-semantic-interposition -flto=16 -fuse-linker-plugin -fvect-cost-model=cheap -pipe, but I rebuilt mpv and libplacebo with -O2 -march=native -pipe to test it and it was the same.

@kasper93
Copy link
Contributor

What version of shaderc are you using? Could you try bisecting it? Looks like shaderc issue, judging by shaderc: internal error

@Dudemanguy Dudemanguy added the down-upstream features and bugs that need to be implemented and fixed upstream label Sep 28, 2023
@Dudemanguy
Copy link
Member

The chances of this being an mpv issue is close to zero.

@eternal-sorrow
Copy link
Author

What version of shaderc are you using?

shaderc-2023.6

Could you try bisecting it?

There is not much bisecting can be done with versions available in the repos, but I tried downgrading shaderc to 2023.04 and also tried downgrading some of it's deps (spirv-tools and glslang). Nothing changed.

@OceanS2000
Copy link

I can reproduce the problem and I believe this is a misoptimization in SPIRV-Tools with LTO.

As you happened to also use GentooLTO, you can try to add the following line to your packages.cflags

dev-util/spirv-tools +flto*

@eternal-sorrow
Copy link
Author

eternal-sorrow commented Oct 8, 2023

This is the first time I'm seeing that LTO caused run-time failures. Usually even if it causes some problems, it would be a build-time failure, not a run-time one.

I guess this issue can be closed. I need to figure out how to report this to spirv-tools though. Need a minimal reproducible example.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
down-upstream features and bugs that need to be implemented and fixed upstream os:linux
Projects
None yet
Development

No branches or pull requests

5 participants