This commit is contained in:
Christophe 2024-01-18 17:39:41 +01:00
parent ed3113eadd
commit 712f27f768
2 changed files with 11 additions and 2 deletions

View file

@ -72,6 +72,11 @@ static int test_vec3_aligned()
std::size_t const Size1 = sizeof(Struct1);
Error += Size1 == 48 ? 0 : 1;
#if GLM_COMPILER & GLM_COMPILER_CLANG
# pragma clang diagnostic push
# pragma clang diagnostic ignored "-Wpadded"
#endif
struct Struct2
{
glm::vec4 A;
@ -79,6 +84,10 @@ static int test_vec3_aligned()
float C;
};
#if GLM_COMPILER & GLM_COMPILER_CLANG
# pragma clang diagnostic pop
#endif
std::size_t const Size2 = sizeof(Struct2);
Error += Size2 == 48 ? 0 : 1;

View file

@ -359,7 +359,7 @@ namespace bitfieldInterleave
#if GLM_ARCH & GLM_ARCH_SSE2_BIT
static inline glm::uint64 sseBitfieldInterleave(glm::uint32 x, glm::uint32 y)
{
__m128i const Array = _mm_set_epi32(0, y, 0, x);
__m128i const Array = _mm_set_epi32(0, static_cast<int>(y), 0, static_cast<int>(x));
__m128i const Mask4 = _mm_set1_epi32(0x0000FFFF);
__m128i const Mask3 = _mm_set1_epi32(0x00FF00FF);
@ -416,7 +416,7 @@ namespace bitfieldInterleave
static inline glm::uint64 sseUnalignedBitfieldInterleave(glm::uint32 x, glm::uint32 y)
{
__m128i const Array = _mm_set_epi32(0, y, 0, x);
__m128i const Array = _mm_set_epi32(0, static_cast<int>(y), 0, static_cast<int>(x));
__m128i const Mask4 = _mm_set1_epi32(0x0000FFFF);
__m128i const Mask3 = _mm_set1_epi32(0x00FF00FF);