diff options
| author | bunnei <bunneidev@gmail.com> | 2015-04-05 22:07:25 -0400 |
|---|---|---|
| committer | bunnei <bunneidev@gmail.com> | 2015-04-05 22:07:25 -0400 |
| commit | 8997cfaeb4096412254f0cd717260b09777d0703 (patch) | |
| tree | f0f2d60d6e381355bb5b6c1a4315586ca8900243 /src/core/hle/service/gsp_gpu.cpp | |
| parent | fec6d603b0a76361bfc0bd63030a94ad206f19a8 (diff) | |
| parent | 34b009cf38643dc8ac45a366d24208d36a2eb2f9 (diff) | |
Merge pull request #682 from yuriks/virtmem2
Clean-up mem_map constants and fix framebuffer translation errors
Diffstat (limited to 'src/core/hle/service/gsp_gpu.cpp')
| -rw-r--r-- | src/core/hle/service/gsp_gpu.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/core/hle/service/gsp_gpu.cpp b/src/core/hle/service/gsp_gpu.cpp index 26d3bcff6..8da063bd2 100644 --- a/src/core/hle/service/gsp_gpu.cpp +++ b/src/core/hle/service/gsp_gpu.cpp @@ -204,16 +204,18 @@ static void ReadHWRegs(Service::Interface* self) { static void SetBufferSwap(u32 screen_id, const FrameBufferInfo& info) { u32 base_address = 0x400000; + PAddr phys_address_left = Memory::VirtualToPhysicalAddress(info.address_left); + PAddr phys_address_right = Memory::VirtualToPhysicalAddress(info.address_right); if (info.active_fb == 0) { WriteHWRegs(base_address + 4 * static_cast<u32>(GPU_REG_INDEX(framebuffer_config[screen_id].address_left1)), 4, - &info.address_left); + &phys_address_left); WriteHWRegs(base_address + 4 * static_cast<u32>(GPU_REG_INDEX(framebuffer_config[screen_id].address_right1)), 4, - &info.address_right); + &phys_address_right); } else { WriteHWRegs(base_address + 4 * static_cast<u32>(GPU_REG_INDEX(framebuffer_config[screen_id].address_left2)), 4, - &info.address_left); + &phys_address_left); WriteHWRegs(base_address + 4 * static_cast<u32>(GPU_REG_INDEX(framebuffer_config[screen_id].address_right2)), 4, - &info.address_right); + &phys_address_right); } WriteHWRegs(base_address + 4 * static_cast<u32>(GPU_REG_INDEX(framebuffer_config[screen_id].stride)), 4, &info.stride); |
