From 4c68acba3749b84c95c0e8751a00eeb1e820d6f4 Mon Sep 17 00:00:00 2001 From: Alok Hota Date: Wed, 12 Sep 2018 14:18:28 -0500 Subject: [PATCH] swr/rast: early exit on empty triangle mask Reviewed-by: Bruce Cherniak --- src/gallium/drivers/swr/rasterizer/core/binner.cpp | 6 ++++++ 1 file changed, 6 insertions(+) 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) { -- 2.30.2