swr: [rasterizer memory] hook up stencil clears for ClearTile
authorIlia Mirkin <imirkin@alum.mit.edu>
Fri, 18 Nov 2016 15:15:30 +0000 (10:15 -0500)
committerIlia Mirkin <imirkin@alum.mit.edu>
Tue, 29 Nov 2016 01:14:48 +0000 (20:14 -0500)
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Tim Rowley <timothy.o.rowley@intel.com>
src/gallium/drivers/swr/rasterizer/memory/ClearTile.cpp

index 8501e21eded0ab00720123830c74e16c9cbed5fc..31a40a3feea8303ec054b8fc9767ccc8d90efaed 100644 (file)
@@ -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<R8_UINT, R8_UINT>::StoreClear;
     }
-    else
+    else if (renderTargetIndex == SWR_ATTACHMENT_DEPTH)
     {
         pfnStoreTilesClear = sStoreTilesClearDepthTable[pDstSurface->format];
     }
+    else
+    {
+        pfnStoreTilesClear = sStoreTilesClearColorTable[pDstSurface->format];
+    }
 
     SWR_ASSERT(pfnStoreTilesClear != NULL);