| | |
| | |
| | |
| |
|
| | #pragma once |
| |
|
| | #include <functional> |
| | #include <memory> |
| | #include <boost/serialization/access.hpp> |
| |
|
| | #include "core/hle/service/gsp/gsp_interrupt.h" |
| |
|
| | namespace Service::GSP { |
| | struct Command; |
| | struct FrameBufferInfo; |
| | } |
| |
|
| | namespace Core { |
| | class System; |
| | } |
| |
|
| | namespace Pica { |
| | class DebugContext; |
| | class PicaCore; |
| | struct RegsLcd; |
| | union ColorFill; |
| | } |
| |
|
| | namespace Frontend { |
| | class EmuWindow; |
| | } |
| |
|
| | namespace VideoCore { |
| |
|
| | |
| | constexpr u64 FRAME_TICKS = 4481136ull; |
| |
|
| | class GraphicsDebugger; |
| | class RendererBase; |
| |
|
| | |
| | |
| | |
| | class GPU { |
| | public: |
| | explicit GPU(Core::System& system, Frontend::EmuWindow& emu_window, |
| | Frontend::EmuWindow* secondary_window); |
| | ~GPU(); |
| |
|
| | |
| | void SetInterruptHandler(Service::GSP::InterruptHandler handler); |
| |
|
| | |
| | void FlushRegion(PAddr addr, u32 size); |
| |
|
| | |
| | void InvalidateRegion(PAddr addr, u32 size); |
| |
|
| | |
| | void ClearAll(bool flush); |
| |
|
| | |
| | void Execute(const Service::GSP::Command& command); |
| |
|
| | |
| | void SetBufferSwap(u32 screen_id, const Service::GSP::FrameBufferInfo& info); |
| |
|
| | |
| | void SetColorFill(const Pica::ColorFill& fill); |
| |
|
| | |
| | u32 ReadReg(VAddr addr); |
| |
|
| | |
| | void WriteReg(VAddr addr, u32 data); |
| |
|
| | |
| | void Sync(); |
| |
|
| | |
| | [[nodiscard]] VideoCore::RendererBase& Renderer(); |
| |
|
| | |
| | [[nodiscard]] Pica::PicaCore& PicaCore(); |
| |
|
| | |
| | [[nodiscard]] const Pica::PicaCore& PicaCore() const; |
| |
|
| | |
| | [[nodiscard]] Pica::DebugContext& DebugContext(); |
| |
|
| | |
| | [[nodiscard]] GraphicsDebugger& Debugger(); |
| |
|
| | private: |
| | void SubmitCmdList(u32 index); |
| |
|
| | void MemoryFill(u32 index); |
| |
|
| | void MemoryTransfer(); |
| |
|
| | void VBlankCallback(uintptr_t user_data, s64 cycles_late); |
| |
|
| | friend class boost::serialization::access; |
| | template <class Archive> |
| | void serialize(Archive& ar, const u32 file_version); |
| |
|
| | private: |
| | struct Impl; |
| | std::unique_ptr<Impl> impl; |
| |
|
| | PAddr VirtualToPhysicalAddress(VAddr addr); |
| | }; |
| |
|
| | } |
| |
|