Skip to content

Commit b71d417

Browse files
committed
minor fix to assert range check in bc6hf so basist::MAX_HALF_FLOAT is encodable (this can't happen in our normal ASTC HDR path, as values this large can't normally be encoded)
1 parent e5e4081 commit b71d417

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

transcoder/basisu_transcoder.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24141,7 +24141,8 @@ namespace basist
2414124141
max_g = pPixels[max_idx * 3 + 1];
2414224142
max_b = pPixels[max_idx * 3 + 2];
2414324143

24144-
assert((max_r < MAX_HALF_FLOAT_AS_INT_BITS) && (max_g < MAX_HALF_FLOAT_AS_INT_BITS) && (max_b < MAX_HALF_FLOAT_AS_INT_BITS));
24144+
//assert((max_r < MAX_HALF_FLOAT_AS_INT_BITS) && (max_g < MAX_HALF_FLOAT_AS_INT_BITS) && (max_b < MAX_HALF_FLOAT_AS_INT_BITS));
24145+
assert((max_r <= MAX_HALF_FLOAT_AS_INT_BITS) && (max_g <= MAX_HALF_FLOAT_AS_INT_BITS) && (max_b <= MAX_HALF_FLOAT_AS_INT_BITS));
2414524146

2414624147
bc6h_quant_dequant_endpoints(min_r, min_g, min_b, max_r, max_g, max_b, 10);
2414724148

0 commit comments

Comments
 (0)