From 2fca08e550ae0c4b036ee8fc34dcf98d45d6bf20 Mon Sep 17 00:00:00 2001 From: Ilia Mirkin Date: Fri, 18 Nov 2016 10:15:30 -0500 Subject: swr: [rasterizer memory] hook up stencil clears for ClearTile Signed-off-by: Ilia Mirkin Reviewed-by: Tim Rowley --- src/gallium/drivers/swr/rasterizer/memory/ClearTile.cpp | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'src') 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); -- cgit v1.2.3