diff options
author | Yuri Kunde Schlesner <yuriks@yuriks.net> | 2015-08-25 07:36:57 +0200 |
---|---|---|
committer | Yuri Kunde Schlesner <yuriks@yuriks.net> | 2015-09-07 21:46:29 +0200 |
commit | f77dfb3966f9f0aad09e54e77fff6ea2256e114d (patch) | |
tree | 25e17a80201a6adf2c6c36471bd92e6034421bcd /src/citra_qt/debugger/graphics_vertex_shader.cpp | |
parent | Shader Debugger: Fix freeze when double-clicking shader disassembly (diff) | |
download | yuzu-f77dfb3966f9f0aad09e54e77fff6ea2256e114d.tar yuzu-f77dfb3966f9f0aad09e54e77fff6ea2256e114d.tar.gz yuzu-f77dfb3966f9f0aad09e54e77fff6ea2256e114d.tar.bz2 yuzu-f77dfb3966f9f0aad09e54e77fff6ea2256e114d.tar.lz yuzu-f77dfb3966f9f0aad09e54e77fff6ea2256e114d.tar.xz yuzu-f77dfb3966f9f0aad09e54e77fff6ea2256e114d.tar.zst yuzu-f77dfb3966f9f0aad09e54e77fff6ea2256e114d.zip |
Diffstat (limited to '')
-rw-r--r-- | src/citra_qt/debugger/graphics_vertex_shader.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/citra_qt/debugger/graphics_vertex_shader.cpp b/src/citra_qt/debugger/graphics_vertex_shader.cpp index a94538874..831ead51a 100644 --- a/src/citra_qt/debugger/graphics_vertex_shader.cpp +++ b/src/citra_qt/debugger/graphics_vertex_shader.cpp @@ -475,6 +475,7 @@ void GraphicsVertexShaderWidget::Reload(bool replace_vertex_data, void* vertex_d auto& shader_config = Pica::g_state.regs.vs; for (auto instr : shader_setup.program_code) info.code.push_back({instr}); + int num_attributes = Pica::g_state.regs.vertex_attributes.GetNumTotalAttributes(); for (auto pattern : shader_setup.swizzle_data) info.swizzle_info.push_back({pattern}); @@ -483,19 +484,18 @@ void GraphicsVertexShaderWidget::Reload(bool replace_vertex_data, void* vertex_d info.labels.insert({ entry_point, "main" }); // Generate debug information - debug_data = Pica::Shader::ProduceDebugInfo(input_vertex, 1, shader_config, shader_setup); + debug_data = Pica::Shader::ProduceDebugInfo(input_vertex, num_attributes, shader_config, shader_setup); // Reload widget state - - // Only show input attributes which are used as input to the shader - for (unsigned int attr = 0; attr < 16; ++attr) { - input_data_container[attr]->setVisible(false); - } - for (unsigned int attr = 0; attr < Pica::g_state.regs.vertex_attributes.GetNumTotalAttributes(); ++attr) { + for (unsigned int attr = 0; attr < num_attributes; ++attr) { unsigned source_attr = shader_config.input_register_map.GetRegisterForAttribute(attr); input_data_mapping[source_attr]->setText(QString("-> v%1").arg(attr)); input_data_container[source_attr]->setVisible(true); } + // Only show input attributes which are used as input to the shader + for (unsigned int attr = num_attributes; attr < 16; ++attr) { + input_data_container[attr]->setVisible(false); + } // Initialize debug info text for current cycle count cycle_index->setMaximum(debug_data.records.size() - 1); |