diff options
Diffstat (limited to 'src/video_core')
| -rw-r--r-- | src/video_core/command_processor.cpp | 3 | ||||
| -rw-r--r-- | src/video_core/pica.h | 7 |
2 files changed, 8 insertions, 2 deletions
diff --git a/src/video_core/command_processor.cpp b/src/video_core/command_processor.cpp index d82e20f86..bfce080bb 100644 --- a/src/video_core/command_processor.cpp +++ b/src/video_core/command_processor.cpp | |||
| @@ -231,7 +231,8 @@ static void WritePicaReg(u32 id, u32 value, u32 mask) { | |||
| 231 | 231 | ||
| 232 | for (unsigned int index = 0; index < regs.num_vertices; ++index) | 232 | for (unsigned int index = 0; index < regs.num_vertices; ++index) |
| 233 | { | 233 | { |
| 234 | unsigned int vertex = is_indexed ? (index_u16 ? index_address_16[index] : index_address_8[index]) : index; | 234 | // Indexed rendering doesn't use the start offset |
| 235 | unsigned int vertex = is_indexed ? (index_u16 ? index_address_16[index] : index_address_8[index]) : (index + regs.vertex_offset); | ||
| 235 | 236 | ||
| 236 | // -1 is a common special value used for primitive restart. Since it's unknown if | 237 | // -1 is a common special value used for primitive restart. Since it's unknown if |
| 237 | // the PICA supports it, and it would mess up the caching, guard against it here. | 238 | // the PICA supports it, and it would mess up the caching, guard against it here. |
diff --git a/src/video_core/pica.h b/src/video_core/pica.h index 58b924f9e..03a56afe6 100644 --- a/src/video_core/pica.h +++ b/src/video_core/pica.h | |||
| @@ -757,7 +757,12 @@ struct Regs { | |||
| 757 | // Number of vertices to render | 757 | // Number of vertices to render |
| 758 | u32 num_vertices; | 758 | u32 num_vertices; |
| 759 | 759 | ||
| 760 | INSERT_PADDING_WORDS(0x5); | 760 | INSERT_PADDING_WORDS(0x1); |
| 761 | |||
| 762 | // The index of the first vertex to render | ||
| 763 | u32 vertex_offset; | ||
| 764 | |||
| 765 | INSERT_PADDING_WORDS(0x3); | ||
| 761 | 766 | ||
| 762 | // These two trigger rendering of triangles | 767 | // These two trigger rendering of triangles |
| 763 | u32 trigger_draw; | 768 | u32 trigger_draw; |