summaryrefslogtreecommitdiff
path: root/Source/Core/VideoCommon/Src/IndexGenerator.cpp
diff options
context:
space:
mode:
authordegasus <wickmarkus@web.de>2013-03-23 00:18:35 +0100
committerdegasus <wickmarkus@web.de>2013-03-23 00:18:35 +0100
commit470c9ff08a79514f70666b0077ef5d2bedab8b3c (patch)
treefd99dffbe327ccb9e8ff0ae95dec44b862bdf247 /Source/Core/VideoCommon/Src/IndexGenerator.cpp
parent59b360028404050b5e31de2c9618cb855917cad9 (diff)
check for overflow vertex indices, fixes issue 6135
thx @ JMC47 for identifying the reversion, creating a useful bug report with fifo log :-)
Diffstat (limited to 'Source/Core/VideoCommon/Src/IndexGenerator.cpp')
-rw-r--r--Source/Core/VideoCommon/Src/IndexGenerator.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/Source/Core/VideoCommon/Src/IndexGenerator.cpp b/Source/Core/VideoCommon/Src/IndexGenerator.cpp
index 4e44fd8997..aa1a971687 100644
--- a/Source/Core/VideoCommon/Src/IndexGenerator.cpp
+++ b/Source/Core/VideoCommon/Src/IndexGenerator.cpp
@@ -166,3 +166,10 @@ void IndexGenerator::AddPoints(u32 numVerts)
++numP;
}
}
+
+
+u32 IndexGenerator::GetRemainingIndices()
+{
+ u32 max_index = 65535;
+ return max_index - index;
+}