cogl: Replace ANGLE with GLES3 and NV framebuffer_blit

ANGLE extensions are only provided by Google's Almost Native Graphics Layer
Engine (ANGLE) implementation. Therefore they do not seem too useful for
Mutter.

The reason to drop GL_ANGLE_framebuffer_blit support is that it has more
limitations compared to the glBlitFramebuffer in GL_EXT_framebuffer_blit,
GL_NV_framebuffer_bit, OpenGL 3.0 and OpenGL ES 3.0. Most importantly, the
ANGLE version cannot flip the image while copying, which limits
_cogl_blit_framebuffer to only off-screen <-> off-screen copies. Follow-up work
will need off-screen <-> on-screen copies.

Instead of adding yet more capability flags to Cogl, dropping ANGLE support
seems appropriate.

The NV extension is added to the list of glBlitFramebuffer providers because it
provides the same support as ANGLE and more.

Likewise OpenGL ES 3.0 is added to the list of glBlitFramebuffer providers
because e.g. Mesa GLES implementation usually provides it and that makes it
widely available, again surpassing the ANGLE supported features.

Follow-up patches will lift some of the Cogl assumptions of what
glBlitFramebuffer cannot do.

https://gitlab.gnome.org/GNOME/mutter/merge_requests/615
This commit is contained in:
Pekka Paalanen 2019-05-06 13:40:31 +03:00 committed by Jonas Ådahl
parent fc0ce11fcd
commit 3e68c9e8fa
2 changed files with 4 additions and 4 deletions

View File

@ -384,8 +384,7 @@ _cogl_push_framebuffers (CoglFramebuffer *draw_buffer,
* Note that this function differs a lot from the glBlitFramebuffer * Note that this function differs a lot from the glBlitFramebuffer
* function provided by the GL_EXT_framebuffer_blit extension. Notably * function provided by the GL_EXT_framebuffer_blit extension. Notably
* it doesn't support having different sizes for the source and * it doesn't support having different sizes for the source and
* destination rectangle. This isn't supported by the corresponding * destination rectangle. This doesn't seem
* GL_ANGLE_framebuffer_blit extension on GLES2.0 and it doesn't seem
* like a particularly useful feature. If the application wanted to * like a particularly useful feature. If the application wanted to
* scale the results it may make more sense to draw a primitive * scale the results it may make more sense to draw a primitive
* instead. * instead.

View File

@ -4,6 +4,7 @@
* A Low Level GPU Graphics and Utilities API * A Low Level GPU Graphics and Utilities API
* *
* Copyright (C) 2009, 2011 Intel Corporation. * Copyright (C) 2009, 2011 Intel Corporation.
* Copyright (C) 2019 DisplayLink (UK) Ltd.
* *
* Permission is hereby granted, free of charge, to any person * Permission is hereby granted, free of charge, to any person
* obtaining a copy of this software and associated documentation * obtaining a copy of this software and associated documentation
@ -111,8 +112,8 @@ COGL_EXT_END ()
COGL_EXT_BEGIN (offscreen_blit, 3, 0, COGL_EXT_BEGIN (offscreen_blit, 3, 0,
0, /* not in either GLES */ COGL_EXT_IN_GLES3,
"EXT\0ANGLE\0", "EXT\0NV\0",
"framebuffer_blit\0") "framebuffer_blit\0")
COGL_EXT_FUNCTION (void, glBlitFramebuffer, COGL_EXT_FUNCTION (void, glBlitFramebuffer,
(GLint srcX0, (GLint srcX0,