summaryrefslogtreecommitdiff
path: root/src/core
diff options
context:
space:
mode:
authorGravatar bunnei2014-12-03 01:05:16 -0500
committerGravatar bunnei2014-12-09 19:07:13 -0500
commit170123982dfa8d5f7508d9808cf83d592267db21 (patch)
treed84e887fad4ad93a09fee3640c8fa5c658c25ffd /src/core
parentMerge pull request #266 from yuriks/remove-ndma (diff)
downloadyuzu-170123982dfa8d5f7508d9808cf83d592267db21.tar.gz
yuzu-170123982dfa8d5f7508d9808cf83d592267db21.tar.xz
yuzu-170123982dfa8d5f7508d9808cf83d592267db21.zip
GPU: Fixed bug in command list size decoding.
Diffstat (limited to 'src/core')
-rw-r--r--src/core/hle/service/gsp_gpu.cpp2
-rw-r--r--src/core/hw/gpu.cpp3
-rw-r--r--src/core/hw/gpu.h2
3 files changed, 3 insertions, 4 deletions
diff --git a/src/core/hle/service/gsp_gpu.cpp b/src/core/hle/service/gsp_gpu.cpp
index de1bd3f61..0d3a52478 100644
--- a/src/core/hle/service/gsp_gpu.cpp
+++ b/src/core/hle/service/gsp_gpu.cpp
@@ -219,7 +219,7 @@ static void ExecuteCommand(const Command& command, u32 thread_id) {
219 { 219 {
220 auto& params = command.set_command_list_last; 220 auto& params = command.set_command_list_last;
221 WriteGPURegister(GPU_REG_INDEX(command_processor_config.address), Memory::VirtualToPhysicalAddress(params.address) >> 3); 221 WriteGPURegister(GPU_REG_INDEX(command_processor_config.address), Memory::VirtualToPhysicalAddress(params.address) >> 3);
222 WriteGPURegister(GPU_REG_INDEX(command_processor_config.size), params.size >> 3); 222 WriteGPURegister(GPU_REG_INDEX(command_processor_config.size), params.size);
223 223
224 // TODO: Not sure if we are supposed to always write this .. seems to trigger processing though 224 // TODO: Not sure if we are supposed to always write this .. seems to trigger processing though
225 WriteGPURegister(GPU_REG_INDEX(command_processor_config.trigger), 1); 225 WriteGPURegister(GPU_REG_INDEX(command_processor_config.trigger), 1);
diff --git a/src/core/hw/gpu.cpp b/src/core/hw/gpu.cpp
index af5e1b39b..77557e582 100644
--- a/src/core/hw/gpu.cpp
+++ b/src/core/hw/gpu.cpp
@@ -154,8 +154,7 @@ inline void Write(u32 addr, const T data) {
154 if (config.trigger & 1) 154 if (config.trigger & 1)
155 { 155 {
156 u32* buffer = (u32*)Memory::GetPointer(Memory::PhysicalToVirtualAddress(config.GetPhysicalAddress())); 156 u32* buffer = (u32*)Memory::GetPointer(Memory::PhysicalToVirtualAddress(config.GetPhysicalAddress()));
157 u32 size = config.size << 3; 157 Pica::CommandProcessor::ProcessCommandList(buffer, config.size);
158 Pica::CommandProcessor::ProcessCommandList(buffer, size);
159 } 158 }
160 break; 159 break;
161 } 160 }
diff --git a/src/core/hw/gpu.h b/src/core/hw/gpu.h
index 3fa7b9ccf..86cd5e680 100644
--- a/src/core/hw/gpu.h
+++ b/src/core/hw/gpu.h
@@ -169,7 +169,7 @@ struct Regs {
169 INSERT_PADDING_WORDS(0x331); 169 INSERT_PADDING_WORDS(0x331);
170 170
171 struct { 171 struct {
172 // command list size 172 // command list size (in bytes)
173 u32 size; 173 u32 size;
174 174
175 INSERT_PADDING_WORDS(0x1); 175 INSERT_PADDING_WORDS(0x1);