nv30: use util_format_is_supported
authorMarek Olšák <maraeo@gmail.com>
Wed, 12 Sep 2012 22:36:37 +0000 (00:36 +0200)
committerMarek Olšák <maraeo@gmail.com>
Sun, 30 Sep 2012 16:57:56 +0000 (18:57 +0200)
Hardware drivers *must* use it.

Reviewed-by: Brian Paul <brianp@vmware.com>
src/gallium/drivers/nv30/nv30_screen.c

index c9e5c97b509c1f9f10ba13d1a7dd8c3d103a8cbf..18ad3a87461ba631b5cfd6cc47b2b609261f0c31 100644 (file)
@@ -23,6 +23,7 @@
  *
  */
 
+#include "util/u_format.h"
 #include "util/u_format_s3tc.h"
 
 #include "nouveau/nv_object.xml.h"
@@ -245,16 +246,8 @@ nv30_screen_is_format_supported(struct pipe_screen *pscreen,
    if (!(0x00000017 & (1 << sample_count)))
       return FALSE;
 
-   if (!util_format_s3tc_enabled) {
-      switch (format) {
-      case PIPE_FORMAT_DXT1_RGB:
-      case PIPE_FORMAT_DXT1_RGBA:
-      case PIPE_FORMAT_DXT3_RGBA:
-      case PIPE_FORMAT_DXT5_RGBA:
-         return FALSE;
-      default:
-         break;
-      }
+   if (!util_format_is_supported(format, bindings)) {
+      return FALSE;
    }
 
    /* transfers & shared are always supported */