From: Ilia Mirkin Date: Fri, 18 Nov 2016 15:15:30 +0000 (-0500) Subject: swr: [rasterizer memory] hook up stencil clears for ClearTile X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=2fca08e550ae0c4b036ee8fc34dcf98d45d6bf20;p=mesa.git swr: [rasterizer memory] hook up stencil clears for ClearTile Signed-off-by: Ilia Mirkin Reviewed-by: Tim Rowley --- diff --git a/src/gallium/drivers/swr/rasterizer/memory/ClearTile.cpp b/src/gallium/drivers/swr/rasterizer/memory/ClearTile.cpp index 8501e21eded..31a40a3feea 100644 --- a/src/gallium/drivers/swr/rasterizer/memory/ClearTile.cpp +++ b/src/gallium/drivers/swr/rasterizer/memory/ClearTile.cpp @@ -156,16 +156,19 @@ void StoreHotTileClear( { PFN_STORE_TILES_CLEAR pfnStoreTilesClear = NULL; - SWR_ASSERT(renderTargetIndex != SWR_ATTACHMENT_STENCIL); ///@todo Not supported yet. - - if (renderTargetIndex != SWR_ATTACHMENT_DEPTH) + if (renderTargetIndex == SWR_ATTACHMENT_STENCIL) { - pfnStoreTilesClear = sStoreTilesClearColorTable[pDstSurface->format]; + SWR_ASSERT(pDstSurface->format == R8_UINT); + pfnStoreTilesClear = StoreMacroTileClear::StoreClear; } - else + else if (renderTargetIndex == SWR_ATTACHMENT_DEPTH) { pfnStoreTilesClear = sStoreTilesClearDepthTable[pDstSurface->format]; } + else + { + pfnStoreTilesClear = sStoreTilesClearColorTable[pDstSurface->format]; + } SWR_ASSERT(pfnStoreTilesClear != NULL);