mirror of
https://github.com/yuzu-emu/yuzu.git
synced 2024-12-25 17:50:06 +00:00
video_core/memory_manager: Mark IsBlockContinuous() as a const member function
Corrects the typo in its name and marks the function as a const member function, given it doesn't actually modify memory manager state.
This commit is contained in:
parent
d4bcd006b2
commit
716fbaef74
@ -201,11 +201,11 @@ const u8* MemoryManager::GetPointer(GPUVAddr addr) const {
|
|||||||
return {};
|
return {};
|
||||||
}
|
}
|
||||||
|
|
||||||
bool MemoryManager::IsBlockContinous(const GPUVAddr start, const std::size_t size) {
|
bool MemoryManager::IsBlockContinuous(const GPUVAddr start, const std::size_t size) const {
|
||||||
const GPUVAddr end = start + size;
|
const GPUVAddr end = start + size;
|
||||||
const auto host_ptr_start = reinterpret_cast<std::uintptr_t>(GetPointer(start));
|
const auto host_ptr_start = reinterpret_cast<std::uintptr_t>(GetPointer(start));
|
||||||
const auto host_ptr_end = reinterpret_cast<std::uintptr_t>(GetPointer(end));
|
const auto host_ptr_end = reinterpret_cast<std::uintptr_t>(GetPointer(end));
|
||||||
const std::size_t range = static_cast<std::size_t>(host_ptr_end - host_ptr_start);
|
const auto range = static_cast<std::size_t>(host_ptr_end - host_ptr_start);
|
||||||
return range == size;
|
return range == size;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -66,8 +66,8 @@ public:
|
|||||||
u8* GetPointer(GPUVAddr addr);
|
u8* GetPointer(GPUVAddr addr);
|
||||||
const u8* GetPointer(GPUVAddr addr) const;
|
const u8* GetPointer(GPUVAddr addr) const;
|
||||||
|
|
||||||
// Returns true if the block is continuous in host memory, false otherwise
|
/// Returns true if the block is continuous in host memory, false otherwise
|
||||||
bool IsBlockContinous(GPUVAddr start, std::size_t size);
|
bool IsBlockContinuous(GPUVAddr start, std::size_t size) const;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* ReadBlock and WriteBlock are full read and write operations over virtual
|
* ReadBlock and WriteBlock are full read and write operations over virtual
|
||||||
|
Loading…
Reference in New Issue
Block a user