[Mesa-dev] [V2 03/19] mesa: Add an assert for BlockDepth in _mesa_get_format_block_size()

Anuj Phogat anuj.phogat at gmail.com
Mon Mar 21 21:03:57 UTC 2016


Signed-off-by: Anuj Phogat <anuj.phogat at gmail.com>
---
 src/mesa/main/formats.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/src/mesa/main/formats.c b/src/mesa/main/formats.c
index cfaac04..999e627 100644
--- a/src/mesa/main/formats.c
+++ b/src/mesa/main/formats.c
@@ -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;
 }
-- 
2.5.0



More information about the mesa-dev mailing list