summaryrefslogtreecommitdiffstats
path: root/src/video_core/command_processor.cpp
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2014-12-10 15:20:05 +0100
committerbunnei <bunneidev@gmail.com>2014-12-10 15:20:05 +0100
commitae3c6e82f70e84b4a2823ece9aeabf6fa1127956 (patch)
tree5305a9a909f0ed8c35aad59c81f910203f4c0aa2 /src/video_core/command_processor.cpp
parentMerge pull request #269 from archshift/le (diff)
parentGSP: Trigger GPU interrupts at more accurate locations. (diff)
downloadyuzu-ae3c6e82f70e84b4a2823ece9aeabf6fa1127956.tar
yuzu-ae3c6e82f70e84b4a2823ece9aeabf6fa1127956.tar.gz
yuzu-ae3c6e82f70e84b4a2823ece9aeabf6fa1127956.tar.bz2
yuzu-ae3c6e82f70e84b4a2823ece9aeabf6fa1127956.tar.lz
yuzu-ae3c6e82f70e84b4a2823ece9aeabf6fa1127956.tar.xz
yuzu-ae3c6e82f70e84b4a2823ece9aeabf6fa1127956.tar.zst
yuzu-ae3c6e82f70e84b4a2823ece9aeabf6fa1127956.zip
Diffstat (limited to 'src/video_core/command_processor.cpp')
-rw-r--r--src/video_core/command_processor.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/video_core/command_processor.cpp b/src/video_core/command_processor.cpp
index 298b04c51..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):
@@ -272,8 +278,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);
}
}