swr/rast: update guardband rects at draw setup
authorAlok Hota <alok.hota@intel.com>
Wed, 13 Jun 2018 20:14:16 +0000 (15:14 -0500)
committerAlok Hota <alok.hota@intel.com>
Tue, 30 Apr 2019 19:48:12 +0000 (19:48 +0000)
It's dependent on other state fields

Reviewed-by: Bruce Cherniak <bruce.cherniak@intel.com>
src/gallium/drivers/swr/rasterizer/core/api.cpp

index e260c951078aefc61182c6d78e494313f93715fb..04eabc4d468de15eab1ac385f6f6a78b69271899 100644 (file)
@@ -740,8 +740,6 @@ void SwrSetViewports(HANDLE                       hContext,
     memcpy(&pState->vp[0], pViewports, sizeof(SWR_VIEWPORT) * numViewports);
     // @todo Faster to copy portions of the SOA or just copy all of it?
     memcpy(&pState->vpMatrices, pMatrices, sizeof(SWR_VIEWPORT_MATRICES));
-
-    updateGuardbands(pState);
 }
 
 void SwrSetScissorRects(HANDLE hContext, uint32_t numScissors, const SWR_RECT* pScissors)
@@ -1050,6 +1048,9 @@ void SetupPipeline(DRAW_CONTEXT* pDC)
         // set up pass-through quantize if depth isn't enabled
         pState->state.pfnQuantizeDepth = QuantizeDepth<R32_FLOAT>;
     }
+
+    // Generate guardbands
+    updateGuardbands(&pState->state);
 }
 
 //////////////////////////////////////////////////////////////////////////