Module: Mesa
Branch: master
Commit: 0f01aa803332760079bde36218a3e884f2613db6
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=0f01aa803332760079bde36218a3e884f2613db6

Author: Ilia Mirkin <imir...@alum.mit.edu>
Date:   Fri Sep 16 13:52:18 2016 -0400

mesa: add implementations for new float depth functions

This just up-converts them to doubles. Not great, but this is what all
the other variants also do.

Signed-off-by: Ilia Mirkin <imir...@alum.mit.edu>
Reviewed-by: Anuj Phogat <anuj.pho...@gmail.com>

---

 src/mesa/main/viewport.c | 19 ++++++++++++++++++-
 1 file changed, 18 insertions(+), 1 deletion(-)

diff --git a/src/mesa/main/viewport.c b/src/mesa/main/viewport.c
index f6eaa0f..f59723f 100644
--- a/src/mesa/main/viewport.c
+++ b/src/mesa/main/viewport.c
@@ -333,7 +333,24 @@ _mesa_DepthRangeArrayv(GLuint first, GLsizei count, const 
GLclampd *v)
 void GLAPIENTRY
 _mesa_DepthRangeArrayfvOES(GLuint first, GLsizei count, const GLfloat *v)
 {
+   int i;
+   GET_CURRENT_CONTEXT(ctx);
+
+   if (MESA_VERBOSE & VERBOSE_API)
+      _mesa_debug(ctx, "glDepthRangeArrayfv %d %d\n", first, count);
 
+   if ((first + count) > ctx->Const.MaxViewports) {
+      _mesa_error(ctx, GL_INVALID_VALUE,
+                  "glDepthRangeArrayfv: first (%d) + count (%d) >= 
MaxViewports (%d)",
+                  first, count, ctx->Const.MaxViewports);
+      return;
+   }
+
+   for (i = 0; i < count; i++)
+      set_depth_range_no_notify(ctx, i + first, v[i * 2], v[i * 2 + 1]);
+
+   if (ctx->Driver.DepthRange)
+      ctx->Driver.DepthRange(ctx);
 }
 
 /**
@@ -367,7 +384,7 @@ _mesa_DepthRangeIndexed(GLuint index, GLclampd nearval, 
GLclampd farval)
 void GLAPIENTRY
 _mesa_DepthRangeIndexedfOES(GLuint index, GLfloat nearval, GLfloat farval)
 {
-
+   _mesa_DepthRangeIndexed(index, nearval, farval);
 }
 
 /** 

_______________________________________________
mesa-commit mailing list
mesa-commit@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-commit

Reply via email to