summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGravatar bunnei2015-08-30 17:12:33 -0400
committerGravatar bunnei2015-08-30 17:12:33 -0400
commite77dc4e9d2d43ec739c95dd4b92d6a404277b241 (patch)
tree2aad23d2573e24d8c290383cc116535716ef1632 /src
parentMerge pull request #1085 from Subv/fs_stat (diff)
parentGPU: Implemented register 0x22A. (diff)
downloadyuzu-e77dc4e9d2d43ec739c95dd4b92d6a404277b241.tar.gz
yuzu-e77dc4e9d2d43ec739c95dd4b92d6a404277b241.tar.xz
yuzu-e77dc4e9d2d43ec739c95dd4b92d6a404277b241.zip
Merge pull request #1059 from Subv/vertex_offset
GPU: Implemented register 0x22A PICA_REG_DRAW_VERTEX_OFFSET
Diffstat (limited to 'src')
-rw-r--r--src/video_core/command_processor.cpp3
-rw-r--r--src/video_core/pica.h7
2 files changed, 8 insertions, 2 deletions
diff --git a/src/video_core/command_processor.cpp b/src/video_core/command_processor.cpp
index a78985510..682be89ec 100644
--- a/src/video_core/command_processor.cpp
+++ b/src/video_core/command_processor.cpp
@@ -235,7 +235,8 @@ static void WritePicaReg(u32 id, u32 value, u32 mask) {
235 235
236 for (unsigned int index = 0; index < regs.num_vertices; ++index) 236 for (unsigned int index = 0; index < regs.num_vertices; ++index)
237 { 237 {
238 unsigned int vertex = is_indexed ? (index_u16 ? index_address_16[index] : index_address_8[index]) : index; 238 // Indexed rendering doesn't use the start offset
239 unsigned int vertex = is_indexed ? (index_u16 ? index_address_16[index] : index_address_8[index]) : (index + regs.vertex_offset);
239 240
240 // -1 is a common special value used for primitive restart. Since it's unknown if 241 // -1 is a common special value used for primitive restart. Since it's unknown if
241 // the PICA supports it, and it would mess up the caching, guard against it here. 242 // 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 f40684d83..5811eb9bc 100644
--- a/src/video_core/pica.h
+++ b/src/video_core/pica.h
@@ -769,7 +769,12 @@ struct Regs {
769 // Number of vertices to render 769 // Number of vertices to render
770 u32 num_vertices; 770 u32 num_vertices;
771 771
772 INSERT_PADDING_WORDS(0x5); 772 INSERT_PADDING_WORDS(0x1);
773
774 // The index of the first vertex to render
775 u32 vertex_offset;
776
777 INSERT_PADDING_WORDS(0x3);
773 778
774 // These two trigger rendering of triangles 779 // These two trigger rendering of triangles
775 u32 trigger_draw; 780 u32 trigger_draw;