}
}
-static INLINE float rgb9e5_MaxOf3(float x, float y, float z)
-{
- if (x > y) {
- return MAX2(x, z);
- } else {
- return MAX2(y, z);
- }
-}
-
/* Ok, FloorLog2 is not correct for the denorm and zero values, but we
are going to do a max of this value with the minimum rgb9e5 exponent
that will hide these problem cases. */
gc = rgb9e5_ClampRange(rgb[1]);
bc = rgb9e5_ClampRange(rgb[2]);
- maxrgb = rgb9e5_MaxOf3(rc, gc, bc);
+ maxrgb = MAX3(rc, gc, bc);
exp_shared = MAX2(-RGB9E5_EXP_BIAS-1, rgb9e5_FloorLog2(maxrgb)) + 1 + RGB9E5_EXP_BIAS;
assert(exp_shared <= RGB9E5_MAX_VALID_BIASED_EXP);
assert(exp_shared >= 0);
if (ctx->Extensions.EXT_texture_shared_exponent) {
switch (internalFormat) {
case GL_RGB9_E5:
- RETURN_IF_SUPPORTED(MESA_FORMAT_RGB9_E5_FLOAT);
- break;
+ ASSERT(ctx->TextureFormatSupported[MESA_FORMAT_RGB9_E5_FLOAT]);
+ return MESA_FORMAT_RGB9_E5_FLOAT;
default:
; /* fallthrough */
}