From 3682df2dd50313812aadaec92f554b3d60dadc30 Mon Sep 17 00:00:00 2001 From: wm4 Date: Mon, 13 Jun 2016 16:14:18 +0200 Subject: vo_opengl: hwdec_d3d11egl: remove ES2 swizzle special-case This was somehow done under the assumption that ANGLE would somehow always use RG in ES2 mode. But there's no basis for this. Even if ANGLE supports NV12 textures with drivers that do not allow for texture_rg, this cas eis too obscure to worry about. So do the robust and correct thing instead, and disable this code if texture_rg is not available. --- video/out/opengl/hwdec_d3d11egl.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/video/out/opengl/hwdec_d3d11egl.c b/video/out/opengl/hwdec_d3d11egl.c index 26d992dea3..549d3f5cac 100644 --- a/video/out/opengl/hwdec_d3d11egl.c +++ b/video/out/opengl/hwdec_d3d11egl.c @@ -114,7 +114,8 @@ static int create(struct gl_hwdec *hw) !strstr(exts, "EGL_ANGLE_stream_producer_d3d_texture_nv12") || !(strstr(hw->gl->extensions, "GL_OES_EGL_image_external_essl3") || hw->gl->es == 200) || - !strstr(exts, "EGL_EXT_device_query")) + !strstr(exts, "EGL_EXT_device_query") || + !(hw->gl->mpgl_caps & MPGL_CAP_TEX_RG)) return -1; HRESULT hr; @@ -309,7 +310,6 @@ static int map_frame(struct gl_hwdec *hw, struct mp_image *hw_image, .gl_target = GL_TEXTURE_EXTERNAL_OES, .tex_w = texdesc.Width / 2, .tex_h = texdesc.Height / 2, - .swizzle = "rgba", // even in ES2 mode (no LUMINANCE_ALPHA) }, }, }; -- cgit v1.2.3