Mesa (7.10): mesa: Add support for glDepthRangef and glClearDepthf.

Ian Romanick idr at kemper.freedesktop.org
Mon Feb 28 22:27:45 UTC 2011


Module: Mesa
Branch: 7.10
Commit: 281d3fe3c082dfb8dd5be87193de723bf2bc5d43
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=281d3fe3c082dfb8dd5be87193de723bf2bc5d43

Author: Eric Anholt <eric at anholt.net>
Date:   Fri Jan 14 15:53:38 2011 -0800

mesa: Add support for glDepthRangef and glClearDepthf.

These are ARB_ES2_compatibility float variants of the core double
entrypoints.  Fixes arb_es2_compatibility-depthrangef.
(cherry picked from commit e12c4faf7ef1246fd7c3a9d9dc30130a6675c3b4)

---

 src/mesa/main/api_exec.c |    4 ++++
 src/mesa/main/depth.c    |    6 ++++++
 src/mesa/main/depth.h    |    3 +++
 src/mesa/main/viewport.c |    6 +++++-
 src/mesa/main/viewport.h |    3 +++
 5 files changed, 21 insertions(+), 1 deletions(-)

diff --git a/src/mesa/main/api_exec.c b/src/mesa/main/api_exec.c
index 1427abd..f1e4f73 100644
--- a/src/mesa/main/api_exec.c
+++ b/src/mesa/main/api_exec.c
@@ -361,6 +361,10 @@ _mesa_create_exec_table(void)
    SET_PointParameterfvEXT(exec, _mesa_PointParameterfv);
 #endif
 
+   /* 95. GL_ARB_ES2_compatibility */
+   SET_ClearDepthf(exec, _mesa_ClearDepthf);
+   SET_DepthRangef(exec, _mesa_DepthRangef);
+
    /* 97. GL_EXT_compiled_vertex_array */
 #if _HAVE_FULL_GL
    SET_LockArraysEXT(exec, _mesa_LockArraysEXT);
diff --git a/src/mesa/main/depth.c b/src/mesa/main/depth.c
index c5a910e..0bb4773 100644
--- a/src/mesa/main/depth.c
+++ b/src/mesa/main/depth.c
@@ -56,6 +56,12 @@ _mesa_ClearDepth( GLclampd depth )
 }
 
 
+void GLAPIENTRY
+_mesa_ClearDepthf( GLclampf depth )
+{
+   _mesa_ClearDepth(depth);
+}
+
 
 void GLAPIENTRY
 _mesa_DepthFunc( GLenum func )
diff --git a/src/mesa/main/depth.h b/src/mesa/main/depth.h
index b498a47..2f42862 100644
--- a/src/mesa/main/depth.h
+++ b/src/mesa/main/depth.h
@@ -44,6 +44,9 @@ extern void GLAPIENTRY
 _mesa_ClearDepth( GLclampd depth );
 
 extern void GLAPIENTRY
+_mesa_ClearDepthf( GLclampf depth );
+
+extern void GLAPIENTRY
 _mesa_DepthFunc( GLenum func );
 
 extern void GLAPIENTRY
diff --git a/src/mesa/main/viewport.c b/src/mesa/main/viewport.c
index 4747022..323edc0 100644
--- a/src/mesa/main/viewport.c
+++ b/src/mesa/main/viewport.c
@@ -145,7 +145,11 @@ _mesa_DepthRange(GLclampd nearval, GLclampd farval)
    }
 }
 
-
+void GLAPIENTRY
+_mesa_DepthRangef(GLclampf nearval, GLclampf farval)
+{
+   _mesa_DepthRange(nearval, farval);
+}
 
 /** 
  * Initialize the context viewport attribute group.
diff --git a/src/mesa/main/viewport.h b/src/mesa/main/viewport.h
index 909ff92..db4507b 100644
--- a/src/mesa/main/viewport.h
+++ b/src/mesa/main/viewport.h
@@ -43,6 +43,9 @@ _mesa_set_viewport(struct gl_context *ctx, GLint x, GLint y,
 extern void GLAPIENTRY
 _mesa_DepthRange(GLclampd nearval, GLclampd farval);
 
+extern void GLAPIENTRY
+_mesa_DepthRangef(GLclampf nearval, GLclampf farval);
+
 
 extern void 
 _mesa_init_viewport(struct gl_context *ctx);




More information about the mesa-commit mailing list