projects
/
mesa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c70d539
)
util: linearized sRGB values don't fit into 8bits
author
José Fonseca
<jfonseca@vmware.com>
Fri, 17 Sep 2010 10:13:37 +0000
(11:13 +0100)
committer
José Fonseca
<jfonseca@vmware.com>
Fri, 17 Sep 2010 18:18:42 +0000
(19:18 +0100)
Fixes glean texture_srgb test.
src/gallium/auxiliary/util/u_format.c
patch
|
blob
|
history
diff --git
a/src/gallium/auxiliary/util/u_format.c
b/src/gallium/auxiliary/util/u_format.c
index a4ee91b0cf9d3c5b57db87c982a9ae6c7ed3e3d5..4896faa12bf95cce66dd4b21229c5733e9509995 100644
(file)
--- 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: