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 <imirkin@alum.mit.edu>
Reviewed-by: Tim Rowley <timothy.o.rowley@intel.com>
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,