mpv/video/out/hwdec
Philip Langdale 8c1f94f0e7 vo_gpu: hwdec_cuda: Synchronise OpenGL Interop
Previously, there appeared to be implicit synchronisation in the
GL interop path, and we never observed any visual glitches. However,
recently, I started seeing stuttering in the GL path and on closer
examination it looked like read-before-write behaviour where GL
would display an old frame again rather than the current one.

After verifying that disabling hwdec made the problem go away,
I tried adding a cuStreamSynchronize() after the memcpys and that
also resolved the problem, so it's clearly sync related.

cuStreamSynchronize() is a CPU sync and so more heavy-weight than
you want, but it's the only tool we have. There is no mechanism
defined for synchronising GL to CUDA (It looks like there is a way
to synchronise CUDA to EGL but it appears one way and so wouldn't
directly address this problem).

Anyway, empirically, the output now looks the same as with hwdec
off.
2019-09-28 19:24:24 +03:00
..
hwdec_cuda.c vo_gpu: hwdec_cuda: Synchronise OpenGL Interop 2019-09-28 19:24:24 +03:00
hwdec_cuda.h vo_gpu: hwdec_cuda: Synchronise OpenGL Interop 2019-09-28 19:24:24 +03:00
hwdec_cuda_gl.c vo_gpu: hwdec_cuda: Synchronise OpenGL Interop 2019-09-28 19:24:24 +03:00
hwdec_cuda_vk.c
hwdec_vaapi.c vo_gpu: hwdec_vaegl: silence confusing message during probing 2019-09-19 20:37:05 +02:00
hwdec_vaapi.h vo_gpu: hwdec_vaapi: Refactor Vulkan and OpenGL interops for VAAPI 2019-09-15 17:51:47 -07:00
hwdec_vaapi_gl.c hwdec_vaapi_gl: add missing compatibility defines 2019-09-27 13:05:21 +02:00
hwdec_vaapi_vk.c vo_gpu: hwdec_vaapi: Refactor Vulkan and OpenGL interops for VAAPI 2019-09-15 17:51:47 -07:00