summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTim Rowley <[email protected]>2016-11-22 19:50:55 -0600
committerTim Rowley <[email protected]>2016-11-22 20:06:17 -0600
commit9c13cc94518b3dfb70774695de4191a551a5a7fa (patch)
tree70b948ef15bdd383ef6ea7d613a23fc6a9594b31
parentf6f644ea128f38bdf24fe7e832cdabc18cfdfb0c (diff)
swr: [rasterizer core] fix cast for stencil clear value
Bad type cast for stencil clear value was picking up structure padding bytes. Reviewed-by: Ilia Mirkin <[email protected]>
-rw-r--r--src/gallium/drivers/swr/rasterizer/core/backend.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/gallium/drivers/swr/rasterizer/core/backend.cpp b/src/gallium/drivers/swr/rasterizer/core/backend.cpp
index 0ec64fc2a36..24779d44a09 100644
--- a/src/gallium/drivers/swr/rasterizer/core/backend.cpp
+++ b/src/gallium/drivers/swr/rasterizer/core/backend.cpp
@@ -271,7 +271,7 @@ void ProcessClearBE(DRAW_CONTEXT *pDC, uint32_t workerId, uint32_t macroTile, vo
{
HOTTILE *pHotTile = pContext->pHotTileMgr->GetHotTile(pContext, pDC, macroTile, SWR_ATTACHMENT_STENCIL, true, numSamples);
- pHotTile->clearData[0] = *(DWORD*)&pClear->clearStencil;
+ pHotTile->clearData[0] = pClear->clearStencil;
pHotTile->state = HOTTILE_CLEAR;
}
@@ -322,9 +322,8 @@ void ProcessClearBE(DRAW_CONTEXT *pDC, uint32_t workerId, uint32_t macroTile, vo
if (pClear->attachmentMask & SWR_ATTACHMENT_STENCIL_BIT)
{
- uint32_t value = pClear->clearStencil;
DWORD clearData[4];
- clearData[0] = *(DWORD*)&value;
+ clearData[0] = pClear->clearStencil;
PFN_CLEAR_TILES pfnClearTiles = sClearTilesTable[KNOB_STENCIL_HOT_TILE_FORMAT];
pfnClearTiles(pDC, SWR_ATTACHMENT_STENCIL, macroTile, clearData, pClear->rect);