diff options
| author | 2017-02-04 13:02:48 -0800 | |
|---|---|---|
| committer | 2017-02-04 13:02:48 -0800 | |
| commit | 97e06b0a0daccd3347ae1bcaf294093b5af32e85 (patch) | |
| tree | 59e1997c90558f58f7368d6974c355e1f20d8f32 /src/citra_qt/debugger | |
| parent | Merge pull request #2414 from yuriks/texture-decode (diff) | |
| parent | VideoCore: Make PrimitiveAssembler const-correct (diff) | |
| download | yuzu-97e06b0a0daccd3347ae1bcaf294093b5af32e85.tar.gz yuzu-97e06b0a0daccd3347ae1bcaf294093b5af32e85.tar.xz yuzu-97e06b0a0daccd3347ae1bcaf294093b5af32e85.zip | |
Merge pull request #2476 from yuriks/shader-refactor3
Oh No! More shader changes!
Diffstat (limited to 'src/citra_qt/debugger')
| -rw-r--r-- | src/citra_qt/debugger/graphics/graphics_tracing.cpp | 4 | ||||
| -rw-r--r-- | src/citra_qt/debugger/graphics/graphics_vertex_shader.cpp | 6 | ||||
| -rw-r--r-- | src/citra_qt/debugger/graphics/graphics_vertex_shader.h | 2 |
3 files changed, 6 insertions, 6 deletions
diff --git a/src/citra_qt/debugger/graphics/graphics_tracing.cpp b/src/citra_qt/debugger/graphics/graphics_tracing.cpp index 716ed50b8..17f1c5ce2 100644 --- a/src/citra_qt/debugger/graphics/graphics_tracing.cpp +++ b/src/citra_qt/debugger/graphics/graphics_tracing.cpp | |||
| @@ -71,8 +71,8 @@ void GraphicsTracingWidget::StartRecording() { | |||
| 71 | std::array<u32, 4 * 16> default_attributes; | 71 | std::array<u32, 4 * 16> default_attributes; |
| 72 | for (unsigned i = 0; i < 16; ++i) { | 72 | for (unsigned i = 0; i < 16; ++i) { |
| 73 | for (unsigned comp = 0; comp < 3; ++comp) { | 73 | for (unsigned comp = 0; comp < 3; ++comp) { |
| 74 | default_attributes[4 * i + comp] = | 74 | default_attributes[4 * i + comp] = nihstro::to_float24( |
| 75 | nihstro::to_float24(Pica::g_state.vs_default_attributes[i][comp].ToFloat32()); | 75 | Pica::g_state.input_default_attributes.attr[i][comp].ToFloat32()); |
| 76 | } | 76 | } |
| 77 | } | 77 | } |
| 78 | 78 | ||
diff --git a/src/citra_qt/debugger/graphics/graphics_vertex_shader.cpp b/src/citra_qt/debugger/graphics/graphics_vertex_shader.cpp index f37524190..489ec5f21 100644 --- a/src/citra_qt/debugger/graphics/graphics_vertex_shader.cpp +++ b/src/citra_qt/debugger/graphics/graphics_vertex_shader.cpp | |||
| @@ -511,7 +511,7 @@ void GraphicsVertexShaderWidget::Reload(bool replace_vertex_data, void* vertex_d | |||
| 511 | auto& shader_config = Pica::g_state.regs.vs; | 511 | auto& shader_config = Pica::g_state.regs.vs; |
| 512 | for (auto instr : shader_setup.program_code) | 512 | for (auto instr : shader_setup.program_code) |
| 513 | info.code.push_back({instr}); | 513 | info.code.push_back({instr}); |
| 514 | int num_attributes = Pica::g_state.regs.vertex_attributes.GetNumTotalAttributes(); | 514 | int num_attributes = shader_config.max_input_attribute_index + 1; |
| 515 | 515 | ||
| 516 | for (auto pattern : shader_setup.swizzle_data) | 516 | for (auto pattern : shader_setup.swizzle_data) |
| 517 | info.swizzle_info.push_back({pattern}); | 517 | info.swizzle_info.push_back({pattern}); |
| @@ -522,11 +522,11 @@ void GraphicsVertexShaderWidget::Reload(bool replace_vertex_data, void* vertex_d | |||
| 522 | // Generate debug information | 522 | // Generate debug information |
| 523 | Pica::Shader::InterpreterEngine shader_engine; | 523 | Pica::Shader::InterpreterEngine shader_engine; |
| 524 | shader_engine.SetupBatch(shader_setup, entry_point); | 524 | shader_engine.SetupBatch(shader_setup, entry_point); |
| 525 | debug_data = shader_engine.ProduceDebugInfo(shader_setup, input_vertex, num_attributes); | 525 | debug_data = shader_engine.ProduceDebugInfo(shader_setup, input_vertex, shader_config); |
| 526 | 526 | ||
| 527 | // Reload widget state | 527 | // Reload widget state |
| 528 | for (int attr = 0; attr < num_attributes; ++attr) { | 528 | for (int attr = 0; attr < num_attributes; ++attr) { |
| 529 | unsigned source_attr = shader_config.input_register_map.GetRegisterForAttribute(attr); | 529 | unsigned source_attr = shader_config.GetRegisterForAttribute(attr); |
| 530 | input_data_mapping[attr]->setText(QString("-> v%1").arg(source_attr)); | 530 | input_data_mapping[attr]->setText(QString("-> v%1").arg(source_attr)); |
| 531 | input_data_container[attr]->setVisible(true); | 531 | input_data_container[attr]->setVisible(true); |
| 532 | } | 532 | } |
diff --git a/src/citra_qt/debugger/graphics/graphics_vertex_shader.h b/src/citra_qt/debugger/graphics/graphics_vertex_shader.h index 3292573f3..c249a2ff8 100644 --- a/src/citra_qt/debugger/graphics/graphics_vertex_shader.h +++ b/src/citra_qt/debugger/graphics/graphics_vertex_shader.h | |||
| @@ -82,7 +82,7 @@ private: | |||
| 82 | 82 | ||
| 83 | nihstro::ShaderInfo info; | 83 | nihstro::ShaderInfo info; |
| 84 | Pica::Shader::DebugData<true> debug_data; | 84 | Pica::Shader::DebugData<true> debug_data; |
| 85 | Pica::Shader::InputVertex input_vertex; | 85 | Pica::Shader::AttributeBuffer input_vertex; |
| 86 | 86 | ||
| 87 | friend class GraphicsVertexShaderModel; | 87 | friend class GraphicsVertexShaderModel; |
| 88 | }; | 88 | }; |