Skip to content

Commit

Permalink
Fixed GTC_packing test on GCC and GLM_ARCH_PURE #577
Browse files Browse the repository at this point in the history
  • Loading branch information
Groovounet committed Nov 20, 2016
1 parent 32cfecb commit c8e7962
Showing 1 changed file with 12 additions and 6 deletions.
18 changes: 12 additions & 6 deletions test/gtc/gtc_packing.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,12 @@ int test_Snorm3x10_1x2()
glm::vec4 v0 = glm::unpackSnorm3x10_1x2(p0);
glm::uint32 p1 = glm::packSnorm3x10_1x2(v0);
glm::vec4 v1 = glm::unpackSnorm3x10_1x2(p1);
Error += glm::all(glm::equal(v0, v1)) ? 0 : 1;

printf("Snorm3x10_1x2: p0: %x; v0: %3.2f, %3.2f, %3.2f, %3.2f; p1: %x; v1: %3.2f, %3.2f, %3.2f, %3.2f\n",
p0, v0.x, v0.y, v0.z, v0.w,
p1, v1.x, v1.y, v1.z, v1.w);

Error += glm::all(glm::epsilonEqual(v0, v1, 0.01f)) ? 0 : 1;
}

return Error;
Expand All @@ -197,7 +202,12 @@ int test_Unorm3x10_1x2()
glm::vec4 v0 = glm::unpackUnorm3x10_1x2(p0);
glm::uint32 p1 = glm::packUnorm3x10_1x2(v0);
glm::vec4 v1 = glm::unpackUnorm3x10_1x2(p1);
Error += glm::all(glm::equal(v0, v1)) ? 0 : 1;

printf("Unorm3x10_1x2: p0: %x; v0: %3.2f, %3.2f, %3.2f, %3.2f; p1: %x; v1: %3.2f, %3.2f, %3.2f, %3.2f\n",
p0, v0.x, v0.y, v0.z, v0.w,
p1, v1.x, v1.y, v1.z, v1.w);

Error += glm::all(glm::epsilonEqual(v0, v1, 0.001f)) ? 0 : 1;
}

return Error;
Expand Down Expand Up @@ -688,12 +698,8 @@ int main()
Error += test_F2x11_1x10();
Error += test_F3x9_E1x5();
Error += test_RGBM();

// It looks like GLM has a but that travis CI shows in this configuration #577
//#if !((GLM_ARCH == GLM_ARCH_PURE) && (GLM_COMPILER & GLM_COMPILER_GCC))
Error += test_Unorm3x10_1x2();
Error += test_Snorm3x10_1x2();
//#endif

Error += test_I3x10_1x2();
Error += test_U3x10_1x2();
Expand Down

0 comments on commit c8e7962

Please # to comment.