util: (trivial) ETC1 meets the criteria for fitting into unorm8
authorRoland Scheidegger <sroland@vmware.com>
Sat, 3 Dec 2016 16:10:09 +0000 (17:10 +0100)
committerRoland Scheidegger <sroland@vmware.com>
Tue, 6 Dec 2016 19:06:06 +0000 (20:06 +0100)
Just like other similar compressed formats.

Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
src/gallium/auxiliary/util/u_format.c

index 72dd60f..3d28190 100644 (file)
@@ -561,6 +561,11 @@ util_format_fits_8unorm(const struct util_format_description *format_desc)
          return TRUE;
       return FALSE;
 
+   case UTIL_FORMAT_LAYOUT_ETC:
+      if (format_desc->format == PIPE_FORMAT_ETC1_RGB8)
+         return TRUE;
+      return FALSE;
+
    case UTIL_FORMAT_LAYOUT_PLAIN:
       /*
        * For these we can find a generic rule.