1
0
mirror of https://github.com/mpv-player/mpv synced 2025-02-03 21:52:12 +00:00
mpv/video/out/opengl
Niklas Haas dd78cc6fe7 vo_opengl: refactor vo performance subsystem
This replaces `vo-performance` by `vo-passes`, bringing with it a number
of changes and improvements:

1. mpv users can now introspect the vo_opengl passes, which is something
   that has been requested multiple times.

2. performance data is now measured per-pass, which helps both
   development and debugging.

3. since adding more passes is cheap, we can now report information for
   more passes (e.g. the blit pass, and the osd pass). Note: we also
   switch to nanosecond scale, to be able to measure these passes
   better.

4. `--user-shaders` authors can now describe their own passes, helping
   users both identify which user shaders are active at any given time
   as well as helping shader authors identify performance issues.

5. the timing data per pass is now exported as a full list of samples,
   so projects like Argon-/mpv-stats can immediately read out all of the
   samples and render a graph without having to manually poll this
   option constantly.

Due to gl_timer's design being complicated (directly reading performance
data would block, so we delay the actual read-back until the next _start
command), it's vital not to conflate different passes that might be
doing different things from one frame to another. To accomplish this,
the actual timers are stored as part of the gl_shader_cache's sc_entry,
which makes them unique for that exact shader.

Starting and stopping the time measurement is easy to unify with the
gl_sc architecture, because the existing API already relies on a
"generate, render, reset" flow, so we can just put timer_start and
timer_stop in sc_generate and sc_reset, respectively.

The ugliest thing about this code is that due to the need to keep pass
information relatively stable in between frames, we need to distinguish
between "new" and "redrawn" frames, which bloats the code somewhat and
also feels hacky and vo_opengl-specific. (But then again, this entire
thing is vo_opengl-specific)
2017-07-01 00:58:27 +02:00
..
angle_dynamic.c
angle_dynamic.h
common.c vo_opengl: drop TLS usage 2017-05-11 17:47:33 +02:00
common.h vo_opengl: drop TLS usage 2017-05-11 17:47:33 +02:00
context_angle.c context_angle: fix fallback to D3D9 device 2017-05-16 22:59:15 +10:00
context_cocoa.c
context_drm_egl.c vo_opengl: context_drm_egl: remove unnecessary include 2017-04-26 17:43:23 +02:00
context_dxinterop.c context_dxinterop: lock rendertarget after present when swapping buffers 2017-06-18 20:54:44 +02:00
context_mali_fbdev.c
context_rpi.c
context_vdpau.c vo_opengl: add our own copy of OpenGL headers 2017-04-07 15:09:27 +02:00
context_w32.c vo_opengl: add our own copy of OpenGL headers 2017-04-07 15:09:27 +02:00
context_wayland.c
context_x11.c vo_opengl: add our own copy of OpenGL headers 2017-04-07 15:09:27 +02:00
context_x11egl.c
context.c d3d: make DXVA2 support optional 2017-06-30 18:57:37 +02:00
context.h
cuda_dynamic.c
cuda_dynamic.h vo_opengl: hwdec_cuda: Support separate decode and display devices 2017-06-03 16:41:03 +02:00
egl_helpers.c
egl_helpers.h
formats.c video: get rid of swapped packed YUV 2017-06-30 18:01:29 +02:00
formats.h vo_opengl: remove mp_imgfmt_desc and IMGFLAG_ usage 2017-06-30 17:56:42 +02:00
gl_headers.h vo_opengl: minor cosmetics 2017-04-14 17:35:27 +02:00
hwdec_cuda.c vo_opengl: hwdec_cuda: Support separate decode and display devices 2017-06-03 16:41:03 +02:00
hwdec_d3d11egl.c d3d: add support for new libavcodec hwaccel API 2017-06-08 21:51:25 +02:00
hwdec_d3d11eglrgb.c d3d: UWP support for D3D11VA 2017-06-30 18:57:37 +02:00
hwdec_dxva2egl.c d3d: add support for new libavcodec hwaccel API 2017-06-08 21:51:25 +02:00
hwdec_dxva2gldx.c d3d: add support for new libavcodec hwaccel API 2017-06-08 21:51:25 +02:00
hwdec_ios.m vo_opengl: restructure format setup 2017-06-30 17:07:55 +02:00
hwdec_osx.c vo_opengl: restructure format setup 2017-06-30 17:07:55 +02:00
hwdec_rpi.c vo_opengl: drop TLS usage 2017-05-11 17:47:33 +02:00
hwdec_vaegl.c vo_opengl: restructure format setup 2017-06-30 17:07:55 +02:00
hwdec_vaglx.c
hwdec_vdpau.c
hwdec.c d3d: make DXVA2 support optional 2017-06-30 18:57:37 +02:00
hwdec.h vo_opengl: restructure format setup 2017-06-30 17:07:55 +02:00
lcms.c
lcms.h
osd.c
osd.h
user_shaders.c vo_opengl: refactor vo performance subsystem 2017-07-01 00:58:27 +02:00
user_shaders.h vo_opengl: refactor vo performance subsystem 2017-07-01 00:58:27 +02:00
utils.c vo_opengl: refactor vo performance subsystem 2017-07-01 00:58:27 +02:00
utils.h vo_opengl: refactor vo performance subsystem 2017-07-01 00:58:27 +02:00
video_shaders.c vo_opengl: refactor vo performance subsystem 2017-07-01 00:58:27 +02:00
video_shaders.h vo_opengl: implement support for OOTFs and non-display referred content 2017-06-18 20:54:44 +02:00
video.c vo_opengl: refactor vo performance subsystem 2017-07-01 00:58:27 +02:00
video.h vo_opengl: refactor vo performance subsystem 2017-07-01 00:58:27 +02:00