Skip to content

Commit

Permalink
gni
Browse files Browse the repository at this point in the history
  • Loading branch information
christophe-lunarg committed Jan 18, 2024
1 parent ed3113e commit 712f27f
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
9 changes: 9 additions & 0 deletions test/core/core_type_aligned.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -72,13 +72,22 @@ 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;
glm::vec3 B;
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;

Expand Down
4 changes: 2 additions & 2 deletions test/gtc/gtc_bitfield.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit 712f27f

Please sign in to comment.