[Mesa-dev] [PATCH 04/30] i965: Clamp clear colors to the representable range

Chad Versace chadversary at chromium.org
Tue Jun 20 22:48:55 UTC 2017


On Fri 16 Jun 2017, Jason Ekstrand wrote:
> 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" <mesa-stable at lists.freedesktop.org>
> ---
>  src/mesa/drivers/dri/i965/brw_meta_util.c | 40 +++++++++++++++++++++++++++++++
>  1 file changed, 40 insertions(+)

This reminded me that GL has no GL_UNSIGNED_FLOAT.

Reviewed-by: Chad Versace <chadversary at chromium.org>


More information about the mesa-dev mailing list