util/u_format: take normalized flag in consideration in util_format_is_rgba8_variant
authorJosé Fonseca <jfonseca@vmware.com>
Fri, 25 Oct 2013 11:39:42 +0000 (12:39 +0100)
committerJosé Fonseca <jfonseca@vmware.com>
Tue, 5 Nov 2013 14:05:41 +0000 (14:05 +0000)
Just happened to notice it was missing while looking at it.

src/gallium/auxiliary/util/u_format.h

index dc777c35c190701ea0e1ab74f2eaade00c86646a..369c3994ad377377e07862bb5d2718164b961034 100644 (file)
@@ -696,6 +696,9 @@ util_format_is_rgba8_variant(const struct util_format_description *desc)
       if(desc->channel[chan].type != UTIL_FORMAT_TYPE_UNSIGNED &&
          desc->channel[chan].type != UTIL_FORMAT_TYPE_VOID)
          return FALSE;
+      if(desc->channel[chan].type == UTIL_FORMAT_TYPE_UNSIGNED &&
+         !desc->channel[chan].normalized)
+         return FALSE;
       if(desc->channel[chan].size != 8)
          return FALSE;
    }