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

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