diff options
author | Ilia Mirkin <[email protected]> | 2016-11-17 19:39:20 -0500 |
---|---|---|
committer | Ilia Mirkin <[email protected]> | 2016-11-23 20:33:32 -0500 |
commit | 74943db82c9b559ddad8773822ade93eafb24849 (patch) | |
tree | c57cc862070eff4891123cea5f33fef6a712e5c7 /src/gallium/drivers/swr | |
parent | 5da84a7e120d1df848531c6e7eb60340ac4dc43c (diff) |
swr: [rasterizer core] actually perform clear before store in GetHotTile
When switching render target array indexes (as might happen in a GS, or
in a future change, with layered clears), if the previous state is
HOTTILE_CLEAR, we should actually clear the tile before saving it off.
Signed-off-by: Ilia Mirkin <[email protected]>
Reviewed-by: Tim Rowley <[email protected]>
Diffstat (limited to 'src/gallium/drivers/swr')
-rw-r--r-- | src/gallium/drivers/swr/rasterizer/core/tilemgr.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/gallium/drivers/swr/rasterizer/core/tilemgr.cpp b/src/gallium/drivers/swr/rasterizer/core/tilemgr.cpp index 804fc4f2699..f3986672275 100644 --- a/src/gallium/drivers/swr/rasterizer/core/tilemgr.cpp +++ b/src/gallium/drivers/swr/rasterizer/core/tilemgr.cpp @@ -149,6 +149,18 @@ HOTTILE* HotTileMgr::GetHotTile(SWR_CONTEXT* pContext, DRAW_CONTEXT* pDC, uint32 default: SWR_ASSERT(false, "Unknown attachment: %d", attachment); format = KNOB_COLOR_HOT_TILE_FORMAT; break; } + if (hotTile.state == HOTTILE_CLEAR) + { + if (attachment == SWR_ATTACHMENT_STENCIL) + ClearStencilHotTile(&hotTile); + else if (attachment == SWR_ATTACHMENT_DEPTH) + ClearDepthHotTile(&hotTile); + else + ClearColorHotTile(&hotTile); + + hotTile.state = HOTTILE_DIRTY; + } + if (hotTile.state == HOTTILE_DIRTY) { pContext->pfnStoreTile(GetPrivateState(pDC), format, attachment, |