llvmpipe: More tweaks to the supported texture formats.
authorJosé Fonseca <jfonseca@vmware.com>
Thu, 1 Apr 2010 14:16:26 +0000 (15:16 +0100)
committerJosé Fonseca <jfonseca@vmware.com>
Thu, 1 Apr 2010 14:16:26 +0000 (15:16 +0100)
src/gallium/drivers/llvmpipe/lp_screen.c

index 3d6c7930a06d540da7085b62d90eb9154606d556..5ad581bd179dc7b00ab2a3a791ed025a093d86c6 100644 (file)
@@ -191,14 +191,14 @@ llvmpipe_is_format_supported( struct pipe_screen *_screen,
       break;
    }
 
-   if(tex_usage & PIPE_TEXTURE_USAGE_RENDER_TARGET) {
-      if(format_desc->block.width != 1 ||
-         format_desc->block.height != 1)
-         return FALSE;
+   if(format_desc->block.width != 1 ||
+      format_desc->block.height != 1)
+      return FALSE;
 
-      if(format_desc->layout != UTIL_FORMAT_LAYOUT_PLAIN)
-         return FALSE;
+   if(format_desc->layout != UTIL_FORMAT_LAYOUT_PLAIN)
+      return FALSE;
 
+   if(tex_usage & PIPE_TEXTURE_USAGE_RENDER_TARGET) {
       if(format_desc->colorspace != UTIL_FORMAT_COLORSPACE_RGB &&
          format_desc->colorspace != UTIL_FORMAT_COLORSPACE_SRGB)
          return FALSE;
@@ -228,10 +228,6 @@ llvmpipe_is_format_supported( struct pipe_screen *_screen,
       if(format_desc->colorspace != UTIL_FORMAT_COLORSPACE_RGB &&
          format_desc->colorspace != UTIL_FORMAT_COLORSPACE_ZS)
          return FALSE;
-
-      /* not supported yet */
-      if (format == PIPE_FORMAT_Z16_UNORM)
-         return FALSE;
    }
 
    return TRUE;