aboutsummaryrefslogtreecommitdiff
path: root/src/video_core/command_processor.cpp
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2018-04-24 23:22:24 -0400
committerGitHub <noreply@github.com>2018-04-24 23:22:24 -0400
commit9add4dba81e79e23a5e45486a3f50d8b8f5079e3 (patch)
tree6f7e127c4f58de6071d9a7dbd2af464dbbd14b9b /src/video_core/command_processor.cpp
parent8ae52df089817fe7e0c50ae0fdcf2213cfcc8682 (diff)
parentbfb435c9940bfe8667a39db546864922ff7e2e9b (diff)
Merge pull request #388 from bunnei/refactor-rasterizer-cache
Refactor rasterizer cache
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 d4cdb4ab2a..2c04daba34 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);