Fixed bug in SurfIsOffscreen.

This function is called by the frontend but it uses backend functionality to tesselate geometry.
It didn't clean up genereated tess data so backend received unnecessary,
geometry to render. It wasn't visible since viewport dimensions defaulted to zero values still
vulkan validation layer detected invalid vkCmdSetViewport parameters.
This commit is contained in:
Artem Kharytoniuk 2017-04-28 21:10:42 +03:00
parent 73e2be0447
commit e3ff14bda1

View File

@ -854,6 +854,7 @@ static qboolean SurfIsOffscreen( const drawSurf_t *drawSurf, vec4_t clipDest[128
// trivially reject // trivially reject
if ( pointAnd ) if ( pointAnd )
{ {
tess.numIndexes = 0;
return qtrue; return qtrue;
} }
@ -883,6 +884,7 @@ static qboolean SurfIsOffscreen( const drawSurf_t *drawSurf, vec4_t clipDest[128
numTriangles--; numTriangles--;
} }
} }
tess.numIndexes = 0;
if ( !numTriangles ) if ( !numTriangles )
{ {
return qtrue; return qtrue;