diff options
author | Fernando Sahmkow <fsahmkow27@gmail.com> | 2024-01-07 04:50:06 +0100 |
---|---|---|
committer | Liam <byteslice@airmail.cc> | 2024-01-19 03:12:30 +0100 |
commit | 067284733075fb0604dbcdc6238d23cfa27c5355 (patch) | |
tree | 3f554af90fd6e120b156f037485641c620829a46 | |
parent | SMMU: Fix 8Gb layout. (diff) | |
download | yuzu-067284733075fb0604dbcdc6238d23cfa27c5355.tar yuzu-067284733075fb0604dbcdc6238d23cfa27c5355.tar.gz yuzu-067284733075fb0604dbcdc6238d23cfa27c5355.tar.bz2 yuzu-067284733075fb0604dbcdc6238d23cfa27c5355.tar.lz yuzu-067284733075fb0604dbcdc6238d23cfa27c5355.tar.xz yuzu-067284733075fb0604dbcdc6238d23cfa27c5355.tar.zst yuzu-067284733075fb0604dbcdc6238d23cfa27c5355.zip |
-rw-r--r-- | src/core/device_memory_manager.h | 4 | ||||
-rw-r--r-- | src/core/device_memory_manager.inc | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/src/core/device_memory_manager.h b/src/core/device_memory_manager.h index f9cb13a7a..cc9fd023f 100644 --- a/src/core/device_memory_manager.h +++ b/src/core/device_memory_manager.h @@ -62,13 +62,13 @@ public: DAddr subbits = static_cast<DAddr>(address & page_mask); const u32 base = compressed_device_addr[(address >> page_bits)]; if ((base >> MULTI_FLAG_BITS) == 0) [[likely]] { - const DAddr d_address = static_cast<DAddr>(base << page_bits) + subbits; + const DAddr d_address = (static_cast<DAddr>(base) << page_bits) + subbits; operation(d_address); return; } InnerGatherDeviceAddresses(buffer, address); for (u32 value : buffer) { - operation(static_cast<DAddr>(value << page_bits) + subbits); + operation((static_cast<DAddr>(value) << page_bits) + subbits); } } diff --git a/src/core/device_memory_manager.inc b/src/core/device_memory_manager.inc index 5241293b6..d7b4abacc 100644 --- a/src/core/device_memory_manager.inc +++ b/src/core/device_memory_manager.inc @@ -301,7 +301,7 @@ template <typename Traits> u8* DeviceMemoryManager<Traits>::GetSpan(const DAddr src_addr, const std::size_t size) { size_t page_index = src_addr >> page_bits; size_t subbits = src_addr & page_mask; - if ((continuity_tracker[page_index] << page_bits) >= size + subbits) { + if ((static_cast<size_t>(continuity_tracker[page_index]) << page_bits) >= size + subbits) { return GetPointer<u8>(src_addr); } return nullptr; @@ -311,7 +311,7 @@ template <typename Traits> const u8* DeviceMemoryManager<Traits>::GetSpan(const DAddr src_addr, const std::size_t size) const { size_t page_index = src_addr >> page_bits; size_t subbits = src_addr & page_mask; - if ((continuity_tracker[page_index] << page_bits) >= size + subbits) { + if ((static_cast<size_t>(continuity_tracker[page_index]) << page_bits) >= size + subbits) { return GetPointer<u8>(src_addr); } return nullptr; |