mirror of
https://github.com/hyprwm/wlroots-hyprland.git
synced 2024-12-25 19:29:49 +01:00
render/gles2: assert that GL_OES_EGL_image_external is supported
The target is set to GL_TEXTURE_EXTERNAL_OES when EGL_EXT_image_dma_buf_import_modifiers [1] returns an external_only flag. That spec states: > In order to support imports for the GL_TEXTURE_EXTERNAL_OES target, a > compatible OpenGL ES implementation supporting GL_OES_EGL_image_external > must be present. Fail hearder when a driver doesn't follow the spec instead of skipping rendering. See [2]. [1]: https://registry.khronos.org/EGL/extensions/EXT/EGL_EXT_image_dma_buf_import_modifiers.txt [2]: https://gitlab.freedesktop.org/wlroots/wlroots/-/merge_requests/3631#note_1584343
This commit is contained in:
parent
f216e97983
commit
9549749507
1 changed files with 3 additions and 6 deletions
|
@ -267,13 +267,10 @@ static bool gles2_render_subtexture_with_matrix(
|
|||
}
|
||||
break;
|
||||
case GL_TEXTURE_EXTERNAL_OES:
|
||||
// EGL_EXT_image_dma_buf_import_modifiers requires
|
||||
// GL_OES_EGL_image_external
|
||||
assert(renderer->exts.OES_egl_image_external);
|
||||
shader = &renderer->shaders.tex_ext;
|
||||
|
||||
if (!renderer->exts.OES_egl_image_external) {
|
||||
wlr_log(WLR_ERROR, "Failed to render texture: "
|
||||
"GL_TEXTURE_EXTERNAL_OES not supported");
|
||||
return false;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
abort();
|
||||
|
|
Loading…
Reference in a new issue