aboutsummaryrefslogtreecommitdiff
path: root/src/video_core/command_processor.cpp
diff options
context:
space:
mode:
authorSubv <subv2112@gmail.com>2015-08-22 22:09:00 -0500
committerSubv <subv2112@gmail.com>2015-08-30 15:46:22 -0500
commitad611383598387f16f4813654582b8d54f355c94 (patch)
treed32924931af8a39c0c11f4fd485bfc386e7300d8 /src/video_core/command_processor.cpp
parent5fb9c48f7ee208334672bac5bb00e8d3b876b0a8 (diff)
GPU: Implemented register 0x22A.
This is the equivalent of the "first" parameter in glDrawArrays, it tells the GPU the vertex index at which to start rendering. Register 0x22A doesn't affect indexed rendering.
Diffstat (limited to 'src/video_core/command_processor.cpp')
-rw-r--r--src/video_core/command_processor.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/video_core/command_processor.cpp b/src/video_core/command_processor.cpp
index d82e20f86f..bfce080bb0 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) {
for (unsigned int index = 0; index < regs.num_vertices; ++index)
{
- unsigned int vertex = is_indexed ? (index_u16 ? index_address_16[index] : index_address_8[index]) : index;
+ // Indexed rendering doesn't use the start offset
+ unsigned int vertex = is_indexed ? (index_u16 ? index_address_16[index] : index_address_8[index]) : (index + regs.vertex_offset);
// -1 is a common special value used for primitive restart. Since it's unknown if
// the PICA supports it, and it would mess up the caching, guard against it here.