From 8d6442f7fa5c57a4c5f828ba68c6a6699c372940 Mon Sep 17 00:00:00 2001 From: Christophe Date: Tue, 5 Mar 2024 18:32:02 +0100 Subject: [PATCH] More trying to identify cause of GTC_bitfield time out... --- test/gtc/gtc_bitfield.cpp | 42 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) diff --git a/test/gtc/gtc_bitfield.cpp b/test/gtc/gtc_bitfield.cpp index 27725b2d91..d571356dd2 100644 --- a/test/gtc/gtc_bitfield.cpp +++ b/test/gtc/gtc_bitfield.cpp @@ -227,6 +227,8 @@ namespace bitfieldInterleave3 { int Error(0); + std::clock_t const LastTime = std::clock(); + glm::uint16 const test_max = 5; // previously 11 glm::uint16 x_max = 1 << test_max; @@ -242,6 +244,10 @@ namespace bitfieldInterleave3 Error += ResultA == ResultB ? 0 : 1; } + std::clock_t const Time = std::clock() - LastTime; + + std::printf("glm::bitfieldInterleave3 Test %d clocks\n", static_cast(Time)); + return Error; } } @@ -267,6 +273,8 @@ namespace bitfieldInterleave4 { int Error(0); + std::clock_t const LastTime = std::clock(); + glm::uint16 const test_max = 5; // previously 11 glm::uint16 x_max = 1 << test_max; @@ -284,6 +292,10 @@ namespace bitfieldInterleave4 Error += ResultA == ResultB ? 0 : 1; } + std::clock_t const Time = std::clock() - LastTime; + + std::printf("glm::bitfieldInterleave4 Test %d clocks\n", static_cast(Time)); + return Error; } } @@ -500,6 +512,8 @@ namespace bitfieldInterleave { int Error = 0; + std::clock_t const LastTime = std::clock(); + glm::uint8 const test_loop = 15; // 127 ideally /* @@ -560,6 +574,10 @@ namespace bitfieldInterleave } } + std::clock_t const Time = std::clock() - LastTime; + + std::printf("glm::bitfieldInterleave Test %d clocks\n", static_cast(Time)); + return Error; } @@ -764,6 +782,8 @@ namespace bitfieldInterleave5 { int Error = 0; + std::clock_t const LastTime = std::clock(); + glm::size_t count = 256 / divider; for(glm::size_t j = 0; j < count; ++j) @@ -803,6 +823,10 @@ namespace bitfieldInterleave5 Error += A == B ? 0 : 1; } */ + std::clock_t const Time = std::clock() - LastTime; + + std::printf("glm::bitfieldInterleave4 Test %d clocks\n", static_cast(Time)); + return Error; } @@ -967,17 +991,29 @@ namespace bitfieldInterleave5 static int test_bitfieldRotateRight() { + std::clock_t const LastTime = std::clock(); + glm::ivec4 const A = glm::bitfieldRotateRight(glm::ivec4(2), 1); glm::ivec4 const B = glm::ivec4(2) >> 1; + std::clock_t const Time = std::clock() - LastTime; + + std::printf("glm::bitfieldRotateRight Test %d clocks\n", static_cast(Time)); + return A == B; } static int test_bitfieldRotateLeft() { + std::clock_t const LastTime = std::clock(); + glm::ivec4 const A = glm::bitfieldRotateLeft(glm::ivec4(2), 1); glm::ivec4 const B = glm::ivec4(2) << 1; + std::clock_t const Time = std::clock() - LastTime; + + std::printf("glm::bitfieldRotateLeft Test %d clocks\n", static_cast(Time)); + return A == B; } @@ -985,6 +1021,8 @@ int main() { int Error = 0; + std::clock_t const LastTime = std::clock(); + Error += ::bitfieldInterleave::test(); Error += ::bitfieldInterleave3::test(); Error += ::bitfieldInterleave4::test(); @@ -1001,5 +1039,9 @@ int main() Error += test_bitfieldRotateRight(); Error += test_bitfieldRotateLeft(); + std::clock_t const Time = std::clock() - LastTime; + + std::printf("gtc_bitfield %d clocks\n", static_cast(Time)); + return Error; }