From 170123982dfa8d5f7508d9808cf83d592267db21 Mon Sep 17 00:00:00 2001 From: bunnei Date: Wed, 3 Dec 2014 01:05:16 -0500 Subject: GPU: Fixed bug in command list size decoding. --- src/video_core/command_processor.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/video_core/command_processor.cpp') diff --git a/src/video_core/command_processor.cpp b/src/video_core/command_processor.cpp index 298b04c51..585323a81 100644 --- a/src/video_core/command_processor.cpp +++ b/src/video_core/command_processor.cpp @@ -272,8 +272,9 @@ static std::ptrdiff_t ExecuteCommandBlock(const u32* first_command_word) { void ProcessCommandList(const u32* list, u32 size) { u32* read_pointer = (u32*)list; + u32 list_length = size / sizeof(u32); - while (read_pointer < list + size) { + while (read_pointer < list + list_length) { read_pointer += ExecuteCommandBlock(read_pointer); } } -- cgit v1.2.3 From f94d8f960361e36c5436717924bda5a3a6c6d47a Mon Sep 17 00:00:00 2001 From: bunnei Date: Wed, 3 Dec 2014 01:04:22 -0500 Subject: GSP: Trigger GPU interrupts at more accurate locations. --- src/video_core/command_processor.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/video_core/command_processor.cpp') diff --git a/src/video_core/command_processor.cpp b/src/video_core/command_processor.cpp index 585323a81..431139cc2 100644 --- a/src/video_core/command_processor.cpp +++ b/src/video_core/command_processor.cpp @@ -8,6 +8,7 @@ #include "pica.h" #include "primitive_assembly.h" #include "vertex_shader.h" +#include "core/hle/service/gsp_gpu.h" #include "debug_utils/debug_utils.h" @@ -40,6 +41,11 @@ static inline void WritePicaReg(u32 id, u32 value, u32 mask) { DebugUtils::OnPicaRegWrite(id, registers[id]); switch(id) { + // Trigger IRQ + case PICA_REG_INDEX(trigger_irq): + GSP_GPU::SignalInterrupt(GSP_GPU::InterruptId::P3D); + return; + // It seems like these trigger vertex rendering case PICA_REG_INDEX(trigger_draw): case PICA_REG_INDEX(trigger_draw_indexed): -- cgit v1.2.3