|
@@ -650,6 +650,26 @@ int test_packUnorm1x5_1x6_1x5()
|
|
|
return Error;
|
|
return Error;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+int test_packUnorm2x3_1x2()
|
|
|
|
|
+{
|
|
|
|
|
+ int Error = 0;
|
|
|
|
|
+
|
|
|
|
|
+ std::vector<glm::vec3> A;
|
|
|
|
|
+ A.push_back(glm::vec3(1.0f, 0.7f, 0.5f));
|
|
|
|
|
+ A.push_back(glm::vec3(0.5f, 0.1f, 0.0f));
|
|
|
|
|
+
|
|
|
|
|
+ for(std::size_t i = 0; i < A.size(); ++i)
|
|
|
|
|
+ {
|
|
|
|
|
+ glm::vec3 B(A[i]);
|
|
|
|
|
+ glm::uint8 C = glm::packUnorm2x3_1x2(B);
|
|
|
|
|
+ glm::vec3 D = glm::unpackUnorm2x3_1x2(C);
|
|
|
|
|
+ Error += glm::all(glm::epsilonEqual(B, D, 1.0f / 3.f)) ? 0 : 1;
|
|
|
|
|
+ assert(!Error);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ return Error;
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
int main()
|
|
int main()
|
|
|
{
|
|
{
|
|
|
int Error = 0;
|
|
int Error = 0;
|
|
@@ -677,6 +697,7 @@ int main()
|
|
|
Error += test_packUnorm4x4();
|
|
Error += test_packUnorm4x4();
|
|
|
Error += test_packUnorm3x5_1x1();
|
|
Error += test_packUnorm3x5_1x1();
|
|
|
Error += test_packUnorm1x5_1x6_1x5();
|
|
Error += test_packUnorm1x5_1x6_1x5();
|
|
|
|
|
+ Error += test_packUnorm2x3_1x2();
|
|
|
|
|
|
|
|
Error += test_F2x11_1x10();
|
|
Error += test_F2x11_1x10();
|
|
|
Error += test_F3x9_E1x5();
|
|
Error += test_F3x9_E1x5();
|