aboutsummaryrefslogtreecommitdiff
path: root/src/video_core/command_processor.cpp
diff options
context:
space:
mode:
authorYuri Kunde Schlesner <yuriks@yuriks.net>2016-12-18 16:50:04 -0800
committerYuri Kunde Schlesner <yuriks@yuriks.net>2017-01-29 21:31:36 -0800
commite05770fec4b06cfbd758e8d524435140fb15672a (patch)
treed8571b169b586691f135908ce72aa29ca0c9767f /src/video_core/command_processor.cpp
parenta4a4b6408c32bf9af80d2fe7f131a24c07d9bac6 (diff)
VideoCore: Use correct register for immediate mode attribute count
Diffstat (limited to 'src/video_core/command_processor.cpp')
-rw-r--r--src/video_core/command_processor.cpp13
1 files changed, 7 insertions, 6 deletions
diff --git a/src/video_core/command_processor.cpp b/src/video_core/command_processor.cpp
index 45b994b463..27b7a023f0 100644
--- a/src/video_core/command_processor.cpp
+++ b/src/video_core/command_processor.cpp
@@ -128,17 +128,18 @@ static void WritePicaReg(u32 id, u32 value, u32 mask) {
g_state.input_default_attributes.attr[setup.index] = attribute;
setup.index++;
} else {
- // Put each attribute into an immediate input buffer.
- // When all specified immediate attributes are present, the Vertex Shader is invoked
- // and everything is
- // sent to the primitive assembler.
+ // Put each attribute into an immediate input buffer. When all specified immediate
+ // attributes are present, the Vertex Shader is invoked and everything is sent to
+ // the primitive assembler.
auto& immediate_input = g_state.immediate.input_vertex;
auto& immediate_attribute_id = g_state.immediate.current_attribute;
- immediate_input.attr[immediate_attribute_id++] = attribute;
+ immediate_input.attr[immediate_attribute_id] = attribute;
- if (immediate_attribute_id > regs.vs.max_input_attribute_index) {
+ if (immediate_attribute_id < regs.max_input_attrib_index) {
+ immediate_attribute_id += 1;
+ } else {
MICROPROFILE_SCOPE(GPU_Drawing);
immediate_attribute_id = 0;