[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
+12 -11
View File
@@ -12,6 +12,10 @@
#include "common/common_types.h"
namespace Core {
class System;
}
namespace Tegra::Engines {
enum class EngineTypes : u32 {
@@ -28,28 +32,25 @@ public:
virtual ~EngineInterface() = default;
/// Write the value to the register identified by method.
virtual void CallMethod(u32 method, u32 method_argument, bool is_last_call) = 0;
virtual void CallMethod(Core::System& system, u32 method, u32 method_argument, bool is_last_call) = 0;
/// Write multiple values to the register identified by method.
virtual void CallMultiMethod(u32 method, const u32* base_start, u32 amount,
u32 methods_pending) = 0;
virtual void CallMultiMethod(Core::System& system, u32 method, const u32* base_start, u32 amount, u32 methods_pending) = 0;
void ConsumeSink() {
if (method_sink.empty()) {
return;
void ConsumeSink(Core::System& system) {
if (!method_sink.empty()) {
ConsumeSinkImpl(system);
}
ConsumeSinkImpl();
}
std::bitset<(std::numeric_limits<u16>::max)()> execution_mask{};
std::vector<std::pair<u32, u32>> method_sink{};
bool current_dirty{};
GPUVAddr current_dma_segment;
bool current_dirty{};
protected:
virtual void ConsumeSinkImpl() {
virtual void ConsumeSinkImpl(Core::System& system) {
for (auto [method, value] : method_sink) {
CallMethod(method, value, true);
CallMethod(system, method, value, true);
}
method_sink.clear();
}