refactor(graphics)

This commit is contained in:
nmzik
2026-09-12 13:38:47 +04:00
parent f2455c875e
commit 25a44371e3
53 changed files with 708 additions and 1315 deletions
+4 -4
View File
@@ -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;
}