diff options
author | Yuri Kunde Schlesner <yuriks@yuriks.net> | 2016-12-19 01:50:04 +0100 |
---|---|---|
committer | Yuri Kunde Schlesner <yuriks@yuriks.net> | 2017-01-30 06:31:36 +0100 |
commit | fccb28d2e9f2f813230912e5cf1fea7f352797c7 (patch) | |
tree | d8571b169b586691f135908ce72aa29ca0c9767f /src/video_core | |
parent | VideoCore: Rename some types to more accurate names (diff) | |
download | yuzu-fccb28d2e9f2f813230912e5cf1fea7f352797c7.tar yuzu-fccb28d2e9f2f813230912e5cf1fea7f352797c7.tar.gz yuzu-fccb28d2e9f2f813230912e5cf1fea7f352797c7.tar.bz2 yuzu-fccb28d2e9f2f813230912e5cf1fea7f352797c7.tar.lz yuzu-fccb28d2e9f2f813230912e5cf1fea7f352797c7.tar.xz yuzu-fccb28d2e9f2f813230912e5cf1fea7f352797c7.tar.zst yuzu-fccb28d2e9f2f813230912e5cf1fea7f352797c7.zip |
Diffstat (limited to 'src/video_core')
-rw-r--r-- | src/video_core/command_processor.cpp | 13 | ||||
-rw-r--r-- | src/video_core/pica.h | 7 |
2 files changed, 13 insertions, 7 deletions
diff --git a/src/video_core/command_processor.cpp b/src/video_core/command_processor.cpp index 45b994b46..27b7a023f 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; diff --git a/src/video_core/pica.h b/src/video_core/pica.h index 5afc9d5dd..c772896e0 100644 --- a/src/video_core/pica.h +++ b/src/video_core/pica.h @@ -1176,7 +1176,12 @@ struct Regs { } } command_buffer; - INSERT_PADDING_WORDS(0x07); + INSERT_PADDING_WORDS(4); + + /// Number of input attributes to the vertex shader minus 1 + BitField<0, 4, u32> max_input_attrib_index; + + INSERT_PADDING_WORDS(2); enum class GPUMode : u32 { Drawing = 0, |