diff options
Diffstat (limited to 'src/gallium')
-rw-r--r-- | src/gallium/auxiliary/util/u_format_zs.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gallium/auxiliary/util/u_format_zs.c b/src/gallium/auxiliary/util/u_format_zs.c index 816ef14204c..ed45c52f9c9 100644 --- a/src/gallium/auxiliary/util/u_format_zs.c +++ b/src/gallium/auxiliary/util/u_format_zs.c @@ -72,7 +72,7 @@ static INLINE uint16_t z32_float_to_z16_unorm(float z) { const float scale = 0xffff; - return (uint16_t)(z * scale); + return (uint16_t)(z * scale + 0.5f); } static INLINE float |