mesa: add KHR_no_error support for glPixelStore*()
authorTimothy Arceri <tarceri@itsqueeze.com>
Wed, 28 Jun 2017 03:32:35 +0000 (13:32 +1000)
committerTimothy Arceri <tarceri@itsqueeze.com>
Wed, 28 Jun 2017 22:54:10 +0000 (08:54 +1000)
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
src/mapi/glapi/gen/gl_API.xml
src/mesa/main/pixelstore.c
src/mesa/main/pixelstore.h

index 85083a428da7ee256bee7825030bc795075a2fc9..a63fd3c918f9020b954065d142bf82815199b695 100644 (file)
         <glx rop="167"/>
     </function>
 
-    <function name="PixelStoref">
+    <function name="PixelStoref" no_error="true">
         <param name="pname" type="GLenum"/>
         <param name="param" type="GLfloat"/>
         <glx sop="109" handcode="client"/>
     </function>
 
-    <function name="PixelStorei" es1="1.0" es2="2.0">
+    <function name="PixelStorei" es1="1.0" es2="2.0" no_error="true">
         <param name="pname" type="GLenum"/>
         <param name="param" type="GLint"/>
         <glx sop="110" handcode="client"/>
index 38e60723ca43aefebc8bca9ae2c91f79dc7450ef..4738f96213515e226df748ef4251a5aa583a9af3 100644 (file)
@@ -238,6 +238,19 @@ _mesa_PixelStoref( GLenum pname, GLfloat param )
 }
 
 
+void GLAPIENTRY
+_mesa_PixelStorei_no_error(GLenum pname, GLint param)
+{
+   pixel_storei(pname, param, true);
+}
+
+
+void GLAPIENTRY
+_mesa_PixelStoref_no_error(GLenum pname, GLfloat param)
+{
+   _mesa_PixelStorei_no_error(pname, IROUND(param));
+}
+
 
 /**
  * Initialize the context's pixel store state.
index 68384548a0f449b31d3856b79c3afbc2246051da..d21c6fe27f4fd2e143324721717f5537822947f2 100644 (file)
@@ -45,6 +45,14 @@ extern void GLAPIENTRY
 _mesa_PixelStoref( GLenum pname, GLfloat param );
 
 
+extern void GLAPIENTRY
+_mesa_PixelStorei_no_error(GLenum pname, GLint param);
+
+
+extern void GLAPIENTRY
+_mesa_PixelStoref_no_error(GLenum pname, GLfloat param);
+
+
 extern void
 _mesa_init_pixelstore( struct gl_context *ctx );