Mesa (9.2): mesa: Use IROUND instead of roundf.

Carl Worth cworth at kemper.freedesktop.org
Fri Jan 31 20:40:58 UTC 2014


Module: Mesa
Branch: 9.2
Commit: a2224cf59492c6bea2e376cd9142a3837fefcfcf
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=a2224cf59492c6bea2e376cd9142a3837fefcfcf

Author: José Fonseca <jfonseca at vmware.com>
Date:   Thu Nov 21 13:56:00 2013 +0000

mesa: Use IROUND instead of roundf.

roundf is not available on MSVC.

(cherry picked from commit bba8f10598866776ae198b363b3752c2e3bbb126)

---

 src/mesa/main/texparam.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/mesa/main/texparam.c b/src/mesa/main/texparam.c
index b437d88..70892b5 100644
--- a/src/mesa/main/texparam.c
+++ b/src/mesa/main/texparam.c
@@ -1680,7 +1680,7 @@ _mesa_GetTexParameteriv( GLenum target, GLenum pname, GLint *params )
          /* GL spec 'Data Conversions' section specifies that floating-point
           * value in integer Get function is rounded to nearest integer
           */
-         *params = (GLint) roundf(obj->Sampler.LodBias);
+         *params = IROUND(obj->Sampler.LodBias);
          break;
       case GL_TEXTURE_CROP_RECT_OES:
          if (ctx->API != API_OPENGLES || !ctx->Extensions.OES_draw_texture)




More information about the mesa-commit mailing list