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

Samuel Pitoiset samuel.pitoiset at gmail.com
Thu Jun 22 14:36:30 UTC 2017


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

diff --git a/src/mapi/glapi/gen/gl_API.xml b/src/mapi/glapi/gen/gl_API.xml
index 8784f0537f5..2cc66ac8b0f 100644
--- a/src/mapi/glapi/gen/gl_API.xml
+++ b/src/mapi/glapi/gen/gl_API.xml
@@ -2966,7 +2966,7 @@
         <glx rop="190"/>
     </function>
 
-    <function name="Viewport" es1="1.0" es2="2.0">
+    <function name="Viewport" es1="1.0" es2="2.0" no_error="true">
         <param name="x" type="GLint"/>
         <param name="y" type="GLint"/>
         <param name="width" type="GLsizei"/>
diff --git a/src/mesa/main/viewport.c b/src/mesa/main/viewport.c
index 254b4aedd8e..11f03476cd3 100644
--- a/src/mesa/main/viewport.c
+++ b/src/mesa/main/viewport.c
@@ -115,6 +115,13 @@ viewport(struct gl_context *ctx, GLint x, GLint y, GLsizei width,
  * parameters.
  */
 void GLAPIENTRY
+_mesa_Viewport_no_error(GLint x, GLint y, GLsizei width, GLsizei height)
+{
+   GET_CURRENT_CONTEXT(ctx);
+   viewport(ctx, x, y, width, height);
+}
+
+void GLAPIENTRY
 _mesa_Viewport(GLint x, GLint y, GLsizei width, GLsizei height)
 {
    GET_CURRENT_CONTEXT(ctx);
diff --git a/src/mesa/main/viewport.h b/src/mesa/main/viewport.h
index 570a23a23b2..b07410bf58a 100644
--- a/src/mesa/main/viewport.h
+++ b/src/mesa/main/viewport.h
@@ -31,6 +31,9 @@
 
 struct gl_context;
 
+void GLAPIENTRY
+_mesa_Viewport_no_error(GLint x, GLint y, GLsizei width, GLsizei height);
+
 extern void GLAPIENTRY
 _mesa_Viewport(GLint x, GLint y, GLsizei width, GLsizei height);
 
-- 
2.13.1



More information about the mesa-dev mailing list