mirror of
https://github.com/bkaradzic/bx.git
synced 2026-02-18 13:03:06 +01:00
Fixed VS build.
This commit is contained in:
@@ -588,7 +588,7 @@ BX_SIMD128_IMPLEMENT_TEST(xyzw , 0xf)
|
||||
template<>
|
||||
BX_SIMD_INLINE simd128_sse_t simd_rsqrt_nr(simd128_sse_t _a)
|
||||
{
|
||||
return simd_rsqrt_nr_ni(_a);
|
||||
return simd_rsqrt_ni(_a);
|
||||
}
|
||||
|
||||
template<>
|
||||
|
||||
@@ -24,19 +24,19 @@ struct MockNonFreeingAllocator : public bx::AllocatorI
|
||||
BX_ASSERT(m_sbrk + _size < BX_COUNTOF(m_storage), "");
|
||||
BX_UNUSED(_ptr, _file, _line);
|
||||
|
||||
const uint32_t sbrk = bx::alignUp(m_sbrk, bx::max(_align, 1) );
|
||||
const uintptr_t sbrk = bx::alignUp(m_sbrk, bx::max(int32_t(_align), 1) );
|
||||
m_sbrk = sbrk + _size;
|
||||
|
||||
return &m_storage[sbrk];
|
||||
}
|
||||
|
||||
uint32_t m_sbrk;
|
||||
uintptr_t m_sbrk;
|
||||
BX_ALIGN_DECL(256, uint8_t) m_storage[0x10000];
|
||||
};
|
||||
|
||||
bool testAlignment(size_t _expected, void* _ptr)
|
||||
{
|
||||
bool aligned = bx::isAligned(_ptr, _expected);
|
||||
bool aligned = bx::isAligned(_ptr, int32_t(_expected) );
|
||||
// BX_TRACE("%p, %d", _ptr, _expected);
|
||||
BX_WARN(aligned, "%p not aligned to %d bytes.", _ptr, _expected);
|
||||
return aligned;
|
||||
|
||||
@@ -22,6 +22,10 @@ TEST_CASE("isFinite, isInfinite, isNan", "")
|
||||
REQUIRE(::__isnanf(u.f) == bx::isNan(u.f) );
|
||||
REQUIRE(::__isfinitef(u.f) == bx::isFinite(u.f) );
|
||||
REQUIRE(::__isinff(u.f) == bx::isInfinite(u.f) );
|
||||
#elif BX_COMPILER_MSVC
|
||||
REQUIRE(!!::_isnanf(u.f) == bx::isNan(u.f));
|
||||
REQUIRE(!!::_finitef(u.f) == bx::isFinite(u.f));
|
||||
REQUIRE(!!::isinf(u.f) == bx::isInfinite(u.f));
|
||||
#else
|
||||
REQUIRE(::isnanf(u.f) == bx::isNan(u.f) );
|
||||
REQUIRE(::finitef(u.f) == bx::isFinite(u.f) );
|
||||
|
||||
Reference in New Issue
Block a user