[Mesa-dev] [PATCH 002/101] mesa: add KHR_no_error support to glDepthRangeArrayv

Samuel Pitoiset samuel.pitoiset at gmail.com
Fri Jul 21 17:39:11 UTC 2017


Signed-off-by: Samuel Pitoiset <samuel.pitoiset at gmail.com>
---
 src/mapi/glapi/gen/ARB_viewport_array.xml |  2 +-
 src/mesa/main/viewport.c                  | 10 ++++++++++
 src/mesa/main/viewport.h                  |  4 ++++
 3 files changed, 15 insertions(+), 1 deletion(-)

diff --git a/src/mapi/glapi/gen/ARB_viewport_array.xml b/src/mapi/glapi/gen/ARB_viewport_array.xml
index 30c4bca310..2db829b69a 100644
--- a/src/mapi/glapi/gen/ARB_viewport_array.xml
+++ b/src/mapi/glapi/gen/ARB_viewport_array.xml
@@ -61,7 +61,7 @@
         <param name="index" type="GLuint"/>
         <param name="v" type="const GLint *" count="4"/>
     </function>
-    <function name="DepthRangeArrayv">
+    <function name="DepthRangeArrayv" no_error="true">
         <param name="first" type="GLuint"/>
         <param name="count" type="GLsizei"/>
         <param name="v" type="const GLclampd *" count="count" count_scale="2"/>
diff --git a/src/mesa/main/viewport.c b/src/mesa/main/viewport.c
index d010c8e6db..13a62dc51e 100644
--- a/src/mesa/main/viewport.c
+++ b/src/mesa/main/viewport.c
@@ -358,6 +358,16 @@ depth_range_arrayv(struct gl_context *ctx, GLuint first, GLsizei count,
 }
 
 void GLAPIENTRY
+_mesa_DepthRangeArrayv_no_error(GLuint first, GLsizei count, const GLclampd *v)
+{
+   GET_CURRENT_CONTEXT(ctx);
+
+   const struct gl_depthrange_inputs *const p =
+      (struct gl_depthrange_inputs *)v;
+   depth_range_arrayv(ctx, first, count, p);
+}
+
+void GLAPIENTRY
 _mesa_DepthRangeArrayv(GLuint first, GLsizei count, const GLclampd *v)
 {
    const struct gl_depthrange_inputs *const p =
diff --git a/src/mesa/main/viewport.h b/src/mesa/main/viewport.h
index f974da5d6f..5860e4f5dc 100644
--- a/src/mesa/main/viewport.h
+++ b/src/mesa/main/viewport.h
@@ -67,6 +67,10 @@ _mesa_DepthRange(GLclampd nearval, GLclampd farval);
 extern void GLAPIENTRY
 _mesa_DepthRangef(GLclampf nearval, GLclampf farval);
 
+void GLAPIENTRY
+_mesa_DepthRangeArrayv_no_error(GLuint first, GLsizei count,
+                                const GLclampd * v);
+
 extern void GLAPIENTRY
 _mesa_DepthRangeArrayv(GLuint first, GLsizei count, const GLclampd * v);
 
-- 
2.13.3



More information about the mesa-dev mailing list