diff options
author | marha <marha@users.sourceforge.net> | 2013-10-07 16:40:05 +0200 |
---|---|---|
committer | marha <marha@users.sourceforge.net> | 2013-10-07 16:40:05 +0200 |
commit | 8f0ed7f7a754df710b13b9dabbaa32b5d4211182 (patch) | |
tree | 03bf52a933c29962894c2cec5f33028439cf4f5a /mesalib/src/gallium/auxiliary/util/u_pack_color.h | |
parent | 7d29f4054380e7f42722c280b9caedce9fa4ace9 (diff) | |
parent | 81fd17c8678e89cea6610b8b2996b028b21eb5dc (diff) | |
download | vcxsrv-8f0ed7f7a754df710b13b9dabbaa32b5d4211182.tar.gz vcxsrv-8f0ed7f7a754df710b13b9dabbaa32b5d4211182.tar.bz2 vcxsrv-8f0ed7f7a754df710b13b9dabbaa32b5d4211182.zip |
Merge remote-tracking branch 'origin/released'
* origin/released:
xserver fontconfig libXdmcp mesa pixmand xkeyboard-config git update 7 oct 2013
Conflicts:
xorg-server/dix/dispatch.c
xorg-server/dix/privates.c
xorg-server/glx/glxcmds.c
xorg-server/hw/kdrive/ephyr/ephyr.h
xorg-server/hw/kdrive/ephyr/ephyrinit.c
xorg-server/hw/kdrive/ephyr/hostx.c
Diffstat (limited to 'mesalib/src/gallium/auxiliary/util/u_pack_color.h')
-rw-r--r-- | mesalib/src/gallium/auxiliary/util/u_pack_color.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/mesalib/src/gallium/auxiliary/util/u_pack_color.h b/mesalib/src/gallium/auxiliary/util/u_pack_color.h index 102ad6051..36252738d 100644 --- a/mesalib/src/gallium/auxiliary/util/u_pack_color.h +++ b/mesalib/src/gallium/auxiliary/util/u_pack_color.h @@ -528,12 +528,12 @@ util_pack_z(enum pipe_format format, double z) case PIPE_FORMAT_Z16_UNORM: if (z == 1.0) return 0xffff; - return (uint32_t) (z * 0xffff); + return (uint32_t) lrint(z * 0xffff); case PIPE_FORMAT_Z32_UNORM: /* special-case to avoid overflow */ if (z == 1.0) return 0xffffffff; - return (uint32_t) (z * 0xffffffff); + return (uint32_t) llrint(z * 0xffffffff); case PIPE_FORMAT_Z32_FLOAT: fui.f = (float)z; return fui.ui; @@ -541,12 +541,12 @@ util_pack_z(enum pipe_format format, double z) case PIPE_FORMAT_Z24X8_UNORM: if (z == 1.0) return 0xffffff; - return (uint32_t) (z * 0xffffff); + return (uint32_t) lrint(z * 0xffffff); case PIPE_FORMAT_S8_UINT_Z24_UNORM: case PIPE_FORMAT_X8Z24_UNORM: if (z == 1.0) return 0xffffff00; - return ((uint32_t) (z * 0xffffff)) << 8; + return ((uint32_t) lrint(z * 0xffffff)) << 8; case PIPE_FORMAT_S8_UINT: /* this case can get it via util_pack_z_stencil() */ return 0; |