From: Alok Hota Date: Wed, 12 Sep 2018 19:18:28 +0000 (-0500) Subject: swr/rast: early exit on empty triangle mask X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=4c68acba3749b84c95c0e8751a00eeb1e820d6f4;p=mesa.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 7731e997ea5..6dc703c3fa8 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) {