mpv icon indicating copy to clipboard operation
mpv copied to clipboard

[RFC] vo_gpu_next: use libplacebo interop for GL hwdec

Open haasn opened this issue 3 years ago • 1 comments

Pass a ra_pl wrapper to the hwdec functions, instead of the original ra_ctx the OpenGL context was created from.

I'm well aware that this is all a gigantic mess and we should be making the code less reliant on ra, not more... but at least this allows us to start using the OpenGL interop inside libplcaebo for --vo=gpu-next, which is a step forwards as it allows for less messy integration and upstream bug fixes (e.g. EGLImageKHR mapping on desktop GL).

haasn avatar Oct 20 '22 09:10 haasn

Unfortunately I think this breaks some hwdecs, e.g. aimagereader, d3d11egl. Ideally we would rewrite these on top of pl_gpu abstractions as well, the way dmabuf / cuda are handled currently.

But, I think in writing this comment I've already made the decision that we should probably not try integrating vo_gpu and vo_gpu_next more, but should instead be doing the opposite: rewriting context creation and hwdec code from scratch, factoring out common helpers where needed, and remove all dependency of gpu_next on ra_ctx code.

I will probably end up doing this after 0.35, because it would represent both a major breaking change and a regression in functionality.

haasn avatar Oct 20 '22 09:10 haasn

As this breaks some hwdecs and needs significantly different approach, I'm closing this for now. Feel free to reopen, create a new one.

kasper93 avatar Apr 18 '24 16:04 kasper93