Browse Source

Fixed GTC_packing test on GCC and GLM_ARCH_PURE #577

Christophe Riccio 9 years ago
parent
commit
c8e7962fa2
1 changed files with 12 additions and 6 deletions
  1. 12 6
      test/gtc/gtc_packing.cpp

+ 12 - 6
test/gtc/gtc_packing.cpp

@@ -173,7 +173,12 @@ int test_Snorm3x10_1x2()
 		glm::vec4 v0 = glm::unpackSnorm3x10_1x2(p0);
 		glm::vec4 v0 = glm::unpackSnorm3x10_1x2(p0);
 		glm::uint32 p1 = glm::packSnorm3x10_1x2(v0);
 		glm::uint32 p1 = glm::packSnorm3x10_1x2(v0);
 		glm::vec4 v1 = glm::unpackSnorm3x10_1x2(p1);
 		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;
 	return Error;
@@ -197,7 +202,12 @@ int test_Unorm3x10_1x2()
 		glm::vec4 v0 = glm::unpackUnorm3x10_1x2(p0);
 		glm::vec4 v0 = glm::unpackUnorm3x10_1x2(p0);
 		glm::uint32 p1 = glm::packUnorm3x10_1x2(v0);
 		glm::uint32 p1 = glm::packUnorm3x10_1x2(v0);
 		glm::vec4 v1 = glm::unpackUnorm3x10_1x2(p1);
 		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;
 	return Error;
@@ -688,12 +698,8 @@ int main()
 	Error += test_F2x11_1x10();
 	Error += test_F2x11_1x10();
 	Error += test_F3x9_E1x5();
 	Error += test_F3x9_E1x5();
 	Error += test_RGBM();
 	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_Unorm3x10_1x2();
 	Error += test_Snorm3x10_1x2();
 	Error += test_Snorm3x10_1x2();
-//#endif
 
 
 	Error += test_I3x10_1x2();
 	Error += test_I3x10_1x2();
 	Error += test_U3x10_1x2();
 	Error += test_U3x10_1x2();