Merge pull request #289 from fritzk/MESA_framebuffer_flip_y_extension_update

Allow GL_MESA_framebuffer_flip_y as a GLES 3.0 extension
diff --git a/api/GL/glcorearb.h b/api/GL/glcorearb.h
index 88dc825..e568510 100755
--- a/api/GL/glcorearb.h
+++ b/api/GL/glcorearb.h
@@ -4763,6 +4763,12 @@
 #ifndef GL_MESA_framebuffer_flip_y
 #define GL_MESA_framebuffer_flip_y 1
 #define GL_FRAMEBUFFER_FLIP_Y_MESA        0x8BBB
+typedef void (APIENTRYP PFNGLFRAMEBUFFERPARAMETERIMESAPROC) (GLenum target, GLenum pname, GLint param);
+typedef void (APIENTRYP PFNGLGETFRAMEBUFFERPARAMETERIVMESAPROC) (GLenum target, GLenum pname, GLint *params);
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glFramebufferParameteriMESA (GLenum target, GLenum pname, GLint param);
+GLAPI void APIENTRY glGetFramebufferParameterivMESA (GLenum target, GLenum pname, GLint *params);
+#endif
 #endif /* GL_MESA_framebuffer_flip_y */
 
 #ifndef GL_NV_bindless_multi_draw_indirect
diff --git a/api/GL/glext.h b/api/GL/glext.h
index 6a8e07a..8aa0157 100644
--- a/api/GL/glext.h
+++ b/api/GL/glext.h
@@ -51,7 +51,7 @@
 #define GLAPI extern
 #endif
 
-#define GL_GLEXT_VERSION 20190728
+#define GL_GLEXT_VERSION 20190805
 
 #include <KHR/khrplatform.h>
 
@@ -9278,6 +9278,12 @@
 #ifndef GL_MESA_framebuffer_flip_y
 #define GL_MESA_framebuffer_flip_y 1
 #define GL_FRAMEBUFFER_FLIP_Y_MESA        0x8BBB
+typedef void (APIENTRYP PFNGLFRAMEBUFFERPARAMETERIMESAPROC) (GLenum target, GLenum pname, GLint param);
+typedef void (APIENTRYP PFNGLGETFRAMEBUFFERPARAMETERIVMESAPROC) (GLenum target, GLenum pname, GLint *params);
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glFramebufferParameteriMESA (GLenum target, GLenum pname, GLint param);
+GLAPI void APIENTRY glGetFramebufferParameterivMESA (GLenum target, GLenum pname, GLint *params);
+#endif
 #endif /* GL_MESA_framebuffer_flip_y */
 
 #ifndef GL_MESA_pack_invert
diff --git a/api/GLES/gl.h b/api/GLES/gl.h
index 50b4577..ea586eb 100644
--- a/api/GLES/gl.h
+++ b/api/GLES/gl.h
@@ -36,7 +36,7 @@
 
 #include <GLES/glplatform.h>
 
-/* Generated on date 20190728 */
+/* Generated on date 20190805 */
 
 /* Generated C header for:
  * API: gles1
diff --git a/api/GLES/glext.h b/api/GLES/glext.h
index a79dbd5..be8a569 100644
--- a/api/GLES/glext.h
+++ b/api/GLES/glext.h
@@ -38,7 +38,7 @@
 #define GL_APIENTRYP GL_APIENTRY*
 #endif
 
-/* Generated on date 20190728 */
+/* Generated on date 20190805 */
 
 /* Generated C header for:
  * API: gles1
diff --git a/api/GLES2/gl2.h b/api/GLES2/gl2.h
index a5c6130..f1e3dc6 100644
--- a/api/GLES2/gl2.h
+++ b/api/GLES2/gl2.h
@@ -44,7 +44,7 @@
 #define GL_GLES_PROTOTYPES 1
 #endif
 
-/* Generated on date 20190728 */
+/* Generated on date 20190805 */
 
 /* Generated C header for:
  * API: gles2
diff --git a/api/GLES2/gl2ext.h b/api/GLES2/gl2ext.h
index 758d554..cab1c45 100644
--- a/api/GLES2/gl2ext.h
+++ b/api/GLES2/gl2ext.h
@@ -38,7 +38,7 @@
 #define GL_APIENTRYP GL_APIENTRY*
 #endif
 
-/* Generated on date 20190728 */
+/* Generated on date 20190805 */
 
 /* Generated C header for:
  * API: gles2
@@ -2455,6 +2455,12 @@
 #ifndef GL_MESA_framebuffer_flip_y
 #define GL_MESA_framebuffer_flip_y 1
 #define GL_FRAMEBUFFER_FLIP_Y_MESA        0x8BBB
+typedef void (GL_APIENTRYP PFNGLFRAMEBUFFERPARAMETERIMESAPROC) (GLenum target, GLenum pname, GLint param);
+typedef void (GL_APIENTRYP PFNGLGETFRAMEBUFFERPARAMETERIVMESAPROC) (GLenum target, GLenum pname, GLint *params);
+#ifdef GL_GLEXT_PROTOTYPES
+GL_APICALL void GL_APIENTRY glFramebufferParameteriMESA (GLenum target, GLenum pname, GLint param);
+GL_APICALL void GL_APIENTRY glGetFramebufferParameterivMESA (GLenum target, GLenum pname, GLint *params);
+#endif
 #endif /* GL_MESA_framebuffer_flip_y */
 
 #ifndef GL_MESA_program_binary_formats
diff --git a/api/GLES3/gl3.h b/api/GLES3/gl3.h
index d8f71f3..838286c 100644
--- a/api/GLES3/gl3.h
+++ b/api/GLES3/gl3.h
@@ -44,7 +44,7 @@
 #define GL_GLES_PROTOTYPES 1
 #endif
 
-/* Generated on date 20190728 */
+/* Generated on date 20190805 */
 
 /* Generated C header for:
  * API: gles2
diff --git a/extensions/MESA/MESA_framebuffer_flip_y.txt b/extensions/MESA/MESA_framebuffer_flip_y.txt
index 0866203..349e113 100644
--- a/extensions/MESA/MESA_framebuffer_flip_y.txt
+++ b/extensions/MESA/MESA_framebuffer_flip_y.txt
@@ -23,7 +23,7 @@
 
 Version
 
-    Version 2, June 4, 2019
+    Version 3, August, 2019
 
 Number
 
@@ -32,7 +32,7 @@
 
 Dependencies
 
-    OpenGL ES 3.1 or OpenGL 4.3 is required, for FramebufferParameteri.
+    Requires OpenGL ES 3.0, OpenGL 4.3, or ARB_framebuffer_no_attachments.
 
 Overview
 
@@ -59,7 +59,10 @@
 
 New Procedures and Functions
 
-    None
+    OpenGL ES must provide the following functions:
+
+    void FramebufferParameteriMESA(enum target, enum pname, int param);
+    void GetFramebufferParameterivMESA(enum target, enum pname, int *params);
 
 New Types
 
@@ -67,20 +70,33 @@
 
 New Tokens
 
-    Accepted by the <pname> argument of FramebufferParameteri and
-    GetFramebufferParameteriv:
+    Accepted by the <pname> argument of FramebufferParameteriMESA and
+    GetFramebufferParameterivMESA:
 
         GL_FRAMEBUFFER_FLIP_Y_MESA                      0x8BBB
 
+Interactions with OpenGL 4.3, OpenGL ES 3.1, ARB_framebuffer_no_attachments
+and any other versions and extensions that provide the entry points
+FramebufferParameteri and GetFramebufferParameteriv
+
+        Token GL_FRAMEBUFFER_FLIP_Y_MESA is accepted as the <pname> argument of
+        FramebufferParameteri and GetFramebufferParameteriv.
+
 Errors
 
-    An INVALID_OPERATION error is generated by GetFramebufferParameteriv if the
-    default framebuffer is bound to <target> and <pname> is FRAMEBUFFER_FLIP_Y_MESA.
+    An INVALID_OPERATION error is generated by GetFramebufferParameteriv or
+    GetFramebufferParameterivMESA if the default framebuffer is bound
+    to <target> and <pname> is GL_FRAMEBUFFER_FLIP_Y_MESA.
 
 
 
 Revision History
 
+    Version 3, August, 2019
+        Allow OpenGL ES 3.0 to implement by adding functions
+        FramebufferParameteriMESA and GetFramebufferParameterivMESA which were
+        previously only available in OpenGL ES 3.1.
+
     Version 2, June, 2019
         Enable extension for OpenGL 4.3 and beyond
 
diff --git a/xml/gl.xml b/xml/gl.xml
index c548bd8..4c6b317 100644
--- a/xml/gl.xml
+++ b/xml/gl.xml
@@ -33634,6 +33634,18 @@
             <proto>void <name>glSignalVkFenceNV</name></proto>
             <param><ptype>GLuint64</ptype> <name>vkFence</name></param>
         </command>
+         <command>
+            <proto>void <name>glFramebufferParameteriMESA</name></proto>
+            <param group="FramebufferTarget"><ptype>GLenum</ptype> <name>target</name></param>
+            <param group="FramebufferParameterName"><ptype>GLenum</ptype> <name>pname</name></param>
+            <param><ptype>GLint</ptype> <name>param</name></param>
+        </command>
+        <command>
+            <proto>void <name>glGetFramebufferParameterivMESA</name></proto>
+            <param group="FramebufferTarget"><ptype>GLenum</ptype> <name>target</name></param>
+            <param group="FramebufferAttachmentParameterName"><ptype>GLenum</ptype> <name>pname</name></param>
+            <param len="COMPSIZE(pname)"><ptype>GLint</ptype> *<name>params</name></param>
+        </command>
 
     </commands>
 
@@ -47307,6 +47319,8 @@
         <extension name="GL_MESA_framebuffer_flip_y" supported="gl|glcore|gles2">
             <require>
                 <enum name="GL_FRAMEBUFFER_FLIP_Y_MESA"/>
+                <command name="glFramebufferParameteriMESA"/>
+                <command name="glGetFramebufferParameterivMESA"/>
             </require>
         </extension>
         <extension name="GL_MESA_pack_invert" supported="gl">