diff options
author | José Fonseca <[email protected]> | 2010-09-17 11:13:37 +0100 |
---|---|---|
committer | José Fonseca <[email protected]> | 2010-09-17 19:18:42 +0100 |
commit | 903a66abaf91d143a12d72348c0be463b73506e6 (patch) | |
tree | 7cbfdbab10c14db8437873f2ce0d77e6f52bcc35 /src/gallium | |
parent | c70d539e24c901c54f427b91997f8ca566847f33 (diff) |
util: linearized sRGB values don't fit into 8bits
Fixes glean texture_srgb test.
Diffstat (limited to 'src/gallium')
-rw-r--r-- | src/gallium/auxiliary/util/u_format.c | 8 |
1 files changed, 8 insertions, 0 deletions
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: |