Mesa (master): mesa/main: Expose EXT_clip_control and related enums and the function

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Thu Jun 6 11:45:47 UTC 2019


Module: Mesa
Branch: master
Commit: 10895c39c338d9e4a00c86590bdfd4e30bd2acfe
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=10895c39c338d9e4a00c86590bdfd4e30bd2acfe

Author: Gert Wollny <gert.wollny at collabora.com>
Date:   Sat May 11 17:48:18 2019 +0200

mesa/main: Expose EXT_clip_control and related enums and the function

Signed-off-by: Gert Wollny <gert.wollny at collabora.com>
Reviewed-by: Tapani Pälli <tapani.palli at intel.com>
Reviewed-by: Marek Olšák <marek.olsak at amd.com>
Reviewed-by: Emil Velikov <emil.velikov at collabora.com>

---

 src/mapi/glapi/gen/es_EXT.xml           | 18 ++++++++++++++++++
 src/mesa/main/extensions_table.h        |  1 +
 src/mesa/main/get_hash_params.py        |  6 ++++--
 src/mesa/main/tests/dispatch_sanity.cpp |  3 +++
 4 files changed, 26 insertions(+), 2 deletions(-)

diff --git a/src/mapi/glapi/gen/es_EXT.xml b/src/mapi/glapi/gen/es_EXT.xml
index 5fa518d7a09..be466e34ae8 100644
--- a/src/mapi/glapi/gen/es_EXT.xml
+++ b/src/mapi/glapi/gen/es_EXT.xml
@@ -1283,6 +1283,24 @@
 
 </category>
 
+<category name="GL_EXT_clip_control" number="290">
+
+    <enum name="LOWER_LEFT_EXT" value = "0x8CA1"/>
+    <enum name="UPPER_LEFT_EXT" value = "0x8CA2"/>
+
+    <enum name="NEGATIVE_ONE_TO_ONE_EXT" value = "0x935E"/>
+    <enum name="ZERO_TO_ONE_EXT" value = "0x935F"/>
+
+    <enum name="CLIP_ORIGIN_EXT" value = "0x935C"/>
+    <enum name="CLIP_DEPTH_MODE_EXT" value = "0x935D"/>
+
+    <function name="ClipControlEXT" no_error="true" es2="2.0" alias="ClipControl">
+        <param name="origin" type="GLenum"/>
+        <param name="depth" type="GLenum"/>
+    </function>
+
+</category>
+
 <category name="GL_OES_copy_image" number="208">
 
     <function name="CopyImageSubDataOES" alias="CopyImageSubData" es2="3.0">
diff --git a/src/mesa/main/extensions_table.h b/src/mesa/main/extensions_table.h
index c3c5f3ac8f0..332a75e6c73 100644
--- a/src/mesa/main/extensions_table.h
+++ b/src/mesa/main/extensions_table.h
@@ -213,6 +213,7 @@ EXT(EXT_blend_func_separate                 , EXT_blend_func_separate
 EXT(EXT_blend_minmax                        , EXT_blend_minmax                       , GLL,  x , ES1, ES2, 1995)
 EXT(EXT_blend_subtract                      , dummy_true                             , GLL,  x ,  x ,  x , 1995)
 EXT(EXT_buffer_storage                      , ARB_buffer_storage                     ,  x ,  x ,  x ,  31, 2015)
+EXT(EXT_clip_control                        , ARB_clip_control                       ,  x ,  x ,  x , ES2, 2017)
 EXT(EXT_clip_cull_distance                  , ARB_cull_distance                      ,  x ,  x ,  x ,  30, 2016)
 EXT(EXT_color_buffer_float                  , dummy_true                             ,  x ,  x ,  x ,  30, 2013)
 EXT(EXT_compiled_vertex_array               , dummy_true                             , GLL,  x ,  x ,  x , 1996)
diff --git a/src/mesa/main/get_hash_params.py b/src/mesa/main/get_hash_params.py
index 85db09f2540..33d3d39d503 100644
--- a/src/mesa/main/get_hash_params.py
+++ b/src/mesa/main/get_hash_params.py
@@ -277,6 +277,10 @@ descriptor=[
   [ "UNPACK_SKIP_IMAGES", "CONTEXT_INT(Unpack.SkipImages), NO_EXTRA" ],
   [ "UNPACK_IMAGE_HEIGHT", "CONTEXT_INT(Unpack.ImageHeight), NO_EXTRA" ],
 
+# GL_ARB_clip_control/GL_EXT_clip_control
+  [ "CLIP_DEPTH_MODE", "CONTEXT_ENUM16(Transform.ClipDepthMode), extra_ARB_clip_control" ],
+  [ "CLIP_ORIGIN", "CONTEXT_ENUM16(Transform.ClipOrigin), extra_ARB_clip_control" ],
+
 # GL_ARB_draw_buffers
   [ "MAX_DRAW_BUFFERS_ARB", "CONTEXT_INT(Const.MaxDrawBuffers), NO_EXTRA" ],
 
@@ -686,8 +690,6 @@ descriptor=[
   [ "AUX_BUFFERS", "BUFFER_INT(Visual.numAuxBuffers), NO_EXTRA" ],
   [ "BLUE_BIAS", "CONTEXT_FLOAT(Pixel.BlueBias), NO_EXTRA" ],
   [ "BLUE_SCALE", "CONTEXT_FLOAT(Pixel.BlueScale), NO_EXTRA" ],
-  [ "CLIP_DEPTH_MODE", "CONTEXT_ENUM16(Transform.ClipDepthMode), extra_ARB_clip_control" ],
-  [ "CLIP_ORIGIN", "CONTEXT_ENUM16(Transform.ClipOrigin), extra_ARB_clip_control" ],
   [ "CLIENT_ATTRIB_STACK_DEPTH", "CONTEXT_INT(ClientAttribStackDepth), NO_EXTRA" ],
   [ "COLOR_MATERIAL_FACE", "CONTEXT_ENUM16(Light.ColorMaterialFace), NO_EXTRA" ],
   [ "COLOR_MATERIAL_PARAMETER", "CONTEXT_ENUM16(Light.ColorMaterialMode), NO_EXTRA" ],
diff --git a/src/mesa/main/tests/dispatch_sanity.cpp b/src/mesa/main/tests/dispatch_sanity.cpp
index b171e1768b0..44f53741aaa 100644
--- a/src/mesa/main/tests/dispatch_sanity.cpp
+++ b/src/mesa/main/tests/dispatch_sanity.cpp
@@ -2431,6 +2431,9 @@ const struct function gles2_functions_possible[] = {
    { "glGetQueryObjectivEXT", 20, -1 },
    { "glGetQueryObjectuivEXT", 20, -1 },
 
+   /* GL_EXT_clip_control */
+   { "glClipControlEXT", 20, -1 },
+
    /* GL_EXT_disjoint_timer_query */
    { "glGetQueryObjecti64vEXT", 20, -1 },
    { "glGetQueryObjectui64vEXT", 20, -1 },




More information about the mesa-commit mailing list