mesa: add new entrypoints for GL_OES_viewport_array
authorIlia Mirkin <imirkin@alum.mit.edu>
Fri, 16 Sep 2016 17:38:36 +0000 (13:38 -0400)
committerIlia Mirkin <imirkin@alum.mit.edu>
Fri, 23 Sep 2016 00:42:30 +0000 (20:42 -0400)
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com>
src/mapi/glapi/gen/apiexec.py
src/mapi/glapi/gen/es_EXT.xml
src/mesa/main/tests/dispatch_sanity.cpp
src/mesa/main/viewport.c
src/mesa/main/viewport.h

index b4f4cf6831b3f21e2855636ed78e59e87b3198c5..4bdc95d68e21d4643fbf0721a332e10ca62ad64f 100644 (file)
@@ -133,12 +133,12 @@ functions = {
     #
     # Mesa does not support either of the geometry shader extensions, so
     # OpenGL 3.2 is required.
-    "ViewportArrayv": exec_info(core=32),
-    "ViewportIndexedf": exec_info(core=32),
-    "ViewportIndexedfv": exec_info(core=32),
-    "ScissorArrayv": exec_info(core=32),
-    "ScissorIndexed": exec_info(core=32),
-    "ScissorIndexedv": exec_info(core=32),
+    "ViewportArrayv": exec_info(core=32, es2=31),
+    "ViewportIndexedf": exec_info(core=32, es2=31),
+    "ViewportIndexedfv": exec_info(core=32, es2=31),
+    "ScissorArrayv": exec_info(core=32, es2=31),
+    "ScissorIndexed": exec_info(core=32, es2=31),
+    "ScissorIndexedv": exec_info(core=32, es2=31),
     "DepthRangeArrayv": exec_info(core=32),
     "DepthRangeIndexed": exec_info(core=32),
     # GetFloati_v also GL_ARB_shader_atomic_counters
index 332dc5eb7bd599d799bf1acfccf9a6aa475cfc1e..3e705eb4092f6cd9258f5510b66444393d36e7bd 100644 (file)
 
 </category>
 
+<category name="GL_OES_viewport_array" number="267">
+    <function name="ViewportArrayvOES" es2="3.1" alias="ViewportArrayv">
+        <param name="first" type="GLuint"/>
+        <param name="count" type="GLsizei"/>
+        <param name="v" type="const GLfloat *"/>
+    </function>
+    <function name="ViewportIndexedfOES" es2="3.1" alias="ViewportIndexedf">
+        <param name="index" type="GLuint"/>
+        <param name="x" type="GLfloat"/>
+        <param name="y" type="GLfloat"/>
+        <param name="w" type="GLfloat"/>
+        <param name="h" type="GLfloat"/>
+    </function>
+    <function name="ViewportIndexedfvOES" es2="3.1" alias="ViewportIndexedfv">
+        <param name="index" type="GLuint"/>
+        <param name="v" type="const GLfloat *"/>
+    </function>
+    <function name="ScissorArrayvOES" es2="3.1" alias="ScissorArrayv">
+        <param name="first" type="GLuint"/>
+        <param name="count" type="GLsizei"/>
+        <param name="v" type="const int *"/>
+    </function>
+    <function name="ScissorIndexedOES" es2="3.1" alias="ScissorIndexed">
+        <param name="index" type="GLuint"/>
+        <param name="left" type="GLint"/>
+        <param name="bottom" type="GLint"/>
+        <param name="width" type="GLsizei"/>
+        <param name="height" type="GLsizei"/>
+    </function>
+    <function name="ScissorIndexedvOES" es2="3.1" alias="ScissorIndexedv">
+        <param name="index" type="GLuint"/>
+        <param name="v" type="const GLint *"/>
+    </function>
+    <function name="DepthRangeArrayfvOES" es2="3.1" desktop="false">
+        <param name="first" type="GLuint"/>
+        <param name="count" type="GLsizei"/>
+        <param name="v" type="const GLfloat *"/>
+    </function>
+    <function name="DepthRangeIndexedfOES" es2="3.1" desktop="false">
+        <param name="index" type="GLuint"/>
+        <param name="n" type="GLfloat"/>
+        <param name="f" type="GLfloat"/>
+    </function>
+    <function name="GetFloati_vOES" es2="3.1" alias="GetFloati_v">
+        <param name="target" type="GLenum"/>
+        <param name="index" type="GLuint"/>
+        <param name="data" type="GLfloat *"/>
+    </function>
+</category>
+
 </OpenGLAPI>
index c87b1dc19c9398684c45f79fd49c45d34287f22e..0d3b6abea39c6b9c3a6d38ab9ac1cf9815a5decf 100644 (file)
@@ -2613,5 +2613,16 @@ const struct function gles31_functions_possible[] = {
    /* GL_OES_primitive_bound_box */
    { "glPrimitiveBoundingBoxOES", 31, -1 },
 
+   /* GL_OES_viewport_array */
+   { "glViewportArrayvOES", 31, -1 },
+   { "glViewportIndexedfOES", 31, -1 },
+   { "glViewportIndexedfvOES", 31, -1 },
+   { "glScissorArrayvOES", 31, -1 },
+   { "glScissorIndexedOES", 31, -1 },
+   { "glScissorIndexedvOES", 31, -1 },
+   { "glDepthRangeArrayfvOES", 31, -1 },
+   { "glDepthRangeIndexedfOES", 31, -1 },
+   { "glGetFloati_vOES", 31, -1 },
+
    { NULL, 0, -1 },
  };
index 681e46bfcf71562d82d3cb40d1f5e2030ffdcfbe..f6eaa0f30a9e23a99bc587c5f64d23a3dfe1e07a 100644 (file)
@@ -330,6 +330,12 @@ _mesa_DepthRangeArrayv(GLuint first, GLsizei count, const GLclampd *v)
       ctx->Driver.DepthRange(ctx);
 }
 
+void GLAPIENTRY
+_mesa_DepthRangeArrayfvOES(GLuint first, GLsizei count, const GLfloat *v)
+{
+
+}
+
 /**
  * Update a single DepthRange
  *
@@ -358,6 +364,12 @@ _mesa_DepthRangeIndexed(GLuint index, GLclampd nearval, GLclampd farval)
    _mesa_set_depth_range(ctx, index, nearval, farval);
 }
 
+void GLAPIENTRY
+_mesa_DepthRangeIndexedfOES(GLuint index, GLfloat nearval, GLfloat farval)
+{
+
+}
+
 /** 
  * Initialize the context viewport attribute group.
  * \param ctx  the GL context.
index b0675db109640b8f123470342501877312a3515f..395131982cfa8d319ac1eaf373496e4b02998a4e 100644 (file)
@@ -57,9 +57,15 @@ _mesa_DepthRangef(GLclampf nearval, GLclampf farval);
 extern void GLAPIENTRY
 _mesa_DepthRangeArrayv(GLuint first, GLsizei count, const GLclampd * v);
 
+extern void GLAPIENTRY
+_mesa_DepthRangeArrayfvOES(GLuint first, GLsizei count, const GLfloat * v);
+
 extern void GLAPIENTRY
 _mesa_DepthRangeIndexed(GLuint index, GLclampd n, GLclampd f);
 
+extern void GLAPIENTRY
+_mesa_DepthRangeIndexedfOES(GLuint index, GLfloat n, GLfloat f);
+
 extern void
 _mesa_set_depth_range(struct gl_context *ctx, unsigned idx,
                       GLclampd nearval, GLclampd farval);