mirror of
https://github.com/yuzu-mirror/yuzu
synced 2024-11-24 08:53:02 +00:00
video_core: rasterizer_accelerated: Fix delta check ordering.
This commit is contained in:
parent
6ab839462c
commit
50ee9c46ab
1 changed files with 3 additions and 3 deletions
|
@ -20,10 +20,10 @@ void RasterizerAccelerated::UpdatePagesCachedCount(VAddr addr, u64 size, int del
|
||||||
for (auto page = addr >> Core::Memory::PAGE_BITS; page != page_end; ++page) {
|
for (auto page = addr >> Core::Memory::PAGE_BITS; page != page_end; ++page) {
|
||||||
auto& count = cached_pages.at(page >> 3).Count(page);
|
auto& count = cached_pages.at(page >> 3).Count(page);
|
||||||
|
|
||||||
if (delta < 0) {
|
if (delta > 0) {
|
||||||
ASSERT_MSG(count > 0, "Count may underflow!");
|
|
||||||
} else if (delta > 0) {
|
|
||||||
ASSERT_MSG(count < UINT8_MAX, "Count may overflow!");
|
ASSERT_MSG(count < UINT8_MAX, "Count may overflow!");
|
||||||
|
} else if (delta < 0) {
|
||||||
|
ASSERT_MSG(count > 0, "Count may underflow!");
|
||||||
} else {
|
} else {
|
||||||
ASSERT_MSG(true, "Delta must be non-zero!");
|
ASSERT_MSG(true, "Delta must be non-zero!");
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue