aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/swr/swr_memory.h
diff options
context:
space:
mode:
authorIlia Mirkin <[email protected]>2016-11-16 21:25:12 -0500
committerIlia Mirkin <[email protected]>2016-11-23 20:33:50 -0500
commit1a80ec0cd1f3f66a33fc708e0112c88f4fba122d (patch)
tree967af42f2d040c6edb68b818e63f77af805f7f9e /src/gallium/drivers/swr/swr_memory.h
parentcec515999ccf224a967f00c4bc2c3e47d782d65e (diff)
swr: [rasterizer core] pipe renderTargetArrayIndex through to clears
Currently clears only operate on the 0th array index (ignoring surface layout parameters). Instead normalize to take a RTAI like all the load/store tile logic does, and use ComputeSurfaceAddress to properly take the surface state's lod/array index into account. Signed-off-by: Ilia Mirkin <[email protected]> Reviewed-by: Tim Rowley <[email protected]>
Diffstat (limited to 'src/gallium/drivers/swr/swr_memory.h')
-rw-r--r--src/gallium/drivers/swr/swr_memory.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/gallium/drivers/swr/swr_memory.h b/src/gallium/drivers/swr/swr_memory.h
index 9ef468a90d4..b8ce27f4d96 100644
--- a/src/gallium/drivers/swr/swr_memory.h
+++ b/src/gallium/drivers/swr/swr_memory.h
@@ -42,6 +42,7 @@ void StoreHotTileClear(
SWR_RENDERTARGET_ATTACHMENT renderTargetIndex,
UINT x,
UINT y,
+ uint32_t renderTargetArrayIndex,
const float* pClearColor);
INLINE void
@@ -77,13 +78,14 @@ swr_StoreHotTileClear(HANDLE hPrivateContext,
SWR_RENDERTARGET_ATTACHMENT renderTargetIndex,
UINT x,
UINT y,
+ uint32_t renderTargetArrayIndex,
const float* pClearColor)
{
// Grab destination surface state from private context
swr_draw_context *pDC = (swr_draw_context*)hPrivateContext;
SWR_SURFACE_STATE *pDstSurface = &pDC->renderTargets[renderTargetIndex];
- StoreHotTileClear(pDstSurface, renderTargetIndex, x, y, pClearColor);
+ StoreHotTileClear(pDstSurface, renderTargetIndex, x, y, renderTargetArrayIndex, pClearColor);
}
void InitSimLoadTilesTable();