From: Anuj Phogat Date: Wed, 9 Mar 2016 19:47:07 +0000 (-0800) Subject: mesa: Add an assert for BlockDepth in _mesa_get_format_block_size() X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=5713461ae7e24d5392c45e130f10c719e61efa79;p=mesa.git mesa: Add an assert for BlockDepth in _mesa_get_format_block_size() Signed-off-by: Anuj Phogat Reviewed-by: Brian Paul --- diff --git a/src/mesa/main/formats.c b/src/mesa/main/formats.c index cfaac04f13a..999e627c752 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; }