diff options
| author | 2022-07-28 00:47:06 +0100 | |
|---|---|---|
| committer | 2022-07-27 19:47:06 -0400 | |
| commit | 2e461103790110a3deea6425709b1f7f937085ea (patch) | |
| tree | 495ea29aedfefc3564a87c8c4b44ed199d1aad3a /src/tests | |
| parent | implement pause on system suspend (#8585) (diff) | |
| download | yuzu-2e461103790110a3deea6425709b1f7f937085ea.tar.gz yuzu-2e461103790110a3deea6425709b1f7f937085ea.tar.xz yuzu-2e461103790110a3deea6425709b1f7f937085ea.zip | |
Revert Coretiming PRs 8531 and 7454 (#8591)
Diffstat (limited to 'src/tests')
| -rw-r--r-- | src/tests/core/core_timing.cpp | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/src/tests/core/core_timing.cpp b/src/tests/core/core_timing.cpp index 894975e6f..7c432a63c 100644 --- a/src/tests/core/core_timing.cpp +++ b/src/tests/core/core_timing.cpp | |||
| @@ -8,7 +8,6 @@ | |||
| 8 | #include <chrono> | 8 | #include <chrono> |
| 9 | #include <cstdlib> | 9 | #include <cstdlib> |
| 10 | #include <memory> | 10 | #include <memory> |
| 11 | #include <mutex> | ||
| 12 | #include <optional> | 11 | #include <optional> |
| 13 | #include <string> | 12 | #include <string> |
| 14 | 13 | ||
| @@ -23,15 +22,14 @@ std::array<s64, 5> delays{}; | |||
| 23 | 22 | ||
| 24 | std::bitset<CB_IDS.size()> callbacks_ran_flags; | 23 | std::bitset<CB_IDS.size()> callbacks_ran_flags; |
| 25 | u64 expected_callback = 0; | 24 | u64 expected_callback = 0; |
| 26 | std::mutex control_mutex; | ||
| 27 | 25 | ||
| 28 | template <unsigned int IDX> | 26 | template <unsigned int IDX> |
| 29 | std::optional<std::chrono::nanoseconds> HostCallbackTemplate(std::uintptr_t user_data, s64 time, | 27 | std::optional<std::chrono::nanoseconds> HostCallbackTemplate(std::uintptr_t user_data, s64 time, |
| 30 | std::chrono::nanoseconds ns_late) { | 28 | std::chrono::nanoseconds ns_late) { |
| 31 | std::unique_lock<std::mutex> lk(control_mutex); | ||
| 32 | static_assert(IDX < CB_IDS.size(), "IDX out of range"); | 29 | static_assert(IDX < CB_IDS.size(), "IDX out of range"); |
| 33 | callbacks_ran_flags.set(IDX); | 30 | callbacks_ran_flags.set(IDX); |
| 34 | REQUIRE(CB_IDS[IDX] == user_data); | 31 | REQUIRE(CB_IDS[IDX] == user_data); |
| 32 | REQUIRE(CB_IDS[IDX] == CB_IDS[calls_order[expected_callback]]); | ||
| 35 | delays[IDX] = ns_late.count(); | 33 | delays[IDX] = ns_late.count(); |
| 36 | ++expected_callback; | 34 | ++expected_callback; |
| 37 | return std::nullopt; | 35 | return std::nullopt; |