mesa: Fix uf10_to_f32() scale factor in the E == 0 and M != 0 case.
[mesa.git] / src / util / format_r11g11b10f.h
index c9e967cf31a906a88c10327459b79b6e669003a0..f6cd4ac696a1e920568c0bd918fbcbe0010c235a 100644 (file)
@@ -191,7 +191,7 @@ static inline float uf10_to_f32(uint16_t val)
 
    if (exponent == 0) {
       if (mantissa != 0) {
-         const float scale = 1.0 / (1 << 20);
+         const float scale = 1.0 / (1 << 19);
          f32.f = scale * mantissa;
       }
    } else if (exponent == 31) {