mesa: add KHR_no_error support for glViewportIndexed*()
authorSamuel Pitoiset <samuel.pitoiset@gmail.com>
Thu, 22 Jun 2017 13:19:34 +0000 (15:19 +0200)
committerSamuel Pitoiset <samuel.pitoiset@gmail.com>
Fri, 23 Jun 2017 07:26:43 +0000 (09:26 +0200)
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
src/mapi/glapi/gen/ARB_viewport_array.xml
src/mesa/main/viewport.c
src/mesa/main/viewport.h

index 3e9c655..09bd7d3 100644 (file)
         <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>
index 49ecdbb..b94cb56 100644 (file)
@@ -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);
index 88757f0..5fc67d2 100644 (file)
@@ -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);