diff options
| author | 2016-12-18 16:50:04 -0800 | |
|---|---|---|
| committer | 2017-01-29 21:31:36 -0800 | |
| commit | fccb28d2e9f2f813230912e5cf1fea7f352797c7 (patch) | |
| tree | d8571b169b586691f135908ce72aa29ca0c9767f /src | |
| parent | VideoCore: Rename some types to more accurate names (diff) | |
| download | yuzu-fccb28d2e9f2f813230912e5cf1fea7f352797c7.tar.gz yuzu-fccb28d2e9f2f813230912e5cf1fea7f352797c7.tar.xz yuzu-fccb28d2e9f2f813230912e5cf1fea7f352797c7.zip | |
VideoCore: Use correct register for immediate mode attribute count
Diffstat (limited to 'src')
| -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) { | |||
| 128 | g_state.input_default_attributes.attr[setup.index] = attribute; | 128 | g_state.input_default_attributes.attr[setup.index] = attribute; |
| 129 | setup.index++; | 129 | setup.index++; |
| 130 | } else { | 130 | } else { |
| 131 | // Put each attribute into an immediate input buffer. | 131 | // Put each attribute into an immediate input buffer. When all specified immediate |
| 132 | // When all specified immediate attributes are present, the Vertex Shader is invoked | 132 | // attributes are present, the Vertex Shader is invoked and everything is sent to |
| 133 | // and everything is | 133 | // the primitive assembler. |
| 134 | // sent to the primitive assembler. | ||
| 135 | 134 | ||
| 136 | auto& immediate_input = g_state.immediate.input_vertex; | 135 | auto& immediate_input = g_state.immediate.input_vertex; |
| 137 | auto& immediate_attribute_id = g_state.immediate.current_attribute; | 136 | auto& immediate_attribute_id = g_state.immediate.current_attribute; |
| 138 | 137 | ||
| 139 | immediate_input.attr[immediate_attribute_id++] = attribute; | 138 | immediate_input.attr[immediate_attribute_id] = attribute; |
| 140 | 139 | ||
| 141 | if (immediate_attribute_id > regs.vs.max_input_attribute_index) { | 140 | if (immediate_attribute_id < regs.max_input_attrib_index) { |
| 141 | immediate_attribute_id += 1; | ||
| 142 | } else { | ||
| 142 | MICROPROFILE_SCOPE(GPU_Drawing); | 143 | MICROPROFILE_SCOPE(GPU_Drawing); |
| 143 | immediate_attribute_id = 0; | 144 | immediate_attribute_id = 0; |
| 144 | 145 | ||
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 { | |||
| 1176 | } | 1176 | } |
| 1177 | } command_buffer; | 1177 | } command_buffer; |
| 1178 | 1178 | ||
| 1179 | INSERT_PADDING_WORDS(0x07); | 1179 | INSERT_PADDING_WORDS(4); |
| 1180 | |||
| 1181 | /// Number of input attributes to the vertex shader minus 1 | ||
| 1182 | BitField<0, 4, u32> max_input_attrib_index; | ||
| 1183 | |||
| 1184 | INSERT_PADDING_WORDS(2); | ||
| 1180 | 1185 | ||
| 1181 | enum class GPUMode : u32 { | 1186 | enum class GPUMode : u32 { |
| 1182 | Drawing = 0, | 1187 | Drawing = 0, |