Mesa (master): mesa: add KHR_no_error support for glViewportIndexed*()

Samuel Pitoiset hakzsam at kemper.freedesktop.org
Fri Jun 23 07:28:35 UTC 2017


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

Author: Samuel Pitoiset <samuel.pitoiset at gmail.com>
Date:   Thu Jun 22 15:19:34 2017 +0200

mesa: add KHR_no_error support for glViewportIndexed*()

Signed-off-by: Samuel Pitoiset <samuel.pitoiset at gmail.com>
Reviewed-by: Timothy Arceri <tarceri at itsqueeze.com>

---

 src/mapi/glapi/gen/ARB_viewport_array.xml |  4 ++--
 src/mesa/main/viewport.c                  | 15 +++++++++++++++
 src/mesa/main/viewport.h                  |  7 +++++++
 3 files changed, 24 insertions(+), 2 deletions(-)

diff --git a/src/mapi/glapi/gen/ARB_viewport_array.xml b/src/mapi/glapi/gen/ARB_viewport_array.xml
index 3e9c65549e..09bd7d3caf 100644
--- a/src/mapi/glapi/gen/ARB_viewport_array.xml
+++ b/src/mapi/glapi/gen/ARB_viewport_array.xml
@@ -34,14 +34,14 @@
         <param name="count" type="GLsizei"/>
         <param name="v" type="const GLfloat *" count="count" count_scale="4"/>
     </function>
-    <function name="ViewportIndexedf">
+    <function name="ViewportIndexedf" no_error="true">
         <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="ViewportIndexedfv">
+    <function name="ViewportIndexedfv" no_error="true">
         <param name="index" type="GLuint"/>
         <param name="v" type="const GLfloat *" count="4"/>
     </function>
diff --git a/src/mesa/main/viewport.c b/src/mesa/main/viewport.c
index 49ecdbb7dc..b94cb56a4b 100644
--- a/src/mesa/main/viewport.c
+++ b/src/mesa/main/viewport.c
@@ -220,6 +220,14 @@ viewport_indexed_err(struct gl_context *ctx, GLuint index, GLfloat x, GLfloat y,
 }
 
 void GLAPIENTRY
+_mesa_ViewportIndexedf_no_error(GLuint index, GLfloat x, GLfloat y,
+                                GLfloat w, GLfloat h)
+{
+   GET_CURRENT_CONTEXT(ctx);
+   _mesa_set_viewport(ctx, index, x, y, w, h);
+}
+
+void GLAPIENTRY
 _mesa_ViewportIndexedf(GLuint index, GLfloat x, GLfloat y,
                        GLfloat w, GLfloat h)
 {
@@ -228,6 +236,13 @@ _mesa_ViewportIndexedf(GLuint index, GLfloat x, GLfloat y,
 }
 
 void GLAPIENTRY
+_mesa_ViewportIndexedfv_no_error(GLuint index, const GLfloat *v)
+{
+   GET_CURRENT_CONTEXT(ctx);
+   _mesa_set_viewport(ctx, index, v[0], v[1], v[2], v[3]);
+}
+
+void GLAPIENTRY
 _mesa_ViewportIndexedfv(GLuint index, const GLfloat *v)
 {
    GET_CURRENT_CONTEXT(ctx);
diff --git a/src/mesa/main/viewport.h b/src/mesa/main/viewport.h
index 88757f0291..5fc67d2d49 100644
--- a/src/mesa/main/viewport.h
+++ b/src/mesa/main/viewport.h
@@ -37,9 +37,16 @@ _mesa_Viewport(GLint x, GLint y, GLsizei width, GLsizei height);
 extern void GLAPIENTRY
 _mesa_ViewportArrayv(GLuint first, GLsizei count, const GLfloat * v);
 
+void GLAPIENTRY
+_mesa_ViewportIndexedf_no_error(GLuint index, GLfloat x, GLfloat y, GLfloat w,
+                                GLfloat h);
+
 extern void GLAPIENTRY
 _mesa_ViewportIndexedf(GLuint index, GLfloat x, GLfloat y, GLfloat w, GLfloat h);
 
+void GLAPIENTRY
+_mesa_ViewportIndexedfv_no_error(GLuint index, const GLfloat * v);
+
 extern void GLAPIENTRY
 _mesa_ViewportIndexedfv(GLuint index, const GLfloat * v);
 




More information about the mesa-commit mailing list