summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAnuj Phogat <[email protected]>2016-03-09 11:47:07 -0800
committerAnuj Phogat <[email protected]>2016-05-03 03:43:17 -0700
commit5713461ae7e24d5392c45e130f10c719e61efa79 (patch)
tree574ae65e30494fe65d072a23b54c0f8518b103ac /src
parent9163c37349a2f4ddb3ebc2722f8a768e282884a0 (diff)
mesa: Add an assert for BlockDepth in _mesa_get_format_block_size()
Signed-off-by: Anuj Phogat <[email protected]> Reviewed-by: Brian Paul <[email protected]>
Diffstat (limited to 'src')
-rw-r--r--src/mesa/main/formats.c3
1 files changed, 3 insertions, 0 deletions
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;
}