From 3f1f4acfda120cd22924fbe983870fae3ee55e65 Mon Sep 17 00:00:00 2001 From: walbourn_cp Date: Thu, 11 Jul 2013 17:36:24 -0700 Subject: [PATCH] DirectXTex: BC6H/BC7 had subtle signed/unsigned bug that resulted in incorrect decoding in particular edge cases --- DirectXTex/BC.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/DirectXTex/BC.h b/DirectXTex/BC.h index 131220d..3c38d17 100644 --- a/DirectXTex/BC.h +++ b/DirectXTex/BC.h @@ -65,9 +65,9 @@ const size_t BC6H_MAX_SHAPES = 32; const size_t BC7_NUM_CHANNELS = 4; const size_t BC7_MAX_SHAPES = 64; -const uint32_t BC67_WEIGHT_MAX = 64; +const int32_t BC67_WEIGHT_MAX = 64; const uint32_t BC67_WEIGHT_SHIFT = 6; -const uint32_t BC67_WEIGHT_ROUND = 32; +const int32_t BC67_WEIGHT_ROUND = 32; extern const int g_aWeights2[4]; extern const int g_aWeights3[8];