mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2025-05-20 10:24:58 +00:00
core: Rework memory manager
This commit is contained in:
parent
623b1d6837
commit
fc887bf3f5
10 changed files with 339 additions and 179 deletions
|
@ -10,7 +10,6 @@
|
|||
#include "core/libraries/gnmdriver/gnmdriver.h"
|
||||
#include "core/libraries/libs.h"
|
||||
#include "core/libraries/videoout/video_out.h"
|
||||
#include "core/memory.h"
|
||||
#include "core/platform.h"
|
||||
#include "video_core/amdgpu/liverpool.h"
|
||||
#include "video_core/amdgpu/pm4_cmds.h"
|
||||
|
@ -40,10 +39,7 @@ struct AscQueueInfo {
|
|||
u32 ring_size_dw;
|
||||
};
|
||||
static VideoCore::SlotVector<AscQueueInfo> asc_queues{};
|
||||
|
||||
static constexpr u32 TessellationFactorRingSize = 128_KB;
|
||||
static constexpr u32 TessellationFactorRingAlignment = 64_KB; // toolkit is using this alignment
|
||||
VAddr tessellation_factors_ring_addr{0};
|
||||
static constexpr VAddr tessellation_factors_ring_addr = 0xFF0000000ULL;
|
||||
|
||||
static void DumpCommandList(std::span<const u32> cmd_list, const std::string& postfix) {
|
||||
using namespace Common::FS;
|
||||
|
@ -624,11 +620,6 @@ int PS4_SYSV_ABI sceGnmGetShaderStatus() {
|
|||
VAddr PS4_SYSV_ABI sceGnmGetTheTessellationFactorRingBufferBaseAddress() {
|
||||
LOG_TRACE(Lib_GnmDriver, "called");
|
||||
// Actual virtual buffer address is hardcoded in the driver to 0xff00'000
|
||||
if (tessellation_factors_ring_addr == 0) {
|
||||
auto* memory = Core::Memory::Instance();
|
||||
tessellation_factors_ring_addr =
|
||||
memory->Reserve(TessellationFactorRingSize, TessellationFactorRingAlignment);
|
||||
}
|
||||
return tessellation_factors_ring_addr;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue