mesa: Add an assert for BlockDepth in _mesa_get_format_block_size()
authorAnuj Phogat <anuj.phogat@gmail.com>
Wed, 9 Mar 2016 19:47:07 +0000 (11:47 -0800)
committerAnuj Phogat <anuj.phogat@gmail.com>
Tue, 3 May 2016 10:43:17 +0000 (03:43 -0700)
Signed-off-by: Anuj Phogat <anuj.phogat@gmail.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
src/mesa/main/formats.c

index cfaac04f13a301523094e5d2f7ae9967cbe8d918..999e627c752cc8e3fbc9d79520ab17f1ed6901bb 100644 (file)
@@ -315,6 +315,9 @@ void
 _mesa_get_format_block_size(mesa_format format, GLuint *bw, GLuint *bh)
 {
    const struct gl_format_info *info = _mesa_get_format_info(format);
+   /* Use _mesa_get_format_block_size_3d() for 3D blocks. */
+   assert(info->BlockDepth == 1);
+
    *bw = info->BlockWidth;
    *bh = info->BlockHeight;
 }