diff options
author | 2014-12-09 12:14:05 -0500 | |
---|---|---|
committer | 2014-12-09 12:14:05 -0500 | |
commit | 360f68419db55de15a996feb1874d1b0b82c4661 (patch) | |
tree | 816d9a88deded411908e6d9aa22a648416c41469 /src/video_core/command_processor.cpp | |
parent | b7327f807cc2d85a6a5353b904de7781a6c6429c (diff) | |
parent | 8b8131baecca16b46c22318b3331b2165cc74cbc (diff) |
Merge pull request #218 from neobrain/pica_debugger
Pica debugger improvements
Diffstat (limited to 'src/video_core/command_processor.cpp')
-rw-r--r-- | src/video_core/command_processor.cpp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/video_core/command_processor.cpp b/src/video_core/command_processor.cpp index 8a6ba256..298b04c5 100644 --- a/src/video_core/command_processor.cpp +++ b/src/video_core/command_processor.cpp @@ -34,6 +34,9 @@ static inline void WritePicaReg(u32 id, u32 value, u32 mask) { u32 old_value = registers[id]; registers[id] = (old_value & ~mask) | (value & mask); + if (g_debug_context) + g_debug_context->OnEvent(DebugContext::Event::CommandLoaded, reinterpret_cast<void*>(&id)); + DebugUtils::OnPicaRegWrite(id, registers[id]); switch(id) { @@ -43,6 +46,9 @@ static inline void WritePicaReg(u32 id, u32 value, u32 mask) { { DebugUtils::DumpTevStageConfig(registers.GetTevStages()); + if (g_debug_context) + g_debug_context->OnEvent(DebugContext::Event::IncomingPrimitiveBatch, nullptr); + const auto& attribute_config = registers.vertex_attributes; const u8* const base_address = Memory::GetPointer(attribute_config.GetBaseAddress()); @@ -132,6 +138,10 @@ static inline void WritePicaReg(u32 id, u32 value, u32 mask) { clipper_primitive_assembler.SubmitVertex(output, Clipper::ProcessTriangle); } geometry_dumper.Dump(); + + if (g_debug_context) + g_debug_context->OnEvent(DebugContext::Event::FinishedPrimitiveBatch, nullptr); + break; } @@ -229,6 +239,9 @@ static inline void WritePicaReg(u32 id, u32 value, u32 mask) { default: break; } + + if (g_debug_context) + g_debug_context->OnEvent(DebugContext::Event::CommandProcessed, reinterpret_cast<void*>(&id)); } static std::ptrdiff_t ExecuteCommandBlock(const u32* first_command_word) { |