r300g: re-enable SRGB formats
authorMarek Olšák <maraeo@gmail.com>
Sat, 20 Feb 2010 17:52:20 +0000 (18:52 +0100)
committerMarek Olšák <maraeo@gmail.com>
Sun, 21 Feb 2010 13:24:12 +0000 (14:24 +0100)
Ouch.

src/gallium/drivers/r300/r300_texture.h

index 153f4eebdaf5b40ae9a5df307397c05e98820fe4..e2c10325fa9222e0a1f6def10dfcdf6a9b90295f 100644 (file)
@@ -208,7 +208,8 @@ static INLINE uint32_t r300_translate_texformat(enum pipe_format format)
     switch (desc->channel[0].type) {
         case UTIL_FORMAT_TYPE_UNSIGNED:
         case UTIL_FORMAT_TYPE_SIGNED:
-            if (!desc->channel[0].normalized) {
+            if (!desc->channel[0].normalized &&
+                desc->colorspace != UTIL_FORMAT_COLORSPACE_SRGB) {
                 return ~0;
             }