Hi,
I'd expect util_format_get_blocksize to return the
size in bytes needed to store a whole block, not just
a pixel.
In case of DXT1, you get 4 bits per pixel, and trigger
the assertion that bpp must be a multiple of 8.

Christoph
diff --git a/src/gallium/auxiliary/util/u_format.h 
b/src/gallium/auxiliary/util/u_format.h
index c344c42..ff5485e 100644
--- a/src/gallium/auxiliary/util/u_format.h
+++ b/src/gallium/auxiliary/util/u_format.h
@@ -213,11 +213,11 @@ util_format_get_blocksizebits(enum pipe_format format)
       return 0;
    }
 
-   return desc->block.bits / (desc->block.width * desc->block.height);
+   return desc->block.bits;
 }
 
 /**
- * Return bytes per pixel for the given format.
+ * Return bytes per block (not pixel) for the given format.
  */
 static INLINE uint
 util_format_get_blocksize(enum pipe_format format)
------------------------------------------------------------------------------
This SF.Net email is sponsored by the Verizon Developer Community
Take advantage of Verizon's best-in-class app development support
A streamlined, 14 day to market process makes app distribution fast and easy
Join now and get one step closer to millions of Verizon customers
http://p.sf.net/sfu/verizon-dev2dev 
_______________________________________________
Mesa3d-dev mailing list
Mesa3d-dev@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mesa3d-dev

Reply via email to