summaryrefslogtreecommitdiffstats
path: root/src/video_core/command_processor.cpp
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2018-04-25 05:22:24 +0200
committerGitHub <noreply@github.com>2018-04-25 05:22:24 +0200
commitea3151f475e170eaaec3ded306a0fe5c1e5944db (patch)
tree6f7e127c4f58de6071d9a7dbd2af464dbbd14b9b /src/video_core/command_processor.cpp
parentMerge pull request #393 from lioncash/loader (diff)
parentrenderer_opengl: Use correct byte order for framebuffer pixel format ABGR8. (diff)
downloadyuzu-ea3151f475e170eaaec3ded306a0fe5c1e5944db.tar
yuzu-ea3151f475e170eaaec3ded306a0fe5c1e5944db.tar.gz
yuzu-ea3151f475e170eaaec3ded306a0fe5c1e5944db.tar.bz2
yuzu-ea3151f475e170eaaec3ded306a0fe5c1e5944db.tar.lz
yuzu-ea3151f475e170eaaec3ded306a0fe5c1e5944db.tar.xz
yuzu-ea3151f475e170eaaec3ded306a0fe5c1e5944db.tar.zst
yuzu-ea3151f475e170eaaec3ded306a0fe5c1e5944db.zip
Diffstat (limited to 'src/video_core/command_processor.cpp')
-rw-r--r--src/video_core/command_processor.cpp8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/video_core/command_processor.cpp b/src/video_core/command_processor.cpp
index d4cdb4ab2..2c04daba3 100644
--- a/src/video_core/command_processor.cpp
+++ b/src/video_core/command_processor.cpp
@@ -90,11 +90,9 @@ void GPU::WriteReg(u32 method, u32 subchannel, u32 value, u32 remaining_params)
}
void GPU::ProcessCommandList(GPUVAddr address, u32 size) {
- // TODO(Subv): PhysicalToVirtualAddress is a misnomer, it converts a GPU VAddr into an
- // application VAddr.
- const VAddr head_address = memory_manager->PhysicalToVirtualAddress(address);
- VAddr current_addr = head_address;
- while (current_addr < head_address + size * sizeof(CommandHeader)) {
+ const boost::optional<VAddr> head_address = memory_manager->GpuToCpuAddress(address);
+ VAddr current_addr = *head_address;
+ while (current_addr < *head_address + size * sizeof(CommandHeader)) {
const CommandHeader header = {Memory::Read32(current_addr)};
current_addr += sizeof(u32);