diff options
Diffstat (limited to 'src/video_core/shader/shader.cpp')
| -rw-r--r-- | src/video_core/shader/shader.cpp | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/video_core/shader/shader.cpp b/src/video_core/shader/shader.cpp index 971ce5b7a..dbad167e9 100644 --- a/src/video_core/shader/shader.cpp +++ b/src/video_core/shader/shader.cpp | |||
| @@ -71,12 +71,13 @@ OutputVertex OutputVertex::FromRegisters(Math::Vec4<float24> output_regs[16], co | |||
| 71 | return ret; | 71 | return ret; |
| 72 | } | 72 | } |
| 73 | 73 | ||
| 74 | void UnitState::LoadInput(const AttributeBuffer& input, int num_attributes) { | 74 | void UnitState::LoadInput(const Regs::ShaderConfig& config, const AttributeBuffer& input) { |
| 75 | // Setup input register table | 75 | const unsigned max_attribute = config.max_input_attribute_index; |
| 76 | const auto& attribute_register_map = g_state.regs.vs.input_register_map; | ||
| 77 | 76 | ||
| 78 | for (int i = 0; i < num_attributes; i++) | 77 | for (unsigned attr = 0; attr <= max_attribute; ++attr) { |
| 79 | registers.input[attribute_register_map.GetRegisterForAttribute(i)] = input.attr[i]; | 78 | unsigned reg = config.GetRegisterForAttribute(attr); |
| 79 | registers.input[reg] = input.attr[attr]; | ||
| 80 | } | ||
| 80 | } | 81 | } |
| 81 | 82 | ||
| 82 | MICROPROFILE_DEFINE(GPU_Shader, "GPU", "Shader", MP_RGB(50, 50, 240)); | 83 | MICROPROFILE_DEFINE(GPU_Shader, "GPU", "Shader", MP_RGB(50, 50, 240)); |