From: Tim Rowley Date: Thu, 8 Jun 2017 19:44:32 +0000 (-0500) Subject: swr/rast: Don't transition hottile resolved->dirty during store tiles X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=bea00a7b6ef9483f7ced507df863259e89c8c09c;p=mesa.git swr/rast: Don't transition hottile resolved->dirty during store tiles Fixes crash when dumping render targets and RT surface has been deleted. Reviewed-by: Bruce Cherniak --- diff --git a/src/gallium/drivers/swr/rasterizer/core/backend.cpp b/src/gallium/drivers/swr/rasterizer/core/backend.cpp index ca9a8b40449..524c4f4e609 100644 --- a/src/gallium/drivers/swr/rasterizer/core/backend.cpp +++ b/src/gallium/drivers/swr/rasterizer/core/backend.cpp @@ -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);