2
1
Fork 0
mirror of https://github.com/yuzu-emu/yuzu.git synced 2024-07-04 23:31:19 +01:00

Merge pull request #8074 from liamwhite/cached-words

buffer_cache: reset cached write bits after flushing invalidations
This commit is contained in:
Fernando S 2022-03-24 17:13:46 +01:00 committed by GitHub
commit 8f2e5f5666
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -212,7 +212,7 @@ public:
void FlushCachedWrites() noexcept { void FlushCachedWrites() noexcept {
flags &= ~BufferFlagBits::CachedWrites; flags &= ~BufferFlagBits::CachedWrites;
const u64 num_words = NumWords(); const u64 num_words = NumWords();
const u64* const cached_words = Array<Type::CachedCPU>(); u64* const cached_words = Array<Type::CachedCPU>();
u64* const untracked_words = Array<Type::Untracked>(); u64* const untracked_words = Array<Type::Untracked>();
u64* const cpu_words = Array<Type::CPU>(); u64* const cpu_words = Array<Type::CPU>();
for (u64 word_index = 0; word_index < num_words; ++word_index) { for (u64 word_index = 0; word_index < num_words; ++word_index) {
@ -220,6 +220,7 @@ public:
NotifyRasterizer<false>(word_index, untracked_words[word_index], cached_bits); NotifyRasterizer<false>(word_index, untracked_words[word_index], cached_bits);
untracked_words[word_index] |= cached_bits; untracked_words[word_index] |= cached_bits;
cpu_words[word_index] |= cached_bits; cpu_words[word_index] |= cached_bits;
cached_words[word_index] = 0;
} }
} }