[video_core, hle] remove redundant parent references in system structs (#3908)

reworked a bit to remove references of parent objects and instead pass as arguments to methods to prevent useless reloads

Signed-off-by: lizzie <lizzie@eden-emu.dev>
Co-authored-by: maufeat <sahyno1996@gmail.com>
Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/3908
Reviewed-by: Maufeat <sahyno1996@gmail.com>
Reviewed-by: crueter <crueter@eden-emu.dev>
This commit is contained in:
lizzie
2026-06-23 06:31:25 +02:00
committed by crueter
parent f8facda35f
commit 3aa0d46259
307 changed files with 4419 additions and 4477 deletions
+22 -16
View File
@@ -14,6 +14,7 @@
#include "video_core/engines/kepler_compute.h"
#include "video_core/engines/maxwell_3d.h"
#include "video_core/engines/maxwell_dma.h"
#include "video_core/engines/nv01_timer.h"
#include "video_core/dma_pusher.h"
namespace Core {
@@ -34,28 +35,33 @@ namespace Control {
struct ChannelState {
explicit ChannelState(s32 bind_id);
void Init(Core::System& system, GPU& gpu, u64 program_id);
void Init(Core::System& system, u64 program_id);
void BindRasterizer(VideoCore::RasterizerInterface* rasterizer);
/// 3D engine
std::optional<Engines::Maxwell3D> maxwell_3d;
/// 2D engine
std::optional<Engines::Fermi2D> fermi_2d;
/// Compute engine
std::optional<Engines::KeplerCompute> kepler_compute;
/// DMA engine
std::optional<Engines::MaxwellDMA> maxwell_dma;
/// Inline memory engine
std::optional<Engines::KeplerMemory> kepler_memory;
/// NV01 Timer
std::optional<Engines::KeplerMemory> nv01_timer;
std::optional<DmaPusher> dma_pusher;
std::shared_ptr<MemoryManager> memory_manager;
struct Payload {
explicit Payload(Core::System& system, MemoryManager& memory_manager, ChannelState& channel_state);
/// 3D engine
Engines::Maxwell3D maxwell_3d;
/// 2D engine
Engines::Fermi2D fermi_2d;
/// Compute engine
Engines::KeplerCompute kepler_compute;
/// DMA engine
Engines::MaxwellDMA maxwell_dma;
/// Inline memory engine
Engines::KeplerMemory kepler_memory;
/// NV01 Timer
Engines::Nv01Timer nv01_timer;
DmaPusher dma_pusher;
};
std::optional<Payload> payload;
MemoryManager* memory_manager = nullptr;
s32 bind_id = -1;
u64 program_id = 0;
bool initialized{};
bool initialized = false;
};
} // namespace Control