diff options
Diffstat (limited to 'src/video_core/gpu_debugger.h')
| -rw-r--r-- | src/video_core/gpu_debugger.h | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/src/video_core/gpu_debugger.h b/src/video_core/gpu_debugger.h index 5d909beba..d92ceaa72 100644 --- a/src/video_core/gpu_debugger.h +++ b/src/video_core/gpu_debugger.h | |||
| @@ -50,7 +50,7 @@ public: | |||
| 50 | virtual void GXCommandProcessed(int total_command_count) | 50 | virtual void GXCommandProcessed(int total_command_count) |
| 51 | { | 51 | { |
| 52 | const GSP_GPU::GXCommand& cmd = observed->ReadGXCommandHistory(total_command_count-1); | 52 | const GSP_GPU::GXCommand& cmd = observed->ReadGXCommandHistory(total_command_count-1); |
| 53 | ERROR_LOG(GSP, "Received command: id=%x", cmd.id); | 53 | ERROR_LOG(GSP, "Received command: id=%x", (int)cmd.id.Value()); |
| 54 | } | 54 | } |
| 55 | 55 | ||
| 56 | /** | 56 | /** |
| @@ -78,11 +78,13 @@ public: | |||
| 78 | 78 | ||
| 79 | void GXCommandProcessed(u8* command_data) | 79 | void GXCommandProcessed(u8* command_data) |
| 80 | { | 80 | { |
| 81 | if (observers.empty()) | ||
| 82 | return; | ||
| 83 | |||
| 81 | gx_command_history.push_back(GSP_GPU::GXCommand()); | 84 | gx_command_history.push_back(GSP_GPU::GXCommand()); |
| 82 | GSP_GPU::GXCommand& cmd = gx_command_history[gx_command_history.size()-1]; | 85 | GSP_GPU::GXCommand& cmd = gx_command_history[gx_command_history.size()-1]; |
| 83 | 86 | ||
| 84 | const int cmd_length = sizeof(GSP_GPU::GXCommand); | 87 | memcpy(&cmd, command_data, sizeof(GSP_GPU::GXCommand)); |
| 85 | memcpy(cmd.data, command_data, cmd_length); | ||
| 86 | 88 | ||
| 87 | ForEachObserver([this](DebuggerObserver* observer) { | 89 | ForEachObserver([this](DebuggerObserver* observer) { |
| 88 | observer->GXCommandProcessed(this->gx_command_history.size()); | 90 | observer->GXCommandProcessed(this->gx_command_history.size()); |
| @@ -91,6 +93,9 @@ public: | |||
| 91 | 93 | ||
| 92 | void CommandListCalled(u32 address, u32* command_list, u32 size_in_words) | 94 | void CommandListCalled(u32 address, u32* command_list, u32 size_in_words) |
| 93 | { | 95 | { |
| 96 | if (observers.empty()) | ||
| 97 | return; | ||
| 98 | |||
| 94 | PicaCommandList cmdlist; | 99 | PicaCommandList cmdlist; |
| 95 | for (u32* parse_pointer = command_list; parse_pointer < command_list + size_in_words;) | 100 | for (u32* parse_pointer = command_list; parse_pointer < command_list + size_in_words;) |
| 96 | { | 101 | { |