From 16eb24dd94d836480cb3bb1fa7f30b8500b8c12f Mon Sep 17 00:00:00 2001
From: Rufus Hamade <rufus.hamade@imgtec.com>
Date: Thu, 4 Feb 2016 14:09:26 +0000
Subject: [PATCH] GL_IMG_framebuffer_downsample entry points

---
 .../glapi/gen/IMG_framebuffer_downsample.xml  | 37 +++++++++++++++++++
 src/mapi/glapi/gen/es_EXT.xml                 |  3 ++
 src/mapi/glapi/gen/static_data.py             |  2 +
 3 files changed, 42 insertions(+)
 create mode 100644 src/mapi/glapi/gen/IMG_framebuffer_downsample.xml

diff --git a/src/mapi/glapi/gen/IMG_framebuffer_downsample.xml b/src/mapi/glapi/gen/IMG_framebuffer_downsample.xml
new file mode 100644
index 0000000..b5ce77d
--- /dev/null
+++ b/src/mapi/glapi/gen/IMG_framebuffer_downsample.xml
@@ -0,0 +1,37 @@
+<?xml version="1.0"?>
+<!DOCTYPE OpenGLAPI SYSTEM "gl_API.dtd">
+
+<OpenGLAPI>
+
+<category name="GL_IMG_framebuffer_downsample" number="255">
+
+    <enum name="FRAMEBUFFER_INCOMPLETE_MULTISAMPLE_AND_DOWNSAMPLE_IMG"                    value="0x913C"/>
+    <enum name="NUM_DOWNSAMPLE_SCALES_IMG"                                                value="0x913D"/>
+    <enum name="DOWNSAMPLE_SCALES_IMG"                                                    value="0x913E"/>
+    <enum name="FRAMEBUFFER_ATTACHMENT_TEXTURE_SCALE_IMG"                                 value="0x913F"/>
+
+    <function name="FramebufferTexture2DDownsampleIMG" es1="1.0" es2="2.0"
+              exec="dynamic">
+        <param name="target" type="GLenum"/>
+        <param name="attachment" type="GLenum"/>
+        <param name="textarget" type="GLenum"/>
+        <param name="texture" type="GLuint"/>
+        <param name="level" type="GLint"/>
+        <param name="xscale" type="GLint"/>
+        <param name="yscale" type="GLint"/>
+    </function>
+
+    <function name="FramebufferTextureLayerDownsampleIMG" es1="1.0" es2="2.0"
+              exec="dynamic">
+        <param name="target" type="GLenum"/>
+        <param name="attachment" type="GLenum"/>
+        <param name="texture" type="GLuint"/>
+        <param name="level" type="GLint"/>
+        <param name="layer" type="GLint"/>
+        <param name="xscale" type="GLint"/>
+        <param name="yscale" type="GLint"/>
+    </function>
+
+</category>
+
+</OpenGLAPI>
diff --git a/src/mapi/glapi/gen/es_EXT.xml b/src/mapi/glapi/gen/es_EXT.xml
index a3bfe86..b343282 100644
--- a/src/mapi/glapi/gen/es_EXT.xml
+++ b/src/mapi/glapi/gen/es_EXT.xml
@@ -1462,6 +1462,9 @@
 <!-- 253. GL_EXT_shader_pixel_local_storage2 -->
 <xi:include href="EXT_shader_pixel_local_storage2.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/>
 
+<!-- 255. GL_IMG_framebuffer_downsample -->
+<xi:include href="IMG_framebuffer_downsample.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/>
+
 <category name="GL_OES_viewport_array" number="267">
     <function name="ViewportArrayvOES" es2="3.1" alias="ViewportArrayv">
         <param name="first" type="GLuint"/>
diff --git a/src/mapi/glapi/gen/static_data.py b/src/mapi/glapi/gen/static_data.py
index 99729e2..c723cb3 100644
--- a/src/mapi/glapi/gen/static_data.py
+++ b/src/mapi/glapi/gen/static_data.py
@@ -1700,6 +1700,8 @@ offsets = {
     "ClearPixelLocalStorageuiEXT" : 1664,
     "FramebufferPixelLocalStorageSizeEXT" : 1665,
     "GetFramebufferPixelLocalStorageSizeEXT" : 1666,
+    "FramebufferTexture2DDownsampleIMG" : 1667,
+    "FramebufferTextureLayerDownsampleIMG" : 1668,
 }
 
 functions = [
