summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGravatar Tony Wasserka2015-07-24 01:58:11 +0200
committerGravatar Tony Wasserka2015-07-24 01:58:11 +0200
commit1760eb5ca692b4ca289087eaae1e0975a545be3e (patch)
treed10fbb61342af95db208b300e1185f9503f1a79c /src
parentMerge pull request #977 from yuriks/glenable-tex2d (diff)
parentQt/GPU Breakpoints: Added three more breakpoint types: (diff)
downloadyuzu-1760eb5ca692b4ca289087eaae1e0975a545be3e.tar.gz
yuzu-1760eb5ca692b4ca289087eaae1e0975a545be3e.tar.xz
yuzu-1760eb5ca692b4ca289087eaae1e0975a545be3e.zip
Merge pull request #980 from Subv/more_breakpoints
Qt/GPU Breakpoints: Added three more breakpoint types.
Diffstat (limited to 'src')
-rw-r--r--src/citra_qt/debugger/graphics_breakpoints.cpp9
-rw-r--r--src/core/hle/service/gsp_gpu.cpp7
-rw-r--r--src/core/hw/gpu.cpp4
-rw-r--r--src/video_core/command_processor.cpp4
-rw-r--r--src/video_core/debug_utils/debug_utils.h7
5 files changed, 24 insertions, 7 deletions
diff --git a/src/citra_qt/debugger/graphics_breakpoints.cpp b/src/citra_qt/debugger/graphics_breakpoints.cpp
index 1da64f616..4606c01f2 100644
--- a/src/citra_qt/debugger/graphics_breakpoints.cpp
+++ b/src/citra_qt/debugger/graphics_breakpoints.cpp
@@ -42,11 +42,14 @@ QVariant BreakPointModel::data(const QModelIndex& index, int role) const
42 case 0: 42 case 0:
43 { 43 {
44 static const std::map<Pica::DebugContext::Event, QString> map = { 44 static const std::map<Pica::DebugContext::Event, QString> map = {
45 { Pica::DebugContext::Event::CommandLoaded, tr("Pica command loaded") }, 45 { Pica::DebugContext::Event::PicaCommandLoaded, tr("Pica command loaded") },
46 { Pica::DebugContext::Event::CommandProcessed, tr("Pica command processed") }, 46 { Pica::DebugContext::Event::PicaCommandProcessed, tr("Pica command processed") },
47 { Pica::DebugContext::Event::IncomingPrimitiveBatch, tr("Incoming primitive batch") }, 47 { Pica::DebugContext::Event::IncomingPrimitiveBatch, tr("Incoming primitive batch") },
48 { Pica::DebugContext::Event::FinishedPrimitiveBatch, tr("Finished primitive batch") }, 48 { Pica::DebugContext::Event::FinishedPrimitiveBatch, tr("Finished primitive batch") },
49 { Pica::DebugContext::Event::VertexLoaded, tr("Vertex loaded") } 49 { Pica::DebugContext::Event::VertexLoaded, tr("Vertex loaded") },
50 { Pica::DebugContext::Event::IncomingDisplayTransfer, tr("Incoming display transfer") },
51 { Pica::DebugContext::Event::GSPCommandProcessed, tr("GSP command processed") },
52 { Pica::DebugContext::Event::BufferSwapped, tr("Buffers swapped") }
50 }; 53 };
51 54
52 DEBUG_ASSERT(map.size() == static_cast<size_t>(Pica::DebugContext::Event::NumEvents)); 55 DEBUG_ASSERT(map.size() == static_cast<size_t>(Pica::DebugContext::Event::NumEvents));
diff --git a/src/core/hle/service/gsp_gpu.cpp b/src/core/hle/service/gsp_gpu.cpp
index 8b40ba376..832273f39 100644
--- a/src/core/hle/service/gsp_gpu.cpp
+++ b/src/core/hle/service/gsp_gpu.cpp
@@ -14,6 +14,7 @@
14#include "core/hw/lcd.h" 14#include "core/hw/lcd.h"
15 15
16#include "video_core/gpu_debugger.h" 16#include "video_core/gpu_debugger.h"
17#include "video_core/debug_utils/debug_utils.h"
17#include "video_core/renderer_base.h" 18#include "video_core/renderer_base.h"
18#include "video_core/video_core.h" 19#include "video_core/video_core.h"
19 20
@@ -226,6 +227,9 @@ void SetBufferSwap(u32 screen_id, const FrameBufferInfo& info) {
226 &info.format); 227 &info.format);
227 WriteHWRegs(base_address + 4 * static_cast<u32>(GPU_REG_INDEX(framebuffer_config[screen_id].active_fb)), 4, 228 WriteHWRegs(base_address + 4 * static_cast<u32>(GPU_REG_INDEX(framebuffer_config[screen_id].active_fb)), 4,
228 &info.shown_fb); 229 &info.shown_fb);
230
231 if (Pica::g_debug_context)
232 Pica::g_debug_context->OnEvent(Pica::DebugContext::Event::BufferSwapped, nullptr);
229} 233}
230 234
231/** 235/**
@@ -448,6 +452,9 @@ static void ExecuteCommand(const Command& command, u32 thread_id) {
448 default: 452 default:
449 LOG_ERROR(Service_GSP, "unknown command 0x%08X", (int)command.id.Value()); 453 LOG_ERROR(Service_GSP, "unknown command 0x%08X", (int)command.id.Value());
450 } 454 }
455
456 if (Pica::g_debug_context)
457 Pica::g_debug_context->OnEvent(Pica::DebugContext::Event::GSPCommandProcessed, (void*)&command);
451} 458}
452 459
453/** 460/**
diff --git a/src/core/hw/gpu.cpp b/src/core/hw/gpu.cpp
index 2a338e8fc..3ccbc03b2 100644
--- a/src/core/hw/gpu.cpp
+++ b/src/core/hw/gpu.cpp
@@ -151,6 +151,10 @@ inline void Write(u32 addr, const T data) {
151 { 151 {
152 const auto& config = g_regs.display_transfer_config; 152 const auto& config = g_regs.display_transfer_config;
153 if (config.trigger & 1) { 153 if (config.trigger & 1) {
154
155 if (Pica::g_debug_context)
156 Pica::g_debug_context->OnEvent(Pica::DebugContext::Event::IncomingDisplayTransfer, nullptr);
157
154 u8* src_pointer = Memory::GetPhysicalPointer(config.GetPhysicalInputAddress()); 158 u8* src_pointer = Memory::GetPhysicalPointer(config.GetPhysicalInputAddress());
155 u8* dst_pointer = Memory::GetPhysicalPointer(config.GetPhysicalOutputAddress()); 159 u8* dst_pointer = Memory::GetPhysicalPointer(config.GetPhysicalOutputAddress());
156 160
diff --git a/src/video_core/command_processor.cpp b/src/video_core/command_processor.cpp
index 8b10d7340..92ba8754f 100644
--- a/src/video_core/command_processor.cpp
+++ b/src/video_core/command_processor.cpp
@@ -50,7 +50,7 @@ static inline void WritePicaReg(u32 id, u32 value, u32 mask) {
50 regs[id] = (old_value & ~mask) | (value & mask); 50 regs[id] = (old_value & ~mask) | (value & mask);
51 51
52 if (g_debug_context) 52 if (g_debug_context)
53 g_debug_context->OnEvent(DebugContext::Event::CommandLoaded, reinterpret_cast<void*>(&id)); 53 g_debug_context->OnEvent(DebugContext::Event::PicaCommandLoaded, reinterpret_cast<void*>(&id));
54 54
55 DebugUtils::OnPicaRegWrite(id, regs[id]); 55 DebugUtils::OnPicaRegWrite(id, regs[id]);
56 56
@@ -428,7 +428,7 @@ static inline void WritePicaReg(u32 id, u32 value, u32 mask) {
428 VideoCore::g_renderer->hw_rasterizer->NotifyPicaRegisterChanged(id); 428 VideoCore::g_renderer->hw_rasterizer->NotifyPicaRegisterChanged(id);
429 429
430 if (g_debug_context) 430 if (g_debug_context)
431 g_debug_context->OnEvent(DebugContext::Event::CommandProcessed, reinterpret_cast<void*>(&id)); 431 g_debug_context->OnEvent(DebugContext::Event::PicaCommandProcessed, reinterpret_cast<void*>(&id));
432} 432}
433 433
434void ProcessCommandList(const u32* list, u32 size) { 434void ProcessCommandList(const u32* list, u32 size) {
diff --git a/src/video_core/debug_utils/debug_utils.h b/src/video_core/debug_utils/debug_utils.h
index 2573292e2..3f109dcb7 100644
--- a/src/video_core/debug_utils/debug_utils.h
+++ b/src/video_core/debug_utils/debug_utils.h
@@ -25,11 +25,14 @@ public:
25 enum class Event { 25 enum class Event {
26 FirstEvent = 0, 26 FirstEvent = 0,
27 27
28 CommandLoaded = FirstEvent, 28 PicaCommandLoaded = FirstEvent,
29 CommandProcessed, 29 PicaCommandProcessed,
30 IncomingPrimitiveBatch, 30 IncomingPrimitiveBatch,
31 FinishedPrimitiveBatch, 31 FinishedPrimitiveBatch,
32 VertexLoaded, 32 VertexLoaded,
33 IncomingDisplayTransfer,
34 GSPCommandProcessed,
35 BufferSwapped,
33 36
34 NumEvents 37 NumEvents
35 }; 38 };