This commit is contained in:
Бранимир Караџић
2023-11-23 09:42:13 -08:00
parent 5d61905eb1
commit 6c4d1888eb

View File

@@ -33,9 +33,9 @@
#define _BIMG_ASSERT(_condition, _format, ...) \
BX_MACRO_BLOCK_BEGIN \
if (!BX_IGNORE_C4127(_condition) ) \
if (!BX_IGNORE_C4127(_condition) \
&& bx::assertFunction(bx::Location::current(), "ASSERT " #_condition " -> " _format, ##__VA_ARGS__) ) \
{ \
BX_TRACE("ASSERT " _format, ##__VA_ARGS__); \
bx::debugBreak(); \
} \
BX_MACRO_BLOCK_END
@@ -85,7 +85,7 @@ namespace bimg
if (_hasMips)
{
const uint32_t max = bx::max(_width, _height, _depth);
const uint32_t num = 1 + uint32_t(bx::log2((int32_t)max) );
const uint32_t num = 1 + bx::ceilLog2(max);
return uint8_t(num);
}