swr/rast: Don't transition hottile resolved->dirty during store tiles
authorTim Rowley <timothy.o.rowley@intel.com>
Thu, 8 Jun 2017 19:44:32 +0000 (14:44 -0500)
committerTim Rowley <timothy.o.rowley@intel.com>
Fri, 16 Jun 2017 21:20:16 +0000 (16:20 -0500)
Fixes crash when dumping render targets and RT surface has been deleted.

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

index ca9a8b404493838db703494a2e84e8732fa7539f..524c4f4e609c8bf5947f16424d7df3a58caf3453 100644 (file)
@@ -386,7 +386,10 @@ void ProcessStoreTileBE(DRAW_CONTEXT *pDC, uint32_t workerId, uint32_t macroTile
 
         if (pHotTile->state == HOTTILE_DIRTY || pHotTile->state == HOTTILE_RESOLVED)
         {
-            pHotTile->state = (HOTTILE_STATE)pDesc->postStoreTileState;
+            if (!(pDesc->postStoreTileState == HOTTILE_DIRTY && pHotTile->state == HOTTILE_RESOLVED))
+            {
+                pHotTile->state = (HOTTILE_STATE)pDesc->postStoreTileState;
+            }
         }
     }
     AR_END(BEStoreTiles, 1);