Mesa (gallium-0.1): mesa: Use explicit casts when precision is lost.

Jose Fonseca jrfonseca at kemper.freedesktop.org
Tue Jan 6 18:35:46 UTC 2009


Module: Mesa
Branch: gallium-0.1
Commit: 4ebb8f78e780ffa6f5f7082d0e36a792bceca321
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=4ebb8f78e780ffa6f5f7082d0e36a792bceca321

Author: José Fonseca <jfonseca at vmware.com>
Date:   Tue Jan  6 16:01:11 2009 +0000

mesa: Use explicit casts when precision is lost.

Silences MSVC.

---

 src/mesa/main/get.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/mesa/main/get.c b/src/mesa/main/get.c
index 4674c44..e4910a6 100644
--- a/src/mesa/main/get.c
+++ b/src/mesa/main/get.c
@@ -2133,7 +2133,7 @@ _mesa_GetFloatv( GLenum pname, GLfloat *params )
          params[0] = (GLfloat)(ctx->DrawBuffer->Visual.depthBits);
          break;
       case GL_DEPTH_CLEAR_VALUE:
-         params[0] = ctx->Depth.Clear;
+         params[0] = (GLfloat)(ctx->Depth.Clear);
          break;
       case GL_DEPTH_FUNC:
          params[0] = ENUM_TO_FLOAT(ctx->Depth.Func);
@@ -2936,7 +2936,7 @@ _mesa_GetFloatv( GLenum pname, GLfloat *params )
          GLuint i, n = _mesa_get_compressed_formats(ctx, formats, GL_FALSE);
          ASSERT(n <= 100);
          for (i = 0; i < n; i++)
-            params[i] = ENUM_TO_INT(formats[i]);
+            params[i] = ENUM_TO_FLOAT(formats[i]);
          }
          break;
       case GL_ARRAY_ELEMENT_LOCK_FIRST_EXT:




More information about the mesa-commit mailing list