From b2b907f05260f7bf3a17ba8b23a27489d15cb947 Mon Sep 17 00:00:00 2001 From: Sil Vilerino Date: Mon, 2 May 2022 09:27:09 -0700 Subject: [PATCH] util/u_format: Drop assert that has valid/well-defined behavior Reviewed-by: Jesse Natalie Part-of: --- src/util/format/u_format.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/util/format/u_format.h b/src/util/format/u_format.h index 7f820bf1de1..5b5026bd242 100644 --- a/src/util/format/u_format.h +++ b/src/util/format/u_format.h @@ -841,7 +841,7 @@ util_format_get_blocksize(enum pipe_format format) uint bytes = bits / 8; assert(bits % 8 == 0); - assert(bytes > 0); + /* Some formats have bits set to 0, let's default to 1.*/ if (bytes == 0) { bytes = 1; }