diff options
author | Jason Ekstrand <[email protected]> | 2016-08-03 09:58:13 -0700 |
---|---|---|
committer | Jason Ekstrand <[email protected]> | 2016-08-05 09:07:04 -0700 |
commit | ffcf8e1049f300b3a890bdd1ce778c8436aee049 (patch) | |
tree | a875995d71184aebd6d74192177a12a6f6a07f1e /src/util/format_rgb9e5.h | |
parent | c7eb9a75653c1df54e6c36873c8c4ddd142b98d6 (diff) |
util/format: Use explicitly sized types
Both the rgb9e5 and r11g11b10 formats are defined based on how they are
packed into a 32-bit integer. It makes sense that the functions that
manipulate them take an explicitly sized type.
Signed-off-by: Jason Ekstrand <[email protected]>
Reviewed-by: Roland Scheidegger <[email protected]>
Diffstat (limited to 'src/util/format_rgb9e5.h')
-rw-r--r-- | src/util/format_rgb9e5.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/util/format_rgb9e5.h b/src/util/format_rgb9e5.h index 2559e1e7d1b..70ad04fdeba 100644 --- a/src/util/format_rgb9e5.h +++ b/src/util/format_rgb9e5.h @@ -57,7 +57,7 @@ static inline int rgb9e5_ClampRange(float x) return f.u; } -static inline unsigned int float3_to_rgb9e5(const float rgb[3]) +static inline uint32_t float3_to_rgb9e5(const float rgb[3]) { int rm, gm, bm, exp_shared; uint32_t revdenom_biasedexp; @@ -104,7 +104,7 @@ static inline unsigned int float3_to_rgb9e5(const float rgb[3]) return (exp_shared << 27) | (bm << 18) | (gm << 9) | rm; } -static inline void rgb9e5_to_float3(unsigned rgb, float retval[3]) +static inline void rgb9e5_to_float3(uint32_t rgb, float retval[3]) { int exponent; union { float f; uint32_t u; } scale; |