aboutsummaryrefslogtreecommitdiff
path: root/mesalib/src/gallium/auxiliary/util/u_format_etc.c
diff options
context:
space:
mode:
Diffstat (limited to 'mesalib/src/gallium/auxiliary/util/u_format_etc.c')
-rw-r--r--mesalib/src/gallium/auxiliary/util/u_format_etc.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/mesalib/src/gallium/auxiliary/util/u_format_etc.c b/mesalib/src/gallium/auxiliary/util/u_format_etc.c
index f909b1608..63e03ff5c 100644
--- a/mesalib/src/gallium/auxiliary/util/u_format_etc.c
+++ b/mesalib/src/gallium/auxiliary/util/u_format_etc.c
@@ -65,11 +65,10 @@ util_format_etc1_rgb8_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, con
void
util_format_etc1_rgb8_fetch_rgba_float(float *dst, const uint8_t *src, unsigned i, unsigned j)
{
- const unsigned bw = 4, bh = 4;
struct etc1_block block;
uint8_t tmp[3];
- assert(i < bw && j < bh);
+ assert(i < 4 && j < 4); /* check i, j against 4x4 block size */
etc1_parse_block(&block, src);
etc1_fetch_texel(&block, i, j, tmp);