summaryrefslogtreecommitdiff
path: root/src/core/hle
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/hle')
-rw-r--r--src/core/hle/service/gsp_gpu.cpp10
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
205static void SetBufferSwap(u32 screen_id, const FrameBufferInfo& info) { 205static 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);