diff options
author | Fernando Sahmkow <fsahmkow27@gmail.com> | 2023-01-05 12:43:54 +0100 |
---|---|---|
committer | Fernando Sahmkow <fsahmkow27@gmail.com> | 2023-01-05 20:00:10 +0100 |
commit | b56ad93bbc9ac38820c1e1cb4b03256dd50aa17a (patch) | |
tree | 329e2e9e818cf88753b86d01b3351ba1f2d6eb2e /src/video_core/invalidation_accumulator.h | |
parent | Fermi2D: sync cache flushes (diff) | |
download | yuzu-b56ad93bbc9ac38820c1e1cb4b03256dd50aa17a.tar yuzu-b56ad93bbc9ac38820c1e1cb4b03256dd50aa17a.tar.gz yuzu-b56ad93bbc9ac38820c1e1cb4b03256dd50aa17a.tar.bz2 yuzu-b56ad93bbc9ac38820c1e1cb4b03256dd50aa17a.tar.lz yuzu-b56ad93bbc9ac38820c1e1cb4b03256dd50aa17a.tar.xz yuzu-b56ad93bbc9ac38820c1e1cb4b03256dd50aa17a.tar.zst yuzu-b56ad93bbc9ac38820c1e1cb4b03256dd50aa17a.zip |
Diffstat (limited to 'src/video_core/invalidation_accumulator.h')
-rw-r--r-- | src/video_core/invalidation_accumulator.h | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/src/video_core/invalidation_accumulator.h b/src/video_core/invalidation_accumulator.h index 42420e31c..2c2aaf7bb 100644 --- a/src/video_core/invalidation_accumulator.h +++ b/src/video_core/invalidation_accumulator.h @@ -3,6 +3,7 @@ #pragma once +#include <utility> #include <vector> #include "common/common_types.h" @@ -26,8 +27,8 @@ public: if (address >= start_address && address + size <= last_collection) [[likely]] { return; } - size = (address + size + atomicy_side_mask) & atomicy_mask - address; - address = address & atomicy_mask; + size = ((address + size + atomicity_size_mask) & atomicity_mask) - address; + address = address & atomicity_mask; if (!has_collected) [[unlikely]] { reset_values(); has_collected = true; @@ -64,10 +65,10 @@ public: } private: - static constexpr size_t atomicy_bits = 5; - static constexpr size_t atomicy_size = 1ULL << atomicy_bits; - static constexpr size_t atomicy_side_mask = atomicy_size - 1; - static constexpr size_t atomicy_mask = ~atomicy_side_mask; + static constexpr size_t atomicity_bits = 5; + static constexpr size_t atomicity_size = 1ULL << atomicity_bits; + static constexpr size_t atomicity_size_mask = atomicity_size - 1; + static constexpr size_t atomicity_mask = ~atomicity_size_mask; GPUVAddr start_address{}; GPUVAddr last_collection{}; size_t accumulated_size{}; |