mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2025-08-04 16:32:39 +00:00
memory: Consider flexible mappings as gpu accessible
Multiple guest apps do this with perfectly valid sharps in simple shaders. This needs some hw testing to see how it is handled but for now doesnt hurt to handle it
This commit is contained in:
parent
90c01f8d92
commit
2a3cf25cce
@ -314,11 +314,11 @@ int MemoryManager::MapMemory(void** out_addr, VAddr virtual_addr, size_t size, M
|
||||
|
||||
if (type == VMAType::Direct) {
|
||||
new_vma.phys_base = phys_addr;
|
||||
rasterizer->MapMemory(mapped_addr, size);
|
||||
}
|
||||
if (type == VMAType::Flexible) {
|
||||
flexible_usage += size;
|
||||
}
|
||||
rasterizer->MapMemory(mapped_addr, size);
|
||||
|
||||
return ORBIS_OK;
|
||||
}
|
||||
@ -406,12 +406,10 @@ u64 MemoryManager::UnmapBytesFromEntry(VAddr virtual_addr, VirtualMemoryArea vma
|
||||
if (type == VMAType::Free) {
|
||||
return adjusted_size;
|
||||
}
|
||||
if (type == VMAType::Direct || type == VMAType::Pooled) {
|
||||
rasterizer->UnmapMemory(virtual_addr, adjusted_size);
|
||||
}
|
||||
if (type == VMAType::Flexible) {
|
||||
flexible_usage -= adjusted_size;
|
||||
}
|
||||
rasterizer->UnmapMemory(virtual_addr, adjusted_size);
|
||||
|
||||
// Mark region as free and attempt to coalesce it with neighbours.
|
||||
const auto new_it = CarveVMA(virtual_addr, adjusted_size);
|
||||
|
Loading…
Reference in New Issue
Block a user