From: José Fonseca Date: Fri, 17 Sep 2010 10:13:37 +0000 (+0100) Subject: util: linearized sRGB values don't fit into 8bits X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=903a66abaf91d143a12d72348c0be463b73506e6;p=mesa.git util: linearized sRGB values don't fit into 8bits Fixes glean texture_srgb test. --- diff --git a/src/gallium/auxiliary/util/u_format.c b/src/gallium/auxiliary/util/u_format.c index a4ee91b0cf9..4896faa12bf 100644 --- a/src/gallium/auxiliary/util/u_format.c +++ b/src/gallium/auxiliary/util/u_format.c @@ -173,6 +173,14 @@ util_format_fits_8unorm(const struct util_format_description *format_desc) { unsigned chan; + /* + * After linearized sRGB values require more than 8bits. + */ + + if (format_desc->colorspace == UTIL_FORMAT_COLORSPACE_SRGB) { + return FALSE; + } + switch (format_desc->layout) { case UTIL_FORMAT_LAYOUT_S3TC: