summaryrefslogtreecommitdiffstats
path: root/video/out/opengl/hwdec_d3d11egl.c
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2016-06-13 16:14:18 +0200
committerwm4 <wm4@nowhere>2016-06-13 16:15:57 +0200
commit3682df2dd50313812aadaec92f554b3d60dadc30 (patch)
tree9d6802c258708e17e94f2710f1845343ce122edf /video/out/opengl/hwdec_d3d11egl.c
parent81ec9cf596e924036990008a35a971028b336bf2 (diff)
downloadmpv-3682df2dd50313812aadaec92f554b3d60dadc30.tar.bz2
mpv-3682df2dd50313812aadaec92f554b3d60dadc30.tar.xz
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.
Diffstat (limited to 'video/out/opengl/hwdec_d3d11egl.c')
-rw-r--r--video/out/opengl/hwdec_d3d11egl.c4
1 files 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)
},
},
};