mirror of
https://github.com/wheremyfoodat/Panda3DS.git
synced 2025-08-11 18:50:03 +00:00
gsp_gpu: Convert vaddr to paddr from GSP service
This commit is contained in:
parent
50bf9bf7da
commit
072faead41
2 changed files with 6 additions and 6 deletions
|
@ -336,7 +336,7 @@ void GPU::writeInternalReg(u32 index, u32 value, u32 mask) {
|
||||||
}
|
}
|
||||||
|
|
||||||
void GPU::startCommandList(u32 addr, u32 size) {
|
void GPU::startCommandList(u32 addr, u32 size) {
|
||||||
cmdBuffStart = static_cast<u32*>(mem.getReadPointer(addr));
|
cmdBuffStart = getPointerPhys<u32>(addr);
|
||||||
if (!cmdBuffStart) Helpers::panic("Couldn't get buffer for command list");
|
if (!cmdBuffStart) Helpers::panic("Couldn't get buffer for command list");
|
||||||
// TODO: This is very memory unsafe. We get a pointer to FCRAM and just keep writing without checking if we're gonna go OoB
|
// TODO: This is very memory unsafe. We get a pointer to FCRAM and just keep writing without checking if we're gonna go OoB
|
||||||
|
|
||||||
|
|
|
@ -379,11 +379,11 @@ void GPUService::flushCacheRegions(u32* cmd) {
|
||||||
void GPUService::processCommandList(u32* cmd) {
|
void GPUService::processCommandList(u32* cmd) {
|
||||||
const u32 address = cmd[1] & ~7; // Buffer address
|
const u32 address = cmd[1] & ~7; // Buffer address
|
||||||
const u32 size = cmd[2] & ~3; // Buffer size in bytes
|
const u32 size = cmd[2] & ~3; // Buffer size in bytes
|
||||||
const bool updateGas = cmd[3] == 1; // Update gas additive blend results (0 = don't update, 1 = update)
|
[[maybe_unused]] const bool updateGas = cmd[3] == 1; // Update gas additive blend results (0 = don't update, 1 = update)
|
||||||
const bool flushBuffer = cmd[7] == 1; // Flush buffer (0 = don't flush, 1 = flush)
|
[[maybe_unused]] const bool flushBuffer = cmd[7] == 1; // Flush buffer (0 = don't flush, 1 = flush)
|
||||||
|
|
||||||
log("GPU::GSP::processCommandList. Address: %08X, size in bytes: %08X\n", address, size);
|
log("GPU::GSP::processCommandList. Address: %08X, size in bytes: %08X\n", address, size);
|
||||||
gpu.startCommandList(address, size);
|
gpu.startCommandList(VaddrToPaddr(address), size);
|
||||||
requestInterrupt(GPUInterrupt::P3D); // Send an IRQ when command list processing is over
|
requestInterrupt(GPUInterrupt::P3D); // Send an IRQ when command list processing is over
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue