summaryrefslogtreecommitdiffstats
path: root/src/core/hle
diff options
context:
space:
mode:
authorYuri Kunde Schlesner <yuriks@yuriks.net>2015-02-08 14:38:00 +0100
committerYuri Kunde Schlesner <yuriks@yuriks.net>2015-04-06 01:14:33 +0200
commit34b009cf38643dc8ac45a366d24208d36a2eb2f9 (patch)
treeffd88b43959d9a46a2f4155413dc893356fe66bc /src/core/hle
parentMerge pull request #680 from archshift/bg-color (diff)
downloadyuzu-34b009cf38643dc8ac45a366d24208d36a2eb2f9.tar
yuzu-34b009cf38643dc8ac45a366d24208d36a2eb2f9.tar.gz
yuzu-34b009cf38643dc8ac45a366d24208d36a2eb2f9.tar.bz2
yuzu-34b009cf38643dc8ac45a366d24208d36a2eb2f9.tar.lz
yuzu-34b009cf38643dc8ac45a366d24208d36a2eb2f9.tar.xz
yuzu-34b009cf38643dc8ac45a366d24208d36a2eb2f9.tar.zst
yuzu-34b009cf38643dc8ac45a366d24208d36a2eb2f9.zip
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) {
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);