mirror of
https://github.com/wheremyfoodat/Panda3DS.git
synced 2025-06-05 18:41:39 +12:00
[GPU] Start implementing commands
This commit is contained in:
parent
fef585ebb3
commit
8692e7fc6b
11 changed files with 132 additions and 21 deletions
|
@ -1,8 +1,9 @@
|
|||
#pragma once
|
||||
#include <cstring>
|
||||
#include "gpu.hpp"
|
||||
#include "helpers.hpp"
|
||||
#include "kernel_types.hpp"
|
||||
#include "memory.hpp"
|
||||
#include <cstring>
|
||||
|
||||
enum class GPUInterrupt : u8 {
|
||||
PSC0 = 0, // Memory fill completed
|
||||
|
@ -17,6 +18,7 @@ enum class GPUInterrupt : u8 {
|
|||
class GPUService {
|
||||
Handle handle = KernelHandles::GPU;
|
||||
Memory& mem;
|
||||
GPU& gpu;
|
||||
u32& currentPID; // Process ID of the current process
|
||||
u8* sharedMem; // Pointer to GSP shared memory
|
||||
|
||||
|
@ -24,16 +26,22 @@ class GPUService {
|
|||
// This is the PID of that process
|
||||
u32 privilegedProcess;
|
||||
|
||||
void processCommands();
|
||||
|
||||
// Service commands
|
||||
void acquireRight(u32 messagePointer);
|
||||
void flushDataCache(u32 messagePointer);
|
||||
void registerInterruptRelayQueue(u32 messagePointer);
|
||||
void setLCDForceBlack(u32 messagePointer);
|
||||
void triggerCmdReqQueue(u32 messagePointer);
|
||||
void writeHwRegs(u32 messagePointer);
|
||||
void writeHwRegsWithMask(u32 messagePointer);
|
||||
|
||||
// GPU commands processed via TriggerCmdReqQueue
|
||||
void memoryFill(u32* cmd);
|
||||
|
||||
public:
|
||||
GPUService(Memory& mem, u32& currentPID) : mem(mem), currentPID(currentPID) {}
|
||||
GPUService(Memory& mem, GPU& gpu, u32& currentPID) : mem(mem), gpu(gpu), currentPID(currentPID) {}
|
||||
void reset();
|
||||
void handleSyncRequest(u32 messagePointer);
|
||||
void requestInterrupt(GPUInterrupt type);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue