mpv/video
Sultan Alsawaf db524988b1 x11: remove PresentNotifyMSC from egl/glx/vulkan to fix xpresent timing
PresentNotifyMSC turns out to be not only redundant, but also harmful with
mesa-backed egl/glx/vulkan VOs because for all of them, mesa uses
PresentPixmap behind the scenes when DRI3 is available, which already
spawns a PresentCompleteNotify event when the buffer swap actually
finishes. This is important because without using the timing information
from these PresentCompleteKindPixmap events, there's no way for mpv to know
exactly when a frame becomes visible on the display.

By using PresentNotifyMSC in conjunction with DRI3-enabled mesa, two
problems are created:
1. mpv assumes that a vblank won't elapse (i.e., it assumes the current MSC
   won't change) between the time when mesa enqueues the buffer swap and
   the time when mpv calls PresentNotifyMSC to ask xorg for a notification
   at the next MSC, relative to the current MSC at the time that xorg reads
   it for the PresentNotifyMSC call. This means that mpv could get a
   notification one or more vblanks later than it expects, since the
   intention here is for mpv to get a notification at the MSC that the
   buffer swap completes.
2. mpv assumes that a buffer swap always takes one vblank to complete,
   which isn't always true. A buffer swap (i.e., a page flip) could take
   longer than that depending on hardware conditions (if the GPU is running
   slowly or needs to exit a low-power state), scheduling delays (under
   heavy system or GPU load), or unfortunate timing (if the raster scan
   line happens to be at one of the last few rows of pixels and a vblank
   elapses just before the buffer swap is enqueued).

This causes mpv to have a faulty assumption of when frames become visible.

Since mpv already receives the PresentCompleteNotify events generated by
mesa's buffer swaps under the hood, the PresentNotifyMSC usage is unneeded
and just throws a wrench in mpv's vsync timing when xpresent is enabled.

Simply removing the PresentNotifyMSC usage from the egl, glx, and vulkan
VOs fixes the xpresent vsync timing.
2023-01-28 17:42:34 +01:00
..
decode vd_lavc: add "auto" choice for vd-lavc-dr 2023-01-24 16:40:37 +01:00
filter filters: lavfi: allow hwdec_interop selection for filters 2022-09-21 09:39:34 -07:00
out x11: remove PresentNotifyMSC from egl/glx/vulkan to fix xpresent timing 2023-01-28 17:42:34 +01:00
csputils.c csputils: add mappings for DCI-P3 (ST.431-2) and P3-D65 (ST.432-1) 2020-12-30 20:03:54 +02:00
csputils.h csputils: add MP_CHROMA_TOPLEFT 2020-12-02 01:36:29 +01:00
cuda.c video: cuda: add explicit context creation for copy hwaccels 2019-12-29 14:32:47 -08:00
d3d.c video: remove mp_image_params.hw_flags field 2019-10-17 22:43:14 +02:00
d3d.h video: move d3d.c out of decode sub directory 2017-12-01 17:58:56 +01:00
drmprime.c video/drmprime: fix use-after-free 2022-08-09 22:19:45 -07:00
fmt-conversion.c filters/f_hwtransfer: remove VAAPI <-> Vulkan mapping for now 2022-10-29 18:49:46 -07:00
fmt-conversion.h video/fmt-conversion, img_format: change license to LGPL 2017-06-18 15:15:07 +02:00
hwdec.c filters: support loading new hwdec_interops from filters 2022-09-21 09:39:34 -07:00
hwdec.h vo: hwdec: do hwdec interop lookup by image format 2022-09-21 09:39:34 -07:00
image_loader.c screenshot, vo_image: use global swscale/zimg parameters 2019-10-31 15:44:09 +01:00
image_loader.h x11: load icon differently 2017-07-01 15:56:12 +02:00
image_writer.c video/image_writer: tag colorspace in AVCodecContext 2022-05-04 14:42:06 -04:00
image_writer.h video/image_writer: add Jpeg XL screenshots 2022-04-26 16:48:00 +03:00
img_format.c video: some concessions to big endian hosts 2020-06-17 19:44:45 +02:00
img_format.h filters/f_hwtransfer: remove VAAPI <-> Vulkan mapping for now 2022-10-29 18:49:46 -07:00
mp_image.c mp_image: fix XYZ primaries default 2023-01-24 16:40:37 +01:00
mp_image.h mp_image: support film grain parameters 2022-04-05 15:02:18 +02:00
mp_image_pool.c f_hwtransfer: mp_image_pool: support HW -> HW mapping 2022-09-21 09:39:34 -07:00
mp_image_pool.h f_hwtransfer: mp_image_pool: support HW -> HW mapping 2022-09-21 09:39:34 -07:00
repack.c repack: add repacker for ccc16x16 formats 2022-09-10 12:31:44 -07:00
repack.h repack: add support for converting from/to float formats 2020-05-09 18:02:57 +02:00
sws_utils.c sws_utils: work around libswscale corrupting memory yet again 2020-09-17 15:24:27 +02:00
sws_utils.h sws_utils: work around libswscale corrupting memory yet again 2020-09-17 15:24:27 +02:00
vaapi.c vaapi: correct broken NULL check 2020-06-03 15:12:08 +02:00
vaapi.h vo_gpu: hwdec_vaapi: Suppress format errors when probing 2019-07-08 01:57:02 +02:00
vdpau.c video: remove RGB32/BGR32 aliases 2020-05-11 19:57:34 +02:00
vdpau.h vd_lavc, vdpau, vaapi: restore emulated API avoidance 2017-12-02 04:53:51 +01:00
vdpau_functions.inc
vdpau_mixer.c video: redo video equalizer option handling 2017-08-22 17:01:35 +02:00
vdpau_mixer.h video: redo video equalizer option handling 2017-08-22 17:01:35 +02:00
zimg.c csputils: add MP_CHROMA_TOPLEFT 2020-12-02 01:36:29 +01:00
zimg.h zimg: add slice threading and use it by default 2020-07-15 22:59:17 +02:00