From 7595ea7c7c11402e91121bab9c68cd73c720b8a1 Mon Sep 17 00:00:00 2001 From: Niklas Haas Date: Sat, 27 May 2023 11:16:06 +0200 Subject: [PATCH] vo_gpu_next: respect `gl->flipped` This fixes flipped rendering on angle/dxinterop instances. --- video/out/gpu_next/context.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/video/out/gpu_next/context.c b/video/out/gpu_next/context.c index 96f255d448..2887cff938 100644 --- a/video/out/gpu_next/context.c +++ b/video/out/gpu_next/context.c @@ -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;