mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2025-06-25 20:06:17 +00:00
memory: Fixes for direct memory allocation. (#615)
* memory: Size direct memory based on requested flexible memory. * memory: Guard against OrbisProcParam without an OrbisKernelMemParam. * memory: Account for alignment in direct memory suitability checks and add more debugging.
This commit is contained in:
parent
dcc4762c7e
commit
905d49fd96
5 changed files with 60 additions and 22 deletions
|
@ -130,8 +130,8 @@ public:
|
|||
rasterizer = rasterizer_;
|
||||
}
|
||||
|
||||
void SetTotalFlexibleSize(u64 size) {
|
||||
total_flexible_size = size;
|
||||
u64 GetTotalDirectSize() const {
|
||||
return total_direct_size;
|
||||
}
|
||||
|
||||
u64 GetAvailableFlexibleSize() const {
|
||||
|
@ -142,6 +142,8 @@ public:
|
|||
return impl.SystemReservedVirtualBase();
|
||||
}
|
||||
|
||||
void SetupMemoryRegions(u64 flexible_size);
|
||||
|
||||
PAddr Allocate(PAddr search_start, PAddr search_end, size_t size, u64 alignment,
|
||||
int memory_type);
|
||||
|
||||
|
@ -217,7 +219,8 @@ private:
|
|||
DMemMap dmem_map;
|
||||
VMAMap vma_map;
|
||||
std::recursive_mutex mutex;
|
||||
size_t total_flexible_size = 448_MB;
|
||||
size_t total_direct_size{};
|
||||
size_t total_flexible_size{};
|
||||
size_t flexible_usage{};
|
||||
Vulkan::Rasterizer* rasterizer{};
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue