mirror of
https://github.com/citra-emu/citra.git
synced 2024-11-23 14:30:09 +00:00
Replaced more nullptr's with empty functions in gsp.cpp
This commit is contained in:
parent
d5c89d2030
commit
579298862e
@ -86,6 +86,18 @@ void WriteHWRegs(Service::Interface* self) {
|
|||||||
WriteHWRegs(reg_addr, size, src);
|
WriteHWRegs(reg_addr, size, src);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void WriteHWRegsWithMask(Service::Interface* self) {
|
||||||
|
u32* cmd_buff = Service::GetCommandBuffer();
|
||||||
|
ERROR_LOG(GSP, "Unimplemented function");
|
||||||
|
cmd_buff[1] = 0; // No error
|
||||||
|
}
|
||||||
|
|
||||||
|
void WriteHWRegRepeat(Service::Interface* self) {
|
||||||
|
u32* cmd_buff = Service::GetCommandBuffer();
|
||||||
|
ERROR_LOG(GSP, "Unimplemented function");
|
||||||
|
cmd_buff[1] = 0; // No error
|
||||||
|
}
|
||||||
|
|
||||||
/// Read a GSP GPU hardware register
|
/// Read a GSP GPU hardware register
|
||||||
void ReadHWRegs(Service::Interface* self) {
|
void ReadHWRegs(Service::Interface* self) {
|
||||||
u32* cmd_buff = Service::GetCommandBuffer();
|
u32* cmd_buff = Service::GetCommandBuffer();
|
||||||
@ -115,6 +127,12 @@ void ReadHWRegs(Service::Interface* self) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void GetAppletInfo(Service::Interface* self) {
|
||||||
|
u32* cmd_buff = Service::GetCommandBuffer();
|
||||||
|
ERROR_LOG(KERNEL, "Unimplemented function");
|
||||||
|
cmd_buff[1] = 0; // No error
|
||||||
|
}
|
||||||
|
|
||||||
void SetBufferSwap(u32 screen_id, const FrameBufferInfo& info) {
|
void SetBufferSwap(u32 screen_id, const FrameBufferInfo& info) {
|
||||||
u32 base_address = 0x400000;
|
u32 base_address = 0x400000;
|
||||||
if (info.active_fb == 0) {
|
if (info.active_fb == 0) {
|
||||||
@ -149,6 +167,78 @@ void SetBufferSwap(Service::Interface* self) {
|
|||||||
cmd_buff[1] = 0; // No error
|
cmd_buff[1] = 0; // No error
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void SetCommandList(Service::Interface* self) {
|
||||||
|
u32* cmd_buff = Service::GetCommandBuffer();
|
||||||
|
ERROR_LOG(GSP, "Unimplemented function");
|
||||||
|
cmd_buff[1] = 0; // No error
|
||||||
|
}
|
||||||
|
|
||||||
|
void RequestDma(Service::Interface* self) {
|
||||||
|
u32* cmd_buff = Service::GetCommandBuffer();
|
||||||
|
ERROR_LOG(GSP, "Unimplemented function");
|
||||||
|
cmd_buff[1] = 0; // No error
|
||||||
|
}
|
||||||
|
|
||||||
|
void FlushDataCache(Service::Interface* self) {
|
||||||
|
u32* cmd_buff = Service::GetCommandBuffer();
|
||||||
|
ERROR_LOG(GSP, "Unimplemented function");
|
||||||
|
cmd_buff[1] = 0; // No error
|
||||||
|
}
|
||||||
|
|
||||||
|
void InvalidateDataCache(Service::Interface* self) {
|
||||||
|
u32* cmd_buff = Service::GetCommandBuffer();
|
||||||
|
ERROR_LOG(GSP, "Unimplemented function");
|
||||||
|
cmd_buff[1] = 0; // No error
|
||||||
|
}
|
||||||
|
|
||||||
|
void RegisterInterruptEvents(Service::Interface* self) {
|
||||||
|
u32* cmd_buff = Service::GetCommandBuffer();
|
||||||
|
ERROR_LOG(GSP, "Unimplemented function");
|
||||||
|
cmd_buff[1] = 0; // No error
|
||||||
|
}
|
||||||
|
|
||||||
|
void SetLcdForceBlack(Service::Interface* self) {
|
||||||
|
u32* cmd_buff = Service::GetCommandBuffer();
|
||||||
|
ERROR_LOG(GSP, "Unimplemented function");
|
||||||
|
cmd_buff[1] = 0; // No error
|
||||||
|
}
|
||||||
|
|
||||||
|
void SetDisplayTransfer(Service::Interface* self) {
|
||||||
|
u32* cmd_buff = Service::GetCommandBuffer();
|
||||||
|
ERROR_LOG(GSP, "Unimplemented function");
|
||||||
|
cmd_buff[1] = 0; // No error
|
||||||
|
}
|
||||||
|
|
||||||
|
void SetTextureCopy(Service::Interface* self) {
|
||||||
|
u32* cmd_buff = Service::GetCommandBuffer();
|
||||||
|
ERROR_LOG(GSP, "Unimplemented function");
|
||||||
|
cmd_buff[1] = 0; // No error
|
||||||
|
}
|
||||||
|
|
||||||
|
void SetMemoryFill(Service::Interface* self) {
|
||||||
|
u32* cmd_buff = Service::GetCommandBuffer();
|
||||||
|
ERROR_LOG(GSP, "Unimplemented function");
|
||||||
|
cmd_buff[1] = 0; // No error
|
||||||
|
}
|
||||||
|
|
||||||
|
void SetAxiConfigQoSMode(Service::Interface* self) {
|
||||||
|
u32* cmd_buff = Service::GetCommandBuffer();
|
||||||
|
ERROR_LOG(GSP, "Unimplemented function");
|
||||||
|
cmd_buff[1] = 0; // No error
|
||||||
|
}
|
||||||
|
|
||||||
|
void SetPerfLogMode(Service::Interface* self) {
|
||||||
|
u32* cmd_buff = Service::GetCommandBuffer();
|
||||||
|
ERROR_LOG(GSP, "Unimplemented function");
|
||||||
|
cmd_buff[1] = 0; // No error
|
||||||
|
}
|
||||||
|
|
||||||
|
void GetPerfLog(Service::Interface* self) {
|
||||||
|
u32* cmd_buff = Service::GetCommandBuffer();
|
||||||
|
ERROR_LOG(GSP, "Unimplemented function");
|
||||||
|
cmd_buff[1] = 0; // No error
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* GSP_GPU::RegisterInterruptRelayQueue service function
|
* GSP_GPU::RegisterInterruptRelayQueue service function
|
||||||
* Inputs:
|
* Inputs:
|
||||||
@ -173,6 +263,72 @@ void RegisterInterruptRelayQueue(Service::Interface* self) {
|
|||||||
Kernel::SignalEvent(g_interrupt_event); // TODO(bunnei): Is this correct?
|
Kernel::SignalEvent(g_interrupt_event); // TODO(bunnei): Is this correct?
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void UnregisterInterruptRelayQueue(Service::Interface* self) {
|
||||||
|
u32* cmd_buff = Service::GetCommandBuffer();
|
||||||
|
ERROR_LOG(GSP, "Unimplemented function");
|
||||||
|
cmd_buff[1] = 0; // No error
|
||||||
|
}
|
||||||
|
|
||||||
|
void TryAcquireRight(Service::Interface* self) {
|
||||||
|
u32* cmd_buff = Service::GetCommandBuffer();
|
||||||
|
ERROR_LOG(GSP, "Unimplemented function");
|
||||||
|
cmd_buff[1] = 0; // No error
|
||||||
|
}
|
||||||
|
|
||||||
|
void AcquireRight(Service::Interface* self) {
|
||||||
|
u32* cmd_buff = Service::GetCommandBuffer();
|
||||||
|
ERROR_LOG(GSP, "Unimplemented function");
|
||||||
|
cmd_buff[1] = 0; // No error
|
||||||
|
}
|
||||||
|
|
||||||
|
void ReleaseRight(Service::Interface* self) {
|
||||||
|
u32* cmd_buff = Service::GetCommandBuffer();
|
||||||
|
ERROR_LOG(GSP, "Unimplemented function");
|
||||||
|
cmd_buff[1] = 0; // No error
|
||||||
|
}
|
||||||
|
|
||||||
|
void ImportDisplayCaptureInfo(Service::Interface* self) {
|
||||||
|
u32* cmd_buff = Service::GetCommandBuffer();
|
||||||
|
ERROR_LOG(GSP, "Unimplemented function");
|
||||||
|
cmd_buff[1] = 0; // No error
|
||||||
|
}
|
||||||
|
|
||||||
|
void SaveVramSysArea(Service::Interface* self) {
|
||||||
|
u32* cmd_buff = Service::GetCommandBuffer();
|
||||||
|
ERROR_LOG(GSP, "Unimplemented function");
|
||||||
|
cmd_buff[1] = 0; // No error
|
||||||
|
}
|
||||||
|
|
||||||
|
void RestoreVramSysArea(Service::Interface* self) {
|
||||||
|
u32* cmd_buff = Service::GetCommandBuffer();
|
||||||
|
ERROR_LOG(GSP, "Unimplemented function");
|
||||||
|
cmd_buff[1] = 0; // No error
|
||||||
|
}
|
||||||
|
|
||||||
|
void ResetGpuCore(Service::Interface* self) {
|
||||||
|
u32* cmd_buff = Service::GetCommandBuffer();
|
||||||
|
ERROR_LOG(GSP, "Unimplemented function");
|
||||||
|
cmd_buff[1] = 0; // No error
|
||||||
|
}
|
||||||
|
|
||||||
|
void SetLedForceOff(Service::Interface* self) {
|
||||||
|
u32* cmd_buff = Service::GetCommandBuffer();
|
||||||
|
ERROR_LOG(GSP, "Unimplemented function");
|
||||||
|
cmd_buff[1] = 0; // No error
|
||||||
|
}
|
||||||
|
|
||||||
|
void SetTestCommand(Service::Interface* self) {
|
||||||
|
u32* cmd_buff = Service::GetCommandBuffer();
|
||||||
|
ERROR_LOG(GSP, "Unimplemented function");
|
||||||
|
cmd_buff[1] = 0; // No error
|
||||||
|
}
|
||||||
|
|
||||||
|
void SetInternalPriorities(Service::Interface* self) {
|
||||||
|
u32* cmd_buff = Service::GetCommandBuffer();
|
||||||
|
ERROR_LOG(GSP, "Unimplemented function");
|
||||||
|
cmd_buff[1] = 0; // No error
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Signals that the specified interrupt type has occurred to userland code
|
* Signals that the specified interrupt type has occurred to userland code
|
||||||
* @param interrupt_id ID of interrupt that is being signalled
|
* @param interrupt_id ID of interrupt that is being signalled
|
||||||
@ -310,54 +466,54 @@ void ExecuteCommand(const Command& command, u32 thread_id) {
|
|||||||
/// This triggers handling of the GX command written to the command buffer in shared memory.
|
/// This triggers handling of the GX command written to the command buffer in shared memory.
|
||||||
void TriggerCmdReqQueue(Service::Interface* self) {
|
void TriggerCmdReqQueue(Service::Interface* self) {
|
||||||
|
|
||||||
// Iterate through each thread's command queue...
|
// Iterate through each thread's command queue...
|
||||||
for (unsigned thread_id = 0; thread_id < 0x4; ++thread_id) {
|
for (unsigned thread_id = 0; thread_id < 0x4; ++thread_id) {
|
||||||
CommandBuffer* command_buffer = (CommandBuffer*)GetCommandBuffer(thread_id);
|
CommandBuffer* command_buffer = (CommandBuffer*)GetCommandBuffer(thread_id);
|
||||||
|
|
||||||
// Iterate through each command...
|
// Iterate through each command...
|
||||||
for (unsigned i = 0; i < command_buffer->number_commands; ++i) {
|
for (unsigned i = 0; i < command_buffer->number_commands; ++i) {
|
||||||
g_debugger.GXCommandProcessed((u8*)&command_buffer->commands[i]);
|
g_debugger.GXCommandProcessed((u8*)&command_buffer->commands[i]);
|
||||||
|
|
||||||
// Decode and execute command
|
// Decode and execute command
|
||||||
ExecuteCommand(command_buffer->commands[i], thread_id);
|
ExecuteCommand(command_buffer->commands[i], thread_id);
|
||||||
|
|
||||||
// Indicates that command has completed
|
// Indicates that command has completed
|
||||||
command_buffer->number_commands = command_buffer->number_commands - 1;
|
command_buffer->number_commands = command_buffer->number_commands - 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const Interface::FunctionInfo FunctionTable[] = {
|
const Interface::FunctionInfo FunctionTable[] = {
|
||||||
{0x00010082, WriteHWRegs, "WriteHWRegs"},
|
{0x00010082, WriteHWRegs, "WriteHWRegs"},
|
||||||
{0x00020084, nullptr, "WriteHWRegsWithMask"},
|
{0x00020084, WriteHWRegsWithMask, "WriteHWRegsWithMask"},
|
||||||
{0x00030082, nullptr, "WriteHWRegRepeat"},
|
{0x00030082, WriteHWRegRepeat, "WriteHWRegRepeat"},
|
||||||
{0x00040080, ReadHWRegs, "ReadHWRegs"},
|
{0x00040080, ReadHWRegs, "ReadHWRegs"},
|
||||||
{0x00050200, SetBufferSwap, "SetBufferSwap"},
|
{0x00050200, SetBufferSwap, "SetBufferSwap"},
|
||||||
{0x00060082, nullptr, "SetCommandList"},
|
{0x00060082, SetCommandList, "SetCommandList"},
|
||||||
{0x000700C2, nullptr, "RequestDma"},
|
{0x000700C2, RequestDma, "RequestDma"},
|
||||||
{0x00080082, nullptr, "FlushDataCache"},
|
{0x00080082, FlushDataCache, "FlushDataCache"},
|
||||||
{0x00090082, nullptr, "InvalidateDataCache"},
|
{0x00090082, InvalidateDataCache, "InvalidateDataCache"},
|
||||||
{0x000A0044, nullptr, "RegisterInterruptEvents"},
|
{0x000A0044, RegisterInterruptEvents, "RegisterInterruptEvents"},
|
||||||
{0x000B0040, nullptr, "SetLcdForceBlack"},
|
{0x000B0040, SetLcdForceBlack, "SetLcdForceBlack"},
|
||||||
{0x000C0000, TriggerCmdReqQueue, "TriggerCmdReqQueue"},
|
{0x000C0000, TriggerCmdReqQueue, "TriggerCmdReqQueue"},
|
||||||
{0x000D0140, nullptr, "SetDisplayTransfer"},
|
{0x000D0140, SetDisplayTransfer, "SetDisplayTransfer"},
|
||||||
{0x000E0180, nullptr, "SetTextureCopy"},
|
{0x000E0180, SetTextureCopy, "SetTextureCopy"},
|
||||||
{0x000F0200, nullptr, "SetMemoryFill"},
|
{0x000F0200, SetMemoryFill, "SetMemoryFill"},
|
||||||
{0x00100040, nullptr, "SetAxiConfigQoSMode"},
|
{0x00100040, SetAxiConfigQoSMode, "SetAxiConfigQoSMode"},
|
||||||
{0x00110040, nullptr, "SetPerfLogMode"},
|
{0x00110040, SetPerfLogMode, "SetPerfLogMode"},
|
||||||
{0x00120000, nullptr, "GetPerfLog"},
|
{0x00120000, GetPerfLog, "GetPerfLog"},
|
||||||
{0x00130042, RegisterInterruptRelayQueue, "RegisterInterruptRelayQueue"},
|
{0x00130042, RegisterInterruptRelayQueue, "RegisterInterruptRelayQueue"},
|
||||||
{0x00140000, nullptr, "UnregisterInterruptRelayQueue"},
|
{0x00140000, UnregisterInterruptRelayQueue, "UnregisterInterruptRelayQueue"},
|
||||||
{0x00150002, nullptr, "TryAcquireRight"},
|
{0x00150002, TryAcquireRight, "TryAcquireRight"},
|
||||||
{0x00160042, nullptr, "AcquireRight"},
|
{0x00160042, AcquireRight, "AcquireRight"},
|
||||||
{0x00170000, nullptr, "ReleaseRight"},
|
{0x00170000, ReleaseRight, "ReleaseRight"},
|
||||||
{0x00180000, nullptr, "ImportDisplayCaptureInfo"},
|
{0x00180000, ImportDisplayCaptureInfo, "ImportDisplayCaptureInfo"},
|
||||||
{0x00190000, nullptr, "SaveVramSysArea"},
|
{0x00190000, SaveVramSysArea, "SaveVramSysArea"},
|
||||||
{0x001A0000, nullptr, "RestoreVramSysArea"},
|
{0x001A0000, RestoreVramSysArea, "RestoreVramSysArea"},
|
||||||
{0x001B0000, nullptr, "ResetGpuCore"},
|
{0x001B0000, ResetGpuCore, "ResetGpuCore"},
|
||||||
{0x001C0040, nullptr, "SetLedForceOff"},
|
{0x001C0040, SetLedForceOff, "SetLedForceOff"},
|
||||||
{0x001D0040, nullptr, "SetTestCommand"},
|
{0x001D0040, SetTestCommand, "SetTestCommand"},
|
||||||
{0x001E0080, nullptr, "SetInternalPriorities"},
|
{0x001E0080, SetInternalPriorities, "SetInternalPriorities"},
|
||||||
};
|
};
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
Loading…
Reference in New Issue
Block a user