mpv
mpv copied to clipboard
vo/gpu-next/opengl: frame timing statistics for compute shader passes are always zero
mpv Information
mpv v0.38.0-77-g0318174273 Copyright © 2000-2024 mpv/MPlayer/mplayer2 projects
libplacebo version: v7.349.0
FFmpeg version: 6.0.1
FFmpeg library versions:
libavutil 58.2.100
libavcodec 60.3.100
libavformat 60.3.100
libswscale 7.1.100
libavfilter 9.3.100
libswresample 4.10.100
Other Information
- Linux version: Fedora Linux 40.20240519.0 (Silverblue)
- Kernel Version: 6.8.9-300.fc40.x86_64
- GPU Model: Intel Corporation DG2 [Arc A750] [8086:56a1]
- Mesa/GPU Driver Version: 4.6 (Core Profile) Mesa 24.0.6 (git-c659c7e660)
- Window Manager and Version: Mutter (GNOME 46.1)
- Source mpv: Built from HEAD
- Introduced in version: IDK
Reproduction Steps
Get a compute shader. Here I use ravu-zoom-ar-r3-yuv.hook as an example.
Run:
mpv test.mkv --no-config --msg-level=vo/gpu-next=trace --fs --vo=gpu-next --gpu-api=opengl --glsl-shader=ravu-zoom-ar-r3-yuv-compute.hook --log-file=mpv.log
Ensure the compute shader is hooked and takes effect.
See frame timing in Shift+I page 2.
Expected Behavior
The timing of the pass of compute shader should be correct. In my machine, compared with:
--vo=gpu--vo=gpu-next --gpu-api=openglthe duration of this pass should be near 4000us.
Actual Behavior
The timing of this pass is always zero; I have confirmed it in the log file as well:
[vo/gpu-next/libplacebo] Spent 0.000 ms on shader: RAVU-Zoom-AR (yuv, r3, compute)
I tried adding a gl->MemoryBarrier immediately after gl->DispatchCompute in gl_pass_run() in libplacebo/src/opengl/gpu_pass.c, but the result did not change.
I've confirmed that the results got from gl->GetQueryObjectui64v for the pass are very small values like 0 and 52.
I've tried MESA_LOADER_DRIVER_OVERRIDE=zink and confirmed that it is unlikely a vendor-specific issue.
Log File
Sample Files
No response
I carefully read all instruction and confirm that I did the following:
- [X] I tested with the latest mpv version to validate that the issue is not already fixed.
- [X] I provided all required information including system and mpv version.
- [X] I produced the log file with the exact same set of files, parameters, and conditions used in "Reproduction Steps", with the addition of
--log-file=output.txt. - [X] I produced the log file while the behaviors described in "Actual Behavior" were actively observed.
- [X] I attached the full, untruncated log file.
- [X] I attached the backtrace in the case of a crash.