Blame SOURCES/0003-cogl-Replace-ANGLE-with-GLES3-and-NV-framebuffer_bli.patch

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