[Mesa-dev] [PATCH 12/42] mesa: add KHR_no_error support for glDepthFunc()

Samuel Pitoiset samuel.pitoiset at gmail.com
Tue Jun 27 11:20:15 UTC 2017


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

diff --git a/src/mapi/glapi/gen/gl_API.xml b/src/mapi/glapi/gen/gl_API.xml
index bcd1205537e..4d6a08e1247 100644
--- a/src/mapi/glapi/gen/gl_API.xml
+++ b/src/mapi/glapi/gen/gl_API.xml
@@ -2570,7 +2570,7 @@
         <glx rop="163"/>
     </function>
 
-    <function name="DepthFunc" es1="1.0" es2="2.0">
+    <function name="DepthFunc" es1="1.0" es2="2.0" no_error="true">
         <param name="func" type="GLenum"/>
         <glx rop="164"/>
     </function>
diff --git a/src/mesa/main/depth.c b/src/mesa/main/depth.c
index 4bc000fd138..930f5e816f9 100644
--- a/src/mesa/main/depth.c
+++ b/src/mesa/main/depth.c
@@ -90,6 +90,14 @@ depth_func(struct gl_context *ctx, GLenum func, bool no_error)
 
 
 void GLAPIENTRY
+_mesa_DepthFunc_no_error(GLenum func)
+{
+   GET_CURRENT_CONTEXT(ctx);
+   depth_func(ctx, func, true);
+}
+
+
+void GLAPIENTRY
 _mesa_DepthFunc(GLenum func)
 {
    GET_CURRENT_CONTEXT(ctx);
diff --git a/src/mesa/main/depth.h b/src/mesa/main/depth.h
index 5760951c853..478249f157c 100644
--- a/src/mesa/main/depth.h
+++ b/src/mesa/main/depth.h
@@ -43,6 +43,9 @@ _mesa_ClearDepth( GLclampd depth );
 extern void GLAPIENTRY
 _mesa_ClearDepthf( GLclampf depth );
 
+void GLAPIENTRY
+_mesa_DepthFunc_no_error(GLenum func);
+
 extern void GLAPIENTRY
 _mesa_DepthFunc(GLenum func);
 
-- 
2.13.2



More information about the mesa-dev mailing list