From 004dfd1586f787f27f36c4326b9222a314295735 Mon Sep 17 00:00:00 2001 From: Pokechu22 Date: Thu, 1 Apr 2021 14:30:01 -0700 Subject: Replace uses of cassert with Common/Assert.h --- Source/Core/VideoCommon/TextureDecoder_x64.cpp | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) (limited to 'Source/Core/VideoCommon/TextureDecoder_x64.cpp') diff --git a/Source/Core/VideoCommon/TextureDecoder_x64.cpp b/Source/Core/VideoCommon/TextureDecoder_x64.cpp index ea8f3e2e43..2ee2ec48f5 100644 --- a/Source/Core/VideoCommon/TextureDecoder_x64.cpp +++ b/Source/Core/VideoCommon/TextureDecoder_x64.cpp @@ -6,6 +6,10 @@ #include #include +#ifdef CHECK +#include "Common/Assert.h" +#endif + #include "Common/CPUDetect.h" #include "Common/CommonTypes.h" #include "Common/Intrinsics.h" @@ -1362,8 +1366,8 @@ static void TexDecoder_DecodeImpl_CMPR(u32* dst, const u8* src, int width, int h dst32[(width * 0) + 6] = colors1[(dxt1sel >> ((0 * 8) + 2)) & 3]; dst32[(width * 0) + 7] = colors1[(dxt1sel >> ((0 * 8) + 0)) & 3]; #ifdef CHECK - assert(memcmp(&(tmp0[0]), &dst32[(width * 0)], 16) == 0); - assert(memcmp(&(tmp1[0]), &dst32[(width * 0) + 4], 16) == 0); + ASSERT(memcmp(&(tmp0[0]), &dst32[(width * 0)], 16) == 0); + ASSERT(memcmp(&(tmp1[0]), &dst32[(width * 0) + 4], 16) == 0); #endif // Row 1: dst32[(width * 1) + 0] = colors0[(dxt0sel >> ((1 * 8) + 6)) & 3]; @@ -1375,8 +1379,8 @@ static void TexDecoder_DecodeImpl_CMPR(u32* dst, const u8* src, int width, int h dst32[(width * 1) + 6] = colors1[(dxt1sel >> ((1 * 8) + 2)) & 3]; dst32[(width * 1) + 7] = colors1[(dxt1sel >> ((1 * 8) + 0)) & 3]; #ifdef CHECK - assert(memcmp(&(tmp0[1]), &dst32[(width * 1)], 16) == 0); - assert(memcmp(&(tmp1[1]), &dst32[(width * 1) + 4], 16) == 0); + ASSERT(memcmp(&(tmp0[1]), &dst32[(width * 1)], 16) == 0); + ASSERT(memcmp(&(tmp1[1]), &dst32[(width * 1) + 4], 16) == 0); #endif // Row 2: dst32[(width * 2) + 0] = colors0[(dxt0sel >> ((2 * 8) + 6)) & 3]; @@ -1388,8 +1392,8 @@ static void TexDecoder_DecodeImpl_CMPR(u32* dst, const u8* src, int width, int h dst32[(width * 2) + 6] = colors1[(dxt1sel >> ((2 * 8) + 2)) & 3]; dst32[(width * 2) + 7] = colors1[(dxt1sel >> ((2 * 8) + 0)) & 3]; #ifdef CHECK - assert(memcmp(&(tmp0[2]), &dst32[(width * 2)], 16) == 0); - assert(memcmp(&(tmp1[2]), &dst32[(width * 2) + 4], 16) == 0); + ASSERT(memcmp(&(tmp0[2]), &dst32[(width * 2)], 16) == 0); + ASSERT(memcmp(&(tmp1[2]), &dst32[(width * 2) + 4], 16) == 0); #endif // Row 3: dst32[(width * 3) + 0] = colors0[(dxt0sel >> ((3 * 8) + 6)) & 3]; @@ -1401,8 +1405,8 @@ static void TexDecoder_DecodeImpl_CMPR(u32* dst, const u8* src, int width, int h dst32[(width * 3) + 6] = colors1[(dxt1sel >> ((3 * 8) + 2)) & 3]; dst32[(width * 3) + 7] = colors1[(dxt1sel >> ((3 * 8) + 0)) & 3]; #ifdef CHECK - assert(memcmp(&(tmp0[3]), &dst32[(width * 3)], 16) == 0); - assert(memcmp(&(tmp1[3]), &dst32[(width * 3) + 4], 16) == 0); + ASSERT(memcmp(&(tmp0[3]), &dst32[(width * 3)], 16) == 0); + ASSERT(memcmp(&(tmp1[3]), &dst32[(width * 3) + 4], 16) == 0); #endif } } -- cgit v1.2.3