Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Eric Engestrom <eric@engestrom.ch>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5100>
*
* packUnorm4x8: round(clamp(c, 0, +1) * 255.0)
*/
- return (uint8_t) (int) _mesa_roundevenf(CLAMP(x, 0.0f, 1.0f) * 255.0f);
+ return (uint8_t) (int) _mesa_roundevenf(SATURATE(x) * 255.0f);
}
/**
* packUnorm2x16: round(clamp(c, 0, +1) * 65535.0)
*/
return (uint16_t) (int)
- _mesa_roundevenf(CLAMP(x, 0.0f, 1.0f) * 65535.0f);
+ _mesa_roundevenf(SATURATE(x) * 65535.0f);
}
/**