vo_gpu_next: respect `gl->flipped`

This fixes flipped rendering on angle/dxinterop instances.
This commit is contained in:
Niklas Haas 2023-05-27 11:16:06 +02:00 committed by Niklas Haas
parent b216c09ade
commit 7595ea7c7c
1 changed files with 4 additions and 2 deletions

View File

@ -144,12 +144,13 @@ struct gpu_ctx *gpu_ctx_create(struct vo *vo, struct gl_video_opts *gl_opts)
#if HAVE_GL && defined(PL_HAVE_OPENGL)
if (ra_is_gl(ctx->ra_ctx->ra)) {
struct GL *gl = ra_gl_get(ctx->ra_ctx->ra);
pl_opengl opengl = pl_opengl_create(ctx->pllog,
pl_opengl_params(
.debug = ctx_opts->debug,
.allow_software = ctx_opts->allow_sw,
.get_proc_addr_ex = (void *) ra_gl_get(ctx->ra_ctx->ra)->get_fn,
.proc_ctx = ra_gl_get(ctx->ra_ctx->ra)->fn_ctx,
.get_proc_addr_ex = (void *) gl->get_fn,
.proc_ctx = gl->fn_ctx,
# if HAVE_EGL
.egl_display = eglGetCurrentDisplay(),
.egl_context = eglGetCurrentContext(),
@ -164,6 +165,7 @@ struct gpu_ctx *gpu_ctx_create(struct vo *vo, struct gl_video_opts *gl_opts)
ctx->swapchain = pl_opengl_create_swapchain(opengl, pl_opengl_swapchain_params(
.max_swapchain_depth = vo->opts->swapchain_depth,
.framebuffer.flipped = gl->flipped,
));
if (!ctx->swapchain)
goto err_out;