summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Jannik Vogel2016-05-04 10:21:51 +0200
committerGravatar Jannik Vogel2016-05-04 10:21:51 +0200
commit7a77b8356ca0aebbd29b88402c9470dd22fedeab (patch)
tree41c66a1e6f3d0ccd386a40f87a974ab7ce0f688d
parentMerge pull request #1754 from JayFoxRox/fix-const_color-revert (diff)
downloadyuzu-7a77b8356ca0aebbd29b88402c9470dd22fedeab.tar.gz
yuzu-7a77b8356ca0aebbd29b88402c9470dd22fedeab.tar.xz
yuzu-7a77b8356ca0aebbd29b88402c9470dd22fedeab.zip
Pica: Rename VertexLoaded breakpoint to VertexShaderInvocation
-rw-r--r--src/citra_qt/debugger/graphics_breakpoints.cpp2
-rw-r--r--src/citra_qt/debugger/graphics_vertex_shader.cpp4
-rw-r--r--src/video_core/command_processor.cpp10
-rw-r--r--src/video_core/debug_utils/debug_utils.h2
4 files changed, 8 insertions, 10 deletions
diff --git a/src/citra_qt/debugger/graphics_breakpoints.cpp b/src/citra_qt/debugger/graphics_breakpoints.cpp
index c8510128a..fe66918a8 100644
--- a/src/citra_qt/debugger/graphics_breakpoints.cpp
+++ b/src/citra_qt/debugger/graphics_breakpoints.cpp
@@ -44,7 +44,7 @@ QVariant BreakPointModel::data(const QModelIndex& index, int role) const
44 { Pica::DebugContext::Event::PicaCommandProcessed, tr("Pica command processed") }, 44 { Pica::DebugContext::Event::PicaCommandProcessed, tr("Pica command processed") },
45 { Pica::DebugContext::Event::IncomingPrimitiveBatch, tr("Incoming primitive batch") }, 45 { Pica::DebugContext::Event::IncomingPrimitiveBatch, tr("Incoming primitive batch") },
46 { Pica::DebugContext::Event::FinishedPrimitiveBatch, tr("Finished primitive batch") }, 46 { Pica::DebugContext::Event::FinishedPrimitiveBatch, tr("Finished primitive batch") },
47 { Pica::DebugContext::Event::VertexLoaded, tr("Vertex loaded") }, 47 { Pica::DebugContext::Event::VertexShaderInvocation, tr("Vertex shader invocation") },
48 { Pica::DebugContext::Event::IncomingDisplayTransfer, tr("Incoming display transfer") }, 48 { Pica::DebugContext::Event::IncomingDisplayTransfer, tr("Incoming display transfer") },
49 { Pica::DebugContext::Event::GSPCommandProcessed, tr("GSP command processed") }, 49 { Pica::DebugContext::Event::GSPCommandProcessed, tr("GSP command processed") },
50 { Pica::DebugContext::Event::BufferSwapped, tr("Buffers swapped") } 50 { Pica::DebugContext::Event::BufferSwapped, tr("Buffers swapped") }
diff --git a/src/citra_qt/debugger/graphics_vertex_shader.cpp b/src/citra_qt/debugger/graphics_vertex_shader.cpp
index d648d4640..6e8d7ef42 100644
--- a/src/citra_qt/debugger/graphics_vertex_shader.cpp
+++ b/src/citra_qt/debugger/graphics_vertex_shader.cpp
@@ -365,7 +365,7 @@ GraphicsVertexShaderWidget::GraphicsVertexShaderWidget(std::shared_ptr< Pica::De
365 input_data[i]->setValidator(new QDoubleValidator(input_data[i])); 365 input_data[i]->setValidator(new QDoubleValidator(input_data[i]));
366 } 366 }
367 367
368 breakpoint_warning = new QLabel(tr("(data only available at VertexLoaded breakpoints)")); 368 breakpoint_warning = new QLabel(tr("(data only available at vertex shader invocation breakpoints)"));
369 369
370 // TODO: Add some button for jumping to the shader entry point 370 // TODO: Add some button for jumping to the shader entry point
371 371
@@ -454,7 +454,7 @@ GraphicsVertexShaderWidget::GraphicsVertexShaderWidget(std::shared_ptr< Pica::De
454 454
455void GraphicsVertexShaderWidget::OnBreakPointHit(Pica::DebugContext::Event event, void* data) { 455void GraphicsVertexShaderWidget::OnBreakPointHit(Pica::DebugContext::Event event, void* data) {
456 auto input = static_cast<Pica::Shader::InputVertex*>(data); 456 auto input = static_cast<Pica::Shader::InputVertex*>(data);
457 if (event == Pica::DebugContext::Event::VertexLoaded) { 457 if (event == Pica::DebugContext::Event::VertexShaderInvocation) {
458 Reload(true, data); 458 Reload(true, data);
459 } else { 459 } else {
460 // No vertex data is retrievable => invalidate currently stored vertex data 460 // No vertex data is retrievable => invalidate currently stored vertex data
diff --git a/src/video_core/command_processor.cpp b/src/video_core/command_processor.cpp
index be1a936b2..dd1379503 100644
--- a/src/video_core/command_processor.cpp
+++ b/src/video_core/command_processor.cpp
@@ -146,10 +146,9 @@ static void WritePicaReg(u32 id, u32 value, u32 mask) {
146 Shader::UnitState<false> shader_unit; 146 Shader::UnitState<false> shader_unit;
147 Shader::Setup(); 147 Shader::Setup();
148 148
149 if (g_debug_context)
150 g_debug_context->OnEvent(DebugContext::Event::VertexLoaded, static_cast<void*>(&immediate_input));
151
152 // Send to vertex shader 149 // Send to vertex shader
150 if (g_debug_context)
151 g_debug_context->OnEvent(DebugContext::Event::VertexShaderInvocation, static_cast<void*>(&immediate_input));
153 Shader::OutputVertex output = Shader::Run(shader_unit, immediate_input, regs.vs.num_input_attributes+1); 152 Shader::OutputVertex output = Shader::Run(shader_unit, immediate_input, regs.vs.num_input_attributes+1);
154 153
155 // Send to renderer 154 // Send to renderer
@@ -272,10 +271,9 @@ static void WritePicaReg(u32 id, u32 value, u32 mask) {
272 Shader::InputVertex input; 271 Shader::InputVertex input;
273 loader.LoadVertex(base_address, index, vertex, input, memory_accesses); 272 loader.LoadVertex(base_address, index, vertex, input, memory_accesses);
274 273
275 if (g_debug_context)
276 g_debug_context->OnEvent(DebugContext::Event::VertexLoaded, (void*)&input);
277
278 // Send to vertex shader 274 // Send to vertex shader
275 if (g_debug_context)
276 g_debug_context->OnEvent(DebugContext::Event::VertexShaderInvocation, (void*)&input);
279 output = Shader::Run(shader_unit, input, loader.GetNumTotalAttributes()); 277 output = Shader::Run(shader_unit, input, loader.GetNumTotalAttributes());
280 278
281 if (is_indexed) { 279 if (is_indexed) {
diff --git a/src/video_core/debug_utils/debug_utils.h b/src/video_core/debug_utils/debug_utils.h
index be2d0301a..f628292a4 100644
--- a/src/video_core/debug_utils/debug_utils.h
+++ b/src/video_core/debug_utils/debug_utils.h
@@ -40,7 +40,7 @@ public:
40 PicaCommandProcessed, 40 PicaCommandProcessed,
41 IncomingPrimitiveBatch, 41 IncomingPrimitiveBatch,
42 FinishedPrimitiveBatch, 42 FinishedPrimitiveBatch,
43 VertexLoaded, 43 VertexShaderInvocation,
44 IncomingDisplayTransfer, 44 IncomingDisplayTransfer,
45 GSPCommandProcessed, 45 GSPCommandProcessed,
46 BufferSwapped, 46 BufferSwapped,