diff options
Diffstat (limited to 'src/citra_qt/debugger')
| -rw-r--r-- | src/citra_qt/debugger/graphics_tracing.cpp | 24 |
1 files changed, 15 insertions, 9 deletions
diff --git a/src/citra_qt/debugger/graphics_tracing.cpp b/src/citra_qt/debugger/graphics_tracing.cpp index 654df12af..3f20f149d 100644 --- a/src/citra_qt/debugger/graphics_tracing.cpp +++ b/src/citra_qt/debugger/graphics_tracing.cpp | |||
| @@ -12,6 +12,8 @@ | |||
| 12 | #include <QPushButton> | 12 | #include <QPushButton> |
| 13 | #include <QSpinBox> | 13 | #include <QSpinBox> |
| 14 | 14 | ||
| 15 | #include <boost/range/algorithm/copy.hpp> | ||
| 16 | |||
| 15 | #include "core/hw/gpu.h" | 17 | #include "core/hw/gpu.h" |
| 16 | #include "core/hw/lcd.h" | 18 | #include "core/hw/lcd.h" |
| 17 | 19 | ||
| @@ -76,15 +78,19 @@ void GraphicsTracingWidget::StartRecording() { | |||
| 76 | for (unsigned comp = 0; comp < 3; ++comp) | 78 | for (unsigned comp = 0; comp < 3; ++comp) |
| 77 | vs_float_uniforms[4 * i + comp] = nihstro::to_float24(Pica::g_state.vs.uniforms.f[i][comp].ToFloat32()); | 79 | vs_float_uniforms[4 * i + comp] = nihstro::to_float24(Pica::g_state.vs.uniforms.f[i][comp].ToFloat32()); |
| 78 | 80 | ||
| 79 | auto recorder = new CiTrace::Recorder((u32*)&GPU::g_regs, sizeof(GPU::g_regs) / sizeof(u32), | 81 | CiTrace::Recorder::InitialState state; |
| 80 | (u32*)&LCD::g_regs, sizeof(LCD::g_regs) / sizeof(u32), | 82 | std::copy_n((u32*)&GPU::g_regs, sizeof(GPU::g_regs) / sizeof(u32), std::back_inserter(state.gpu_registers)); |
| 81 | (u32*)&Pica::g_state.regs, sizeof(Pica::g_state.regs) / sizeof(u32), | 83 | std::copy_n((u32*)&LCD::g_regs, sizeof(LCD::g_regs) / sizeof(u32), std::back_inserter(state.lcd_registers)); |
| 82 | default_attributes.data(), default_attributes.size(), | 84 | std::copy_n((u32*)&Pica::g_state.regs, sizeof(Pica::g_state.regs) / sizeof(u32), std::back_inserter(state.pica_registers)); |
| 83 | shader_binary.data(), shader_binary.size(), | 85 | boost::copy(default_attributes, std::back_inserter(state.default_attributes)); |
| 84 | swizzle_data.data(), swizzle_data.size(), | 86 | boost::copy(shader_binary, std::back_inserter(state.vs_program_binary)); |
| 85 | vs_float_uniforms.data(), vs_float_uniforms.size(), | 87 | boost::copy(swizzle_data, std::back_inserter(state.vs_swizzle_data)); |
| 86 | nullptr, 0, nullptr, 0, nullptr, 0 // Geometry shader is not implemented yet, so submit dummy data for now | 88 | boost::copy(vs_float_uniforms, std::back_inserter(state.vs_float_uniforms)); |
| 87 | ); | 89 | //boost::copy(TODO: Not implemented, std::back_inserter(state.gs_program_binary)); |
| 90 | //boost::copy(TODO: Not implemented, std::back_inserter(state.gs_swizzle_data)); | ||
| 91 | //boost::copy(TODO: Not implemented, std::back_inserter(state.gs_float_uniforms)); | ||
| 92 | |||
| 93 | auto recorder = new CiTrace::Recorder(state); | ||
| 88 | context->recorder = std::shared_ptr<CiTrace::Recorder>(recorder); | 94 | context->recorder = std::shared_ptr<CiTrace::Recorder>(recorder); |
| 89 | 95 | ||
| 90 | emit SetStartTracingButtonEnabled(false); | 96 | emit SetStartTracingButtonEnabled(false); |