diff options
author | Philip Langdale <philipl@overt.org> | 2022-03-12 10:54:23 -0800 |
---|---|---|
committer | Philip Langdale <github.philipl@overt.org> | 2023-05-28 15:46:05 -0700 |
commit | 085f3e31a091daf7d6649508b162cfcde826702a (patch) | |
tree | 50eb9dc75c2c9071cad2b0e77baba4e97f1cb911 /video/out/opengl/hwdec_dxva2gldx.c | |
parent | 959ef843d2752e802874b265b21ee6542388a019 (diff) | |
download | mpv-085f3e31a091daf7d6649508b162cfcde826702a.tar.bz2 mpv-085f3e31a091daf7d6649508b162cfcde826702a.tar.xz |
vo: hwdec: Pass the ra_ctx to hwdecs instead of just the ra
We will need the full ra_ctx to be able to look up all the state
required to initialise an ffmpeg vulkan hwcontext, so pass let's
pass the ra_ctx instead of just the ra.
Diffstat (limited to 'video/out/opengl/hwdec_dxva2gldx.c')
-rw-r--r-- | video/out/opengl/hwdec_dxva2gldx.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/video/out/opengl/hwdec_dxva2gldx.c b/video/out/opengl/hwdec_dxva2gldx.c index d92dd75d10..0a0784af4c 100644 --- a/video/out/opengl/hwdec_dxva2gldx.c +++ b/video/out/opengl/hwdec_dxva2gldx.c @@ -58,21 +58,22 @@ static void uninit(struct ra_hwdec *hw) static int init(struct ra_hwdec *hw) { struct priv_owner *p = hw->priv; + struct ra *ra = hw->ra_ctx->ra; - if (!ra_is_gl(hw->ra)) + if (!ra_is_gl(ra)) return -1; - GL *gl = ra_gl_get(hw->ra); + GL *gl = ra_gl_get(ra); if (!(gl->mpgl_caps & MPGL_CAP_DXINTEROP)) return -1; // AMD drivers won't open multiple dxinterop HANDLES on the same D3D device, // so we request the one already in use by context_dxinterop - p->device_h = ra_get_native_resource(hw->ra, "dxinterop_device_HANDLE"); + p->device_h = ra_get_native_resource(ra, "dxinterop_device_HANDLE"); if (!p->device_h) return -1; // But we also still need the actual D3D device - p->device = ra_get_native_resource(hw->ra, "IDirect3DDevice9Ex"); + p->device = ra_get_native_resource(ra, "IDirect3DDevice9Ex"); if (!p->device) return -1; IDirect3DDevice9Ex_AddRef(p->device); |