summaryrefslogtreecommitdiffstats
path: root/src/core/hw/gpu.cpp
diff options
context:
space:
mode:
authorTony Wasserka <NeoBrainX@gmail.com>2015-04-04 12:57:31 +0200
committerTony Wasserka <NeoBrainX@gmail.com>2015-07-13 22:27:20 +0200
commit902fa4da52737d43e04c2a028658ad9840811a89 (patch)
tree0a2346b4e08b5865c3369247f5720453b170e0c6 /src/core/hw/gpu.cpp
parentGPU: Be robust against nullptr addresses; properly reset busy bits in the trigger registers. (diff)
downloadyuzu-902fa4da52737d43e04c2a028658ad9840811a89.tar
yuzu-902fa4da52737d43e04c2a028658ad9840811a89.tar.gz
yuzu-902fa4da52737d43e04c2a028658ad9840811a89.tar.bz2
yuzu-902fa4da52737d43e04c2a028658ad9840811a89.tar.lz
yuzu-902fa4da52737d43e04c2a028658ad9840811a89.tar.xz
yuzu-902fa4da52737d43e04c2a028658ad9840811a89.tar.zst
yuzu-902fa4da52737d43e04c2a028658ad9840811a89.zip
Diffstat (limited to '')
-rw-r--r--src/core/hw/gpu.cpp17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/core/hw/gpu.cpp b/src/core/hw/gpu.cpp
index 796493378..a3a7d128f 100644
--- a/src/core/hw/gpu.cpp
+++ b/src/core/hw/gpu.cpp
@@ -21,12 +21,17 @@
#include "core/hw/hw.h"
#include "core/hw/gpu.h"
+#include "core/tracer/recorder.h"
+
#include "video_core/command_processor.h"
#include "video_core/hwrasterizer_base.h"
#include "video_core/renderer_base.h"
#include "video_core/utils.h"
#include "video_core/video_core.h"
+#include "video_core/debug_utils/debug_utils.h"
+
+
namespace GPU {
Regs g_regs;
@@ -289,6 +294,11 @@ inline void Write(u32 addr, const T data) {
if (config.trigger & 1)
{
u32* buffer = (u32*)Memory::GetPhysicalPointer(config.GetPhysicalAddress());
+
+ if (Pica::g_debug_context && Pica::g_debug_context->recorder) {
+ Pica::g_debug_context->recorder->MemoryAccessed((u8*)buffer, config.size * sizeof(u32), config.GetPhysicalAddress());
+ }
+
Pica::CommandProcessor::ProcessCommandList(buffer, config.size);
g_regs.command_processor_config.trigger = 0;
@@ -299,6 +309,13 @@ inline void Write(u32 addr, const T data) {
default:
break;
}
+
+ // Notify tracer about the register write
+ // This is happening *after* handling the write to make sure we properly catch all memory reads.
+ if (Pica::g_debug_context && Pica::g_debug_context->recorder) {
+ // addr + GPU VBase - IO VBase + IO PBase
+ Pica::g_debug_context->recorder->RegisterWritten<T>(addr + 0x1EF00000 - 0x1EC00000 + 0x10100000, data);
+ }
}
// Explicitly instantiate template functions because we aren't defining this in the header: