diff options
author | Tony Wasserka <NeoBrainX@gmail.com> | 2015-07-12 03:20:19 +0200 |
---|---|---|
committer | Tony Wasserka <NeoBrainX@gmail.com> | 2015-07-13 22:27:21 +0200 |
commit | 29abb11e8fbb6a78edf84496979ef946bf4e45a7 (patch) | |
tree | 9359e9b88f0147879c672638d8c02960d2179d3a /src/citra_qt/debugger/graphics_tracing.cpp | |
parent | CiTrace: Record LCD registers. Cleanup recording code. (diff) | |
download | yuzu-29abb11e8fbb6a78edf84496979ef946bf4e45a7.tar yuzu-29abb11e8fbb6a78edf84496979ef946bf4e45a7.tar.gz yuzu-29abb11e8fbb6a78edf84496979ef946bf4e45a7.tar.bz2 yuzu-29abb11e8fbb6a78edf84496979ef946bf4e45a7.tar.lz yuzu-29abb11e8fbb6a78edf84496979ef946bf4e45a7.tar.xz yuzu-29abb11e8fbb6a78edf84496979ef946bf4e45a7.tar.zst yuzu-29abb11e8fbb6a78edf84496979ef946bf4e45a7.zip |
Diffstat (limited to '')
-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 @@ #include <QPushButton> #include <QSpinBox> +#include <boost/range/algorithm/copy.hpp> + #include "core/hw/gpu.h" #include "core/hw/lcd.h" @@ -76,15 +78,19 @@ void GraphicsTracingWidget::StartRecording() { for (unsigned comp = 0; comp < 3; ++comp) vs_float_uniforms[4 * i + comp] = nihstro::to_float24(Pica::g_state.vs.uniforms.f[i][comp].ToFloat32()); - auto recorder = new CiTrace::Recorder((u32*)&GPU::g_regs, sizeof(GPU::g_regs) / sizeof(u32), - (u32*)&LCD::g_regs, sizeof(LCD::g_regs) / sizeof(u32), - (u32*)&Pica::g_state.regs, sizeof(Pica::g_state.regs) / sizeof(u32), - default_attributes.data(), default_attributes.size(), - shader_binary.data(), shader_binary.size(), - swizzle_data.data(), swizzle_data.size(), - vs_float_uniforms.data(), vs_float_uniforms.size(), - nullptr, 0, nullptr, 0, nullptr, 0 // Geometry shader is not implemented yet, so submit dummy data for now - ); + CiTrace::Recorder::InitialState state; + std::copy_n((u32*)&GPU::g_regs, sizeof(GPU::g_regs) / sizeof(u32), std::back_inserter(state.gpu_registers)); + std::copy_n((u32*)&LCD::g_regs, sizeof(LCD::g_regs) / sizeof(u32), std::back_inserter(state.lcd_registers)); + std::copy_n((u32*)&Pica::g_state.regs, sizeof(Pica::g_state.regs) / sizeof(u32), std::back_inserter(state.pica_registers)); + boost::copy(default_attributes, std::back_inserter(state.default_attributes)); + boost::copy(shader_binary, std::back_inserter(state.vs_program_binary)); + boost::copy(swizzle_data, std::back_inserter(state.vs_swizzle_data)); + boost::copy(vs_float_uniforms, std::back_inserter(state.vs_float_uniforms)); + //boost::copy(TODO: Not implemented, std::back_inserter(state.gs_program_binary)); + //boost::copy(TODO: Not implemented, std::back_inserter(state.gs_swizzle_data)); + //boost::copy(TODO: Not implemented, std::back_inserter(state.gs_float_uniforms)); + + auto recorder = new CiTrace::Recorder(state); context->recorder = std::shared_ptr<CiTrace::Recorder>(recorder); emit SetStartTracingButtonEnabled(false); |