ilo: advertise supports for pure integer formats
authorChia-I Wu <olvaffe@gmail.com>
Thu, 23 May 2013 06:02:36 +0000 (14:02 +0800)
committerChia-I Wu <olvaffe@gmail.com>
Mon, 27 May 2013 03:02:57 +0000 (11:02 +0800)
For pure integer formats, no filtering nor blending is needed.

src/gallium/drivers/ilo/ilo_format.c

index 50c70d43aa768606ac5221470e18de7c8ff7c931..65fb82017266d3dfa170a73a777f4fc7a9ba1d75 100644 (file)
@@ -608,6 +608,7 @@ ilo_is_format_supported(struct pipe_screen *screen,
 {
    struct ilo_screen *is = ilo_screen(screen);
    const int gen = ILO_GEN_GET_MAJOR(is->dev.gen * 10);
+   const bool is_pure_int = util_format_is_pure_integer(format);
    const struct surface_format_info *info;
    unsigned bind;
 
@@ -641,7 +642,7 @@ ilo_is_format_supported(struct pipe_screen *screen,
       if (gen < info->render_target)
          return false;
 
-      if (gen < info->alpha_blend)
+      if (!is_pure_int && gen < info->alpha_blend)
          return false;
    }
 
@@ -652,7 +653,7 @@ ilo_is_format_supported(struct pipe_screen *screen,
       if (gen < info->sampling)
          return false;
 
-      if (gen < info->filtering)
+      if (!is_pure_int && gen < info->filtering)
          return false;
    }