From: Alok Hota Date: Wed, 12 Sep 2018 19:18:28 +0000 (-0500) Subject: swr/rast: early exit on empty triangle mask X-Git-Tag: upstream/19.3.0~6760 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=4c68acba3749b84c95c0e8751a00eeb1e820d6f4;p=platform%2Fupstream%2Fmesa.git swr/rast: early exit on empty triangle mask Reviewed-by: Bruce Cherniak --- diff --git a/src/gallium/drivers/swr/rasterizer/core/binner.cpp b/src/gallium/drivers/swr/rasterizer/core/binner.cpp index 7731e99..6dc703c 100644 --- a/src/gallium/drivers/swr/rasterizer/core/binner.cpp +++ b/src/gallium/drivers/swr/rasterizer/core/binner.cpp @@ -1027,6 +1027,12 @@ void SIMDCALL BinTrianglesImpl(DRAW_CONTEXT* pDC, endBinTriangles: + if (!triMask) + { + RDTSC_END(FEBinTriangles, 1); + return; + } + // Send surviving triangles to the line or point binner based on fill mode if (rastState.fillMode == SWR_FILLMODE_WIREFRAME) {