From 93af69709273767665704bcbf2913e3b29c093ed Mon Sep 17 00:00:00 2001 From: Luke Benstead Date: Thu, 6 Sep 2018 20:00:18 +0100 Subject: [PATCH] Don't include the header in startOffset --- GL/draw.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/GL/draw.c b/GL/draw.c index aabfb8f..b6acd16 100644 --- a/GL/draw.c +++ b/GL/draw.c @@ -780,11 +780,12 @@ static void submitVertices(GLenum mode, GLsizei first, GLsizei count, GLenum typ /* Make room in the list buffer */ GLsizei spaceNeeded = (mode == GL_POLYGON || mode == GL_TRIANGLE_FAN) ? ((count - 2) * 3) : count; ClipVertex* start = aligned_vector_extend(&activeList->vector, spaceNeeded + 1); - uint32_t startOffset = start - (ClipVertex*) activeList->vector.data; /* Store a pointer to the header for later */ PVRHeader* header = (PVRHeader*) start++; + uint32_t startOffset = start - (ClipVertex*) activeList->vector.data; + profiler_checkpoint("allocate"); generate(start, mode, first, count, (GLubyte*) indices, type, doTexture, doMultitexture, doLighting);