i965: Clamp clear colors to the representable range

Graphics / Mesa 3D Graphics Library / Mesa - Jason Ekstrand [intel.com] - 23 June 2017 15:30 EDT

Starting with Sky Lake, we can clear to arbitrary floats or integers. Unfortunately, the hardware isn't particularly smart when it comes sampling from that clear color. If the clear color is out of range for the surface format, it will happily return whatever we put in the surface state packet unmodified. In order to avoid returning bogus
values for surfaces with a limited range, we need to do some clamping.

Cc: "17.1"

f1fa4be i965: Clamp clear colors to the representable range
src/mesa/drivers/dri/i965/brw_meta_util.c | 40 +++++++++++++++++++++++++++++++
1 file changed, 40 insertions(+)

Upstream: cgit.freedesktop.org


  • Share