swr: [rasterizer core] apply KNOB_TOSS_DRAW to more functions
authorTim Rowley <timothy.o.rowley@intel.com>
Wed, 11 May 2016 22:51:11 +0000 (16:51 -0600)
committerTim Rowley <timothy.o.rowley@intel.com>
Thu, 19 May 2016 21:27:06 +0000 (16:27 -0500)
Reviewed-by: Bruce Cherniak <bruce.cherniak@intel.com>
src/gallium/drivers/swr/rasterizer/core/api.cpp

index 9d6f2509b14f91a184b76719db009e82982b8d70..8e0c1e1d2d818d24becca815d5566f21316c28c7 100644 (file)
@@ -1281,6 +1281,11 @@ void SwrInvalidateTiles(
     HANDLE hContext,
     uint32_t attachmentMask)
 {
+    if (KNOB_TOSS_DRAW)
+    {
+        return;
+    }
+
     SWR_CONTEXT *pContext = (SWR_CONTEXT*)hContext;
     DRAW_CONTEXT* pDC = GetDrawContext(pContext);
 
@@ -1306,6 +1311,11 @@ void SwrDiscardRect(
     uint32_t attachmentMask,
     SWR_RECT rect)
 {
+    if (KNOB_TOSS_DRAW)
+    {
+        return;
+    }
+
     SWR_CONTEXT *pContext = (SWR_CONTEXT*)hContext;
     DRAW_CONTEXT* pDC = GetDrawContext(pContext);
 
@@ -1367,6 +1377,11 @@ void SwrStoreTiles(
     SWR_RENDERTARGET_ATTACHMENT attachment,
     SWR_TILE_STATE postStoreTileState)
 {
+    if (KNOB_TOSS_DRAW)
+    {
+        return;
+    }
+
     RDTSC_START(APIStoreTiles);
 
     SWR_CONTEXT *pContext = (SWR_CONTEXT*)hContext;
@@ -1392,6 +1407,11 @@ void SwrClearRenderTarget(
     float z,
     uint8_t stencil)
 {
+    if (KNOB_TOSS_DRAW)
+    {
+        return;
+    }
+
     RDTSC_START(APIClearRenderTarget);
 
     SWR_CONTEXT *pContext = (SWR_CONTEXT*)hContext;