gl-renderer: always enable unpack subimage and RG textures in ES3 contexts
The GL_EXT_unpack_subimage and GL_EXT_texture_rg are part of the core ES 3.0 specification, so also check the GL driver version in addition to the extension string to determine if those features are supported. This allows using those extensions on some GL drivers that do not expose them in the extensions string, but still support OpenGLES3. Signed-off-by: Arnaud Vrac <avrac@freebox.fr> Reviewed-by: Derek Foreman <derekf@osg.samsung.com> Reviewed-by: Daniel Stone <daniels@collabora.com>
This commit is contained in:
committed by
Daniel Stone
parent
cc1a22bca9
commit
e79694ceec
@@ -3685,10 +3685,12 @@ gl_renderer_setup(struct weston_compositor *ec, EGLSurface egl_surface)
|
||||
else
|
||||
ec->read_format = PIXMAN_a8b8g8r8;
|
||||
|
||||
if (weston_check_egl_extension(extensions, "GL_EXT_unpack_subimage"))
|
||||
if (gr->gl_version >= GR_GL_VERSION(3, 0) ||
|
||||
weston_check_egl_extension(extensions, "GL_EXT_unpack_subimage"))
|
||||
gr->has_unpack_subimage = 1;
|
||||
|
||||
if (weston_check_egl_extension(extensions, "GL_EXT_texture_rg"))
|
||||
if (gr->gl_version >= GR_GL_VERSION(3, 0) ||
|
||||
weston_check_egl_extension(extensions, "GL_EXT_texture_rg"))
|
||||
gr->has_gl_texture_rg = 1;
|
||||
|
||||
if (weston_check_egl_extension(extensions, "GL_OES_EGL_image_external"))
|
||||
|
||||
Reference in New Issue
Block a user