|
|
657d8e |
From 04d921c2c1da571c8c61a4ca12a380bc3b9623fe Mon Sep 17 00:00:00 2001
|
|
|
657d8e |
From: Pekka Paalanen <pekka.paalanen@collabora.com>
|
|
|
657d8e |
Date: Mon, 6 May 2019 13:40:31 +0300
|
|
|
657d8e |
Subject: [PATCH 03/12] cogl: Replace ANGLE with GLES3 and NV framebuffer_blit
|
|
|
657d8e |
|
|
|
657d8e |
ANGLE extensions are only provided by Google's Almost Native Graphics Layer
|
|
|
657d8e |
Engine (ANGLE) implementation. Therefore they do not seem too useful for
|
|
|
657d8e |
Mutter.
|
|
|
657d8e |
|
|
|
657d8e |
The reason to drop GL_ANGLE_framebuffer_blit support is that it has more
|
|
|
657d8e |
limitations compared to the glBlitFramebuffer in GL_EXT_framebuffer_blit,
|
|
|
657d8e |
GL_NV_framebuffer_bit, OpenGL 3.0 and OpenGL ES 3.0. Most importantly, the
|
|
|
657d8e |
ANGLE version cannot flip the image while copying, which limits
|
|
|
657d8e |
_cogl_blit_framebuffer to only off-screen <-> off-screen copies. Follow-up work
|
|
|
657d8e |
will need off-screen <-> on-screen copies.
|
|
|
657d8e |
|
|
|
657d8e |
Instead of adding yet more capability flags to Cogl, dropping ANGLE support
|
|
|
657d8e |
seems appropriate.
|
|
|
657d8e |
|
|
|
657d8e |
The NV extension is added to the list of glBlitFramebuffer providers because it
|
|
|
657d8e |
provides the same support as ANGLE and more.
|
|
|
657d8e |
|
|
|
657d8e |
Likewise OpenGL ES 3.0 is added to the list of glBlitFramebuffer providers
|
|
|
657d8e |
because e.g. Mesa GLES implementation usually provides it and that makes it
|
|
|
657d8e |
widely available, again surpassing the ANGLE supported features.
|
|
|
657d8e |
|
|
|
657d8e |
Follow-up patches will lift some of the Cogl assumptions of what
|
|
|
657d8e |
glBlitFramebuffer cannot do.
|
|
|
657d8e |
|
|
|
657d8e |
https://gitlab.gnome.org/GNOME/mutter/merge_requests/615
|
|
|
657d8e |
|
|
|
657d8e |
(cherry picked from commit 3e68c9e8faa78298039fa3583898f18550740812)
|
|
|
657d8e |
---
|
|
|
657d8e |
cogl/cogl/cogl-framebuffer-private.h | 3 +--
|
|
|
657d8e |
cogl/cogl/gl-prototypes/cogl-all-functions.h | 5 +++--
|
|
|
657d8e |
2 files changed, 4 insertions(+), 4 deletions(-)
|
|
|
657d8e |
|
|
|
657d8e |
diff --git a/cogl/cogl/cogl-framebuffer-private.h b/cogl/cogl/cogl-framebuffer-private.h
|
|
|
657d8e |
index de886b64f..3aab852c4 100644
|
|
|
657d8e |
--- a/cogl/cogl/cogl-framebuffer-private.h
|
|
|
657d8e |
+++ b/cogl/cogl/cogl-framebuffer-private.h
|
|
|
657d8e |
@@ -387,8 +387,7 @@ _cogl_push_framebuffers (CoglFramebuffer *draw_buffer,
|
|
|
657d8e |
* Note that this function differs a lot from the glBlitFramebuffer
|
|
|
657d8e |
* function provided by the GL_EXT_framebuffer_blit extension. Notably
|
|
|
657d8e |
* it doesn't support having different sizes for the source and
|
|
|
657d8e |
- * destination rectangle. This isn't supported by the corresponding
|
|
|
657d8e |
- * GL_ANGLE_framebuffer_blit extension on GLES2.0 and it doesn't seem
|
|
|
657d8e |
+ * destination rectangle. This doesn't seem
|
|
|
657d8e |
* like a particularly useful feature. If the application wanted to
|
|
|
657d8e |
* scale the results it may make more sense to draw a primitive
|
|
|
657d8e |
* instead.
|
|
|
657d8e |
diff --git a/cogl/cogl/gl-prototypes/cogl-all-functions.h b/cogl/cogl/gl-prototypes/cogl-all-functions.h
|
|
|
657d8e |
index 924ee349d..0af126059 100644
|
|
|
657d8e |
--- a/cogl/cogl/gl-prototypes/cogl-all-functions.h
|
|
|
657d8e |
+++ b/cogl/cogl/gl-prototypes/cogl-all-functions.h
|
|
|
657d8e |
@@ -4,6 +4,7 @@
|
|
|
657d8e |
* A Low Level GPU Graphics and Utilities API
|
|
|
657d8e |
*
|
|
|
657d8e |
* Copyright (C) 2009, 2011 Intel Corporation.
|
|
|
657d8e |
+ * Copyright (C) 2019 DisplayLink (UK) Ltd.
|
|
|
657d8e |
*
|
|
|
657d8e |
* Permission is hereby granted, free of charge, to any person
|
|
|
657d8e |
* obtaining a copy of this software and associated documentation
|
|
|
657d8e |
@@ -132,8 +133,8 @@ COGL_EXT_END ()
|
|
|
657d8e |
|
|
|
657d8e |
|
|
|
657d8e |
COGL_EXT_BEGIN (offscreen_blit, 3, 0,
|
|
|
657d8e |
- 0, /* not in either GLES */
|
|
|
657d8e |
- "EXT\0ANGLE\0",
|
|
|
657d8e |
+ COGL_EXT_IN_GLES3,
|
|
|
657d8e |
+ "EXT\0NV\0",
|
|
|
657d8e |
"framebuffer_blit\0")
|
|
|
657d8e |
COGL_EXT_FUNCTION (void, glBlitFramebuffer,
|
|
|
657d8e |
(GLint srcX0,
|
|
|
657d8e |
--
|
|
|
657d8e |
2.21.0
|
|
|
657d8e |
|