[Mesa-dev] [PATCH 6/8] mesa: add KHR_no_error support for glViewportArrayv()

Samuel Pitoiset samuel.pitoiset at gmail.com
Thu Jun 22 14:36:28 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                  | 9 +++++++++
 src/mesa/main/viewport.h                  | 3 +++
 3 files changed, 13 insertions(+), 1 deletion(-)

diff --git a/src/mapi/glapi/gen/ARB_viewport_array.xml b/src/mapi/glapi/gen/ARB_viewport_array.xml
index 09bd7d3caf6..da5aed6c177 100644
--- a/src/mapi/glapi/gen/ARB_viewport_array.xml
+++ b/src/mapi/glapi/gen/ARB_viewport_array.xml
@@ -29,7 +29,7 @@
     <enum name="PROVOKING_VERTEX" value="0x8E4F"/>
     <enum name="UNDEFINED_VERTEX" value="0x8260"/>
 
-    <function name="ViewportArrayv">
+    <function name="ViewportArrayv" no_error="true">
         <param name="first" type="GLuint"/>
         <param name="count" type="GLsizei"/>
         <param name="v" type="const GLfloat *" count="count" count_scale="4"/>
diff --git a/src/mesa/main/viewport.c b/src/mesa/main/viewport.c
index 5e28cf35c42..867c35054b9 100644
--- a/src/mesa/main/viewport.c
+++ b/src/mesa/main/viewport.c
@@ -160,6 +160,15 @@ viewport_array(struct gl_context *ctx, GLuint first, GLsizei count,
 }
 
 void GLAPIENTRY
+_mesa_ViewportArrayv_no_error(GLuint first, GLsizei count, const GLfloat *v)
+{
+   GET_CURRENT_CONTEXT(ctx);
+
+   const struct gl_viewport_inputs *const p = (struct gl_viewport_inputs *)v;
+   viewport_array(ctx, first, count, p);
+}
+
+void GLAPIENTRY
 _mesa_ViewportArrayv(GLuint first, GLsizei count, const GLfloat *v)
 {
    int i;
diff --git a/src/mesa/main/viewport.h b/src/mesa/main/viewport.h
index 5fc67d2d494..570a23a23b2 100644
--- a/src/mesa/main/viewport.h
+++ b/src/mesa/main/viewport.h
@@ -34,6 +34,9 @@ struct gl_context;
 extern void GLAPIENTRY
 _mesa_Viewport(GLint x, GLint y, GLsizei width, GLsizei height);
 
+void GLAPIENTRY
+_mesa_ViewportArrayv_no_error(GLuint first, GLsizei count, const GLfloat * v);
+
 extern void GLAPIENTRY
 _mesa_ViewportArrayv(GLuint first, GLsizei count, const GLfloat * v);
 
-- 
2.13.1



More information about the mesa-dev mailing list