summaryrefslogtreecommitdiffstats
path: root/src/citra_qt/debugger/graphics
diff options
context:
space:
mode:
authorYuri Kunde Schlesner <yuriks@yuriks.net>2016-12-19 02:25:03 +0100
committerYuri Kunde Schlesner <yuriks@yuriks.net>2017-01-30 06:31:37 +0100
commit335df895b9f9e9760ed5cd0d6dfaea8befb94dac (patch)
tree6cd8e76d529d5b4af5f87ef63f617941ced77f3e /src/citra_qt/debugger/graphics
parentVideoCore: Use correct register for immediate mode attribute count (diff)
downloadyuzu-335df895b9f9e9760ed5cd0d6dfaea8befb94dac.tar
yuzu-335df895b9f9e9760ed5cd0d6dfaea8befb94dac.tar.gz
yuzu-335df895b9f9e9760ed5cd0d6dfaea8befb94dac.tar.bz2
yuzu-335df895b9f9e9760ed5cd0d6dfaea8befb94dac.tar.lz
yuzu-335df895b9f9e9760ed5cd0d6dfaea8befb94dac.tar.xz
yuzu-335df895b9f9e9760ed5cd0d6dfaea8befb94dac.tar.zst
yuzu-335df895b9f9e9760ed5cd0d6dfaea8befb94dac.zip
Diffstat (limited to 'src/citra_qt/debugger/graphics')
-rw-r--r--src/citra_qt/debugger/graphics/graphics_vertex_shader.cpp6
1 files changed, 3 insertions, 3 deletions
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
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();
+ int num_attributes = shader_config.max_input_attribute_index + 1;
for (auto pattern : shader_setup.swizzle_data)
info.swizzle_info.push_back({pattern});
@@ -522,11 +522,11 @@ void GraphicsVertexShaderWidget::Reload(bool replace_vertex_data, void* vertex_d
// Generate debug information
Pica::Shader::InterpreterEngine shader_engine;
shader_engine.SetupBatch(shader_setup, entry_point);
- debug_data = shader_engine.ProduceDebugInfo(shader_setup, input_vertex, num_attributes);
+ debug_data = shader_engine.ProduceDebugInfo(shader_setup, input_vertex, shader_config);
// Reload widget state
for (int attr = 0; attr < num_attributes; ++attr) {
- unsigned source_attr = shader_config.input_register_map.GetRegisterForAttribute(attr);
+ unsigned source_attr = shader_config.GetRegisterForAttribute(attr);
input_data_mapping[attr]->setText(QString("-> v%1").arg(source_attr));
input_data_container[attr]->setVisible(true);
}