mirror of
https://git.eden-emu.dev/eden-emu/eden.git
synced 2025-07-20 12:55:45 +00:00
Buffer Cache: Use vAddr instead of physical memory.
This commit is contained in:
parent
5b66d2bf74
commit
3728c7160f
12 changed files with 254 additions and 106 deletions
|
@ -97,6 +97,11 @@ public:
|
|||
void WriteBlockUnsafe(GPUVAddr dest_addr, const void* src_buffer, std::size_t size);
|
||||
void CopyBlockUnsafe(GPUVAddr dest_addr, GPUVAddr src_addr, std::size_t size);
|
||||
|
||||
static bool IsGranularRange(GPUVAddr gpu_addr, std::size_t size) {
|
||||
const std::size_t page = (gpu_addr & page_mask) + size;
|
||||
return page <= page_size;
|
||||
}
|
||||
|
||||
private:
|
||||
using VMAMap = std::map<GPUVAddr, VirtualMemoryArea>;
|
||||
using VMAHandle = VMAMap::const_iterator;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue