summaryrefslogtreecommitdiffstats
path: root/stream
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2018-09-21 15:42:37 +0200
committerAnton Kindestam <antonki@kth.se>2018-12-06 10:32:27 +0100
commitf4ce3b8bb9ac715e3390f047697d6905eab55ef1 (patch)
tree34c0055f9b513f95691782e04e555c0dba8c6ad8 /stream
parentace16fcfff5ab48f31ad1906532e412584b5e8ea (diff)
downloadmpv-f4ce3b8bb9ac715e3390f047697d6905eab55ef1.tar.bz2
mpv-f4ce3b8bb9ac715e3390f047697d6905eab55ef1.tar.xz
vo, vo_gpu, glx: correct GLX_OML_sync_control usage
I misunderstood how this extension works. If I understand it correctly now, it's worse than I thought. They key thing is that the (ust, msc, sbc) tripple is not for a single swap event. Instead, (ust, msc) run independently from sbc. Assuming a CFR display/compositor, this means you can at best know the vsync phase and frequency, but not the exact time a sbc changed value. There is GLX_INTEL_swap_event, which might work as expected, but it has no EGL equivalent (while GLX_OML_sync_control does, in theory). Redo the context_glx sync code. Now it's either more correct or less correct. I wanted to add proper skip detection (if a vsync gets skipped due to rendering taking too long and other problems), but it turned out to be too complex, so only some unused fields in vo.h are left of it. The "generic" skip detection has to do. The vsync_duration field is also unused by vo.c. Actually this seems to be an improvement. In cases where the flip call timing is off, but the real driver-level timing apparently still works, this will not report vsync skips or higher vsync jitter anymore. I could observe this with screenshots and fullscreen switching. On the other hand, maybe it just introduces an A/V offset or so. Why the fuck can't there be a proper API for retrieving these statistics? I'm not even asking for much.
Diffstat (limited to 'stream')
0 files changed, 0 insertions, 0 deletions