Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
gne
Browse files Browse the repository at this point in the history
christophe-lunarg committed Jan 18, 2024
1 parent cd8f3d2 commit 4bb65eb
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions test/gtc/gtc_type_aligned.cpp
Original file line number Diff line number Diff line change
@@ -20,13 +20,22 @@ struct my_vec4_packed
};
GLM_STATIC_ASSERT(sizeof(my_vec4_packed) == sizeof(glm::uint32) + sizeof(glm::vec4), "glm::vec4 packed is not correct");

#if GLM_COMPILER & GLM_COMPILER_CLANG
# pragma clang diagnostic push
# pragma clang diagnostic ignored "-Wpadded"
#endif

struct my_vec4_aligned
{
glm::uint32 a;
glm::aligned_vec4 b;
};
GLM_STATIC_ASSERT(sizeof(my_vec4_aligned) == sizeof(glm::aligned_vec4) * 2, "glm::vec4 aligned is not correct");

#if GLM_COMPILER & GLM_COMPILER_CLANG
# pragma clang diagnostic pop
#endif

struct my_dvec4_packed
{
glm::uint64 a;
@@ -41,11 +50,21 @@ struct my_dvec4_aligned
};
//GLM_STATIC_ASSERT(sizeof(my_dvec4_aligned) == sizeof(glm::aligned_dvec4) * 2, "glm::dvec4 aligned is not correct");

#if GLM_COMPILER & GLM_COMPILER_CLANG
# pragma clang diagnostic push
# pragma clang diagnostic ignored "-Wpadded"
#endif

struct my_ivec4_packed
{
glm::uint32 a;
glm::ivec4 b;
};

#if GLM_COMPILER & GLM_COMPILER_CLANG
# pragma clang diagnostic pop
#endif

GLM_STATIC_ASSERT(sizeof(my_ivec4_packed) == sizeof(glm::uint32) + sizeof(glm::ivec4), "glm::ivec4 packed is not correct");

struct my_ivec4_aligned

0 comments on commit 4bb65eb

Please sign in to comment.