VideoCommon/CommandProcessor: Refactor to class, move to Core::System.

This commit is contained in:
Admiral H. Curtiss committed 2022-11-29 08:15:01 +01:00
1 parent 44f8b8c100
commit 6941d2e7e6
11 files changed
+271 -198

No files matched your search

+3 -1
View File
@@ -13,6 +13,7 @@
#include "Core/HW/ProcessorInterface.h"
#include "Core/PowerPC/JitInterface.h"
#include "Core/PowerPC/PowerPC.h"
#include "Core/System.h"
#include "VideoCommon/CommandProcessor.h"
namespace GPFifo
@@ -103,7 +104,8 @@ void UpdateGatherPipe()
ProcessorInterface::Fifo_CPUWritePointer += GATHER_PIPE_SIZE;
}
CommandProcessor::GatherPipeBursted();
auto& system = Core::System::GetInstance();
system.GetCommandProcessor().GatherPipeBursted(system);
}
// move back the spill bytes
+2 -1
View File
@@ -130,7 +130,8 @@ static void InitMMIO(bool is_wii)
{
mmio_mapping = std::make_unique<MMIO::Mapping>();
CommandProcessor::RegisterMMIO(mmio_mapping.get(), 0x0C000000);
auto& system = Core::System::GetInstance();
system.GetCommandProcessor().RegisterMMIO(system, mmio_mapping.get(), 0x0C000000);
PixelEngine::RegisterMMIO(mmio_mapping.get(), 0x0C001000);
VideoInterface::RegisterMMIO(mmio_mapping.get(), 0x0C002000);
ProcessorInterface::RegisterMMIO(mmio_mapping.get(), 0x0C003000);
+7
View File
@@ -17,6 +17,7 @@
#include "Core/HW/SI/SI.h"
#include "Core/HW/Sram.h"
#include "Core/HW/VideoInterface.h"
#include "VideoCommon/CommandProcessor.h"
namespace Core
{
@@ -28,6 +29,7 @@ struct System::Impl
AudioInterface::AudioInterfaceState m_audio_interface_state;
CoreTiming::CoreTimingManager m_core_timing;
CommandProcessor::CommandProcessorManager m_command_processor;
DSP::DSPState m_dsp_state;
DVDInterface::DVDInterfaceState m_dvd_interface_state;
DVDThread::DVDThreadState m_dvd_thread_state;
@@ -91,6 +93,11 @@ CoreTiming::CoreTimingManager& System::GetCoreTiming() const
return m_impl->m_core_timing;
}
CommandProcessor::CommandProcessorManager& System::GetCommandProcessor() const
{
return m_impl->m_command_processor;
}
DSP::DSPState& System::GetDSPState() const
{
return m_impl->m_dsp_state;
+5
View File
@@ -12,6 +12,10 @@ namespace AudioInterface
{
class AudioInterfaceState;
};
namespace CommandProcessor
{
class CommandProcessorManager;
}
namespace CoreTiming
{
class CoreTimingManager;
@@ -81,6 +85,7 @@ public:
AudioInterface::AudioInterfaceState& GetAudioInterfaceState() const;
CoreTiming::CoreTimingManager& GetCoreTiming() const;
CommandProcessor::CommandProcessorManager& GetCommandProcessor() const;
DSP::DSPState& GetDSPState() const;
DVDInterface::DVDInterfaceState& GetDVDInterfaceState() const;
DVDThread::DVDThreadState& GetDVDThreadState() const;