swr/rast: early exit on empty triangle mask
authorAlok Hota <alok.hota@intel.com>
Wed, 12 Sep 2018 19:18:28 +0000 (14:18 -0500)
committerAlok Hota <alok.hota@intel.com>
Tue, 30 Apr 2019 19:48:12 +0000 (19:48 +0000)
Reviewed-by: Bruce Cherniak <bruce.cherniak@intel.com>
src/gallium/drivers/swr/rasterizer/core/binner.cpp

index 7731e997ea5142d96bbcd9b06091f5fd0670cac0..6dc703c3fa8c264366f3585947e2875ec2f626a5 100644 (file)
@@ -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)
     {