mirror of
https://github.com/KytyPS5/KytyPS5.git
synced 2026-10-21 03:16:54 +02:00
refactor(graphics)
This commit is contained in:
@@ -7,7 +7,7 @@
|
||||
#include "common/threads.h"
|
||||
#include "common/virtualMemory.h"
|
||||
#include "graphics/guest_gpu/graphicsRun.h"
|
||||
#include "graphics/host_gpu/renderer/cache/gpuResourceManager.h"
|
||||
#include "graphics/host_gpu/renderer/renderContext.h"
|
||||
#include "libs/errno.h"
|
||||
#include "libs/libs.h"
|
||||
|
||||
@@ -69,9 +69,9 @@ constexpr uint64_t DEFAULT_FLEXIBLE_MEMORY_SIZE = 1ull * 1024ull * 1024ull * 102
|
||||
|
||||
static uint64_t g_flexible_memory_size = DEFAULT_FLEXIBLE_MEMORY_SIZE;
|
||||
static bool g_flexible_memory_size_frozen = false;
|
||||
static Graphics::GpuResourceManager* g_gpu_resources = nullptr;
|
||||
static Graphics::RenderContext* g_gpu_resources = nullptr;
|
||||
|
||||
static Graphics::GpuResourceManager& GetGpuResources() {
|
||||
static Graphics::RenderContext& GetGpuResources() {
|
||||
EXIT_IF(g_gpu_resources == nullptr);
|
||||
return *g_gpu_resources;
|
||||
}
|
||||
@@ -910,7 +910,7 @@ void InvalidateMemory(uint64_t vaddr, uint64_t size) {
|
||||
(void)GetGpuResources().InvalidateMemory(vaddr, size);
|
||||
}
|
||||
|
||||
void InstallGpuResources(Graphics::GpuResourceManager* resources) noexcept {
|
||||
void InstallGpuResources(Graphics::RenderContext* resources) noexcept {
|
||||
EXIT_IF(resources != nullptr && g_gpu_resources != nullptr);
|
||||
g_gpu_resources = resources;
|
||||
}
|
||||
|
||||
+2
-2
@@ -6,7 +6,7 @@
|
||||
#include "common/virtualMemory.h"
|
||||
|
||||
namespace Libs::Graphics {
|
||||
class GpuResourceManager;
|
||||
class RenderContext;
|
||||
enum class PageFaultAccess;
|
||||
} // namespace Libs::Graphics
|
||||
|
||||
@@ -114,7 +114,7 @@ bool TryReadPrtBacking(uint64_t vaddr, void* data, uint64_t si
|
||||
[[nodiscard]] uint64_t ClampRangeSize(uint64_t vaddr, uint64_t size);
|
||||
void WriteBacking(uint64_t vaddr, const void* data, uint64_t size) noexcept;
|
||||
void InvalidateMemory(uint64_t vaddr, uint64_t size);
|
||||
void InstallGpuResources(Graphics::GpuResourceManager* resources) noexcept;
|
||||
void InstallGpuResources(Graphics::RenderContext* renderer) noexcept;
|
||||
[[nodiscard]] bool HandleGpuFault(Graphics::PageFaultAccess access, uint64_t fault_vaddr) noexcept;
|
||||
|
||||
int KYTY_SYSV_ABI KernelMapNamedFlexibleMemory(void** addr_in_out, size_t len, int prot, int flags,
|
||||
|
||||
Reference in New Issue
Block a user