diff options
Diffstat (limited to 'src/renderergl2/tr_surface.c')
-rw-r--r-- | src/renderergl2/tr_surface.c | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/src/renderergl2/tr_surface.c b/src/renderergl2/tr_surface.c index b74ba369..a07484ca 100644 --- a/src/renderergl2/tr_surface.c +++ b/src/renderergl2/tr_surface.c @@ -442,7 +442,7 @@ static qboolean RB_SurfaceVao(vao_t *vao, int numVerts, int numIndexes, int firs for (; i < tess.multiDrawPrimitives; i++) { - if (tess.multiDrawLastIndex[i] == firstIndexOffset) + if (firstIndexOffset == tess.multiDrawFirstIndex[i] + tess.multiDrawNumIndexes[i]) { mergeBack = i; @@ -463,7 +463,6 @@ static qboolean RB_SurfaceVao(vao_t *vao, int numVerts, int numIndexes, int firs if (mergeBack != -1 && mergeForward == -1) { tess.multiDrawNumIndexes[mergeBack] += numIndexes; - tess.multiDrawLastIndex[mergeBack] = tess.multiDrawFirstIndex[mergeBack] + tess.multiDrawNumIndexes[mergeBack]; tess.multiDrawMinIndex[mergeBack] = MIN(tess.multiDrawMinIndex[mergeBack], minIndex); tess.multiDrawMaxIndex[mergeBack] = MAX(tess.multiDrawMaxIndex[mergeBack], maxIndex); backEnd.pc.c_multidrawsMerged++; @@ -472,7 +471,6 @@ static qboolean RB_SurfaceVao(vao_t *vao, int numVerts, int numIndexes, int firs { tess.multiDrawNumIndexes[mergeForward] += numIndexes; tess.multiDrawFirstIndex[mergeForward] = firstIndexOffset; - tess.multiDrawLastIndex[mergeForward] = tess.multiDrawFirstIndex[mergeForward] + tess.multiDrawNumIndexes[mergeForward]; tess.multiDrawMinIndex[mergeForward] = MIN(tess.multiDrawMinIndex[mergeForward], minIndex); tess.multiDrawMaxIndex[mergeForward] = MAX(tess.multiDrawMaxIndex[mergeForward], maxIndex); backEnd.pc.c_multidrawsMerged++; @@ -480,7 +478,6 @@ static qboolean RB_SurfaceVao(vao_t *vao, int numVerts, int numIndexes, int firs else if (mergeBack != -1 && mergeForward != -1) { tess.multiDrawNumIndexes[mergeBack] += numIndexes + tess.multiDrawNumIndexes[mergeForward]; - tess.multiDrawLastIndex[mergeBack] = tess.multiDrawFirstIndex[mergeForward] + tess.multiDrawNumIndexes[mergeForward]; tess.multiDrawMinIndex[mergeBack] = MIN(tess.multiDrawMinIndex[mergeBack], MIN(tess.multiDrawMinIndex[mergeForward], minIndex)); tess.multiDrawMaxIndex[mergeBack] = MAX(tess.multiDrawMaxIndex[mergeBack], MAX(tess.multiDrawMaxIndex[mergeForward], maxIndex)); tess.multiDrawPrimitives--; @@ -489,7 +486,6 @@ static qboolean RB_SurfaceVao(vao_t *vao, int numVerts, int numIndexes, int firs { tess.multiDrawNumIndexes[mergeForward] = tess.multiDrawNumIndexes[tess.multiDrawPrimitives]; tess.multiDrawFirstIndex[mergeForward] = tess.multiDrawFirstIndex[tess.multiDrawPrimitives]; - tess.multiDrawLastIndex[mergeForward] = tess.multiDrawLastIndex[tess.multiDrawPrimitives]; tess.multiDrawMinIndex[mergeForward] = tess.multiDrawMinIndex[tess.multiDrawPrimitives]; tess.multiDrawMaxIndex[mergeForward] = tess.multiDrawMaxIndex[tess.multiDrawPrimitives]; } @@ -499,7 +495,6 @@ static qboolean RB_SurfaceVao(vao_t *vao, int numVerts, int numIndexes, int firs { tess.multiDrawNumIndexes[tess.multiDrawPrimitives] = numIndexes; tess.multiDrawFirstIndex[tess.multiDrawPrimitives] = firstIndexOffset; - tess.multiDrawLastIndex[tess.multiDrawPrimitives] = lastIndexOffset; tess.multiDrawMinIndex[tess.multiDrawPrimitives] = minIndex; tess.multiDrawMaxIndex[tess.multiDrawPrimitives] = maxIndex; tess.multiDrawPrimitives++; |