diff options
| author | 2015-02-08 11:38:00 -0200 | |
|---|---|---|
| committer | 2015-04-05 20:14:33 -0300 | |
| commit | 34b009cf38643dc8ac45a366d24208d36a2eb2f9 (patch) | |
| tree | ffd88b43959d9a46a2f4155413dc893356fe66bc /src/core/hle | |
| parent | Merge pull request #680 from archshift/bg-color (diff) | |
| download | yuzu-34b009cf38643dc8ac45a366d24208d36a2eb2f9.tar.gz yuzu-34b009cf38643dc8ac45a366d24208d36a2eb2f9.tar.xz yuzu-34b009cf38643dc8ac45a366d24208d36a2eb2f9.zip | |
Clean-up mem_map constants and fix framebuffer translation errors
Diffstat (limited to 'src/core/hle')
| -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) { | |||
| 204 | 204 | ||
| 205 | static void SetBufferSwap(u32 screen_id, const FrameBufferInfo& info) { | 205 | static void SetBufferSwap(u32 screen_id, const FrameBufferInfo& info) { |
| 206 | u32 base_address = 0x400000; | 206 | u32 base_address = 0x400000; |
| 207 | PAddr phys_address_left = Memory::VirtualToPhysicalAddress(info.address_left); | ||
| 208 | PAddr phys_address_right = Memory::VirtualToPhysicalAddress(info.address_right); | ||
| 207 | if (info.active_fb == 0) { | 209 | if (info.active_fb == 0) { |
| 208 | WriteHWRegs(base_address + 4 * static_cast<u32>(GPU_REG_INDEX(framebuffer_config[screen_id].address_left1)), 4, | 210 | WriteHWRegs(base_address + 4 * static_cast<u32>(GPU_REG_INDEX(framebuffer_config[screen_id].address_left1)), 4, |
| 209 | &info.address_left); | 211 | &phys_address_left); |
| 210 | WriteHWRegs(base_address + 4 * static_cast<u32>(GPU_REG_INDEX(framebuffer_config[screen_id].address_right1)), 4, | 212 | WriteHWRegs(base_address + 4 * static_cast<u32>(GPU_REG_INDEX(framebuffer_config[screen_id].address_right1)), 4, |
| 211 | &info.address_right); | 213 | &phys_address_right); |
| 212 | } else { | 214 | } else { |
| 213 | WriteHWRegs(base_address + 4 * static_cast<u32>(GPU_REG_INDEX(framebuffer_config[screen_id].address_left2)), 4, | 215 | WriteHWRegs(base_address + 4 * static_cast<u32>(GPU_REG_INDEX(framebuffer_config[screen_id].address_left2)), 4, |
| 214 | &info.address_left); | 216 | &phys_address_left); |
| 215 | WriteHWRegs(base_address + 4 * static_cast<u32>(GPU_REG_INDEX(framebuffer_config[screen_id].address_right2)), 4, | 217 | WriteHWRegs(base_address + 4 * static_cast<u32>(GPU_REG_INDEX(framebuffer_config[screen_id].address_right2)), 4, |
| 216 | &info.address_right); | 218 | &phys_address_right); |
| 217 | } | 219 | } |
| 218 | WriteHWRegs(base_address + 4 * static_cast<u32>(GPU_REG_INDEX(framebuffer_config[screen_id].stride)), 4, | 220 | WriteHWRegs(base_address + 4 * static_cast<u32>(GPU_REG_INDEX(framebuffer_config[screen_id].stride)), 4, |
| 219 | &info.stride); | 221 | &info.stride); |