diff options
author | Simon Ser <contact@emersion.fr> | 2020-12-15 14:55:18 +0100 |
---|---|---|
committer | Simon Ser <contact@emersion.fr> | 2020-12-15 14:55:18 +0100 |
commit | 3fd809888184c0e629bea2b628e2caca622bab88 (patch) | |
tree | b12ea7096858495246c1fd519cc1b4018d043441 /render/gles2 | |
parent | e57a52e7f793a815f5b635b3751112d4c6f9302b (diff) |
render/gles2: require GL_EXT_unpack_subimage
We implicitly depended on this extension.
Diffstat (limited to 'render/gles2')
-rw-r--r-- | render/gles2/renderer.c | 5 | ||||
-rw-r--r-- | render/gles2/texture.c | 1 |
2 files changed, 5 insertions, 1 deletions
diff --git a/render/gles2/renderer.c b/render/gles2/renderer.c index db313034..76114278 100644 --- a/render/gles2/renderer.c +++ b/render/gles2/renderer.c @@ -893,6 +893,11 @@ struct wlr_renderer *wlr_gles2_renderer_create(struct wlr_egl *egl) { free(renderer); return NULL; } + if (!check_gl_ext(exts_str, "GL_EXT_unpack_subimage")) { + wlr_log(WLR_ERROR, "GL_EXT_unpack_subimage not supported"); + free(renderer); + return NULL; + } renderer->exts.read_format_bgra_ext = check_gl_ext(exts_str, "GL_EXT_read_format_bgra"); diff --git a/render/gles2/texture.c b/render/gles2/texture.c index 179bfd89..ea3a1161 100644 --- a/render/gles2/texture.c +++ b/render/gles2/texture.c @@ -55,7 +55,6 @@ static bool gles2_texture_write_pixels(struct wlr_texture *wlr_texture, get_gles2_format_from_wl(texture->wl_format); assert(fmt); - // TODO: what if the unpack subimage extension isn't supported? push_gles2_debug(texture->renderer); glBindTexture(GL_TEXTURE_2D, texture->tex); |