Broadwell's 3DSTATE_CLEAR_PARAMS packet expects a floating point value
regardless of format. This means we need to stop converting it to
UNORM.
Storing the value as float would make sense, but since we already have a
uint32_t field, this patch continues shoehorning it into that. In a
sense, this makes mt->depth_clear_value the DWord you emit in the
packet, rather than the clear value itself.
Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Eric Anholt <eric@anholt.net>
/* FALLTHROUGH */
default:
- depth_clear_value = fb->_DepthMax * ctx->Depth.Clear;
+ if (brw->gen >= 8)
+ depth_clear_value = float_as_int(ctx->Depth.Clear);
+ else
+ depth_clear_value = fb->_DepthMax * ctx->Depth.Clear;
break;
}