[Mesa-dev] [PATCH 2/3] swr/rast: cache line align hottile buffers
Cherniak, Bruce
bruce.cherniak at intel.com
Fri Jul 21 20:11:15 UTC 2017
Reviewed-by: Bruce Cherniak <bruce.cherniak at intel.com>
> On Jul 20, 2017, at 5:09 PM, Tim Rowley <timothy.o.rowley at intel.com> wrote:
>
> Prevents unalignment crashes with avx512 code on gcc/clang.
> ---
> src/gallium/drivers/swr/rasterizer/core/tilemgr.cpp | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/src/gallium/drivers/swr/rasterizer/core/tilemgr.cpp b/src/gallium/drivers/swr/rasterizer/core/tilemgr.cpp
> index eb60eb4081..a6c54ab86e 100644
> --- a/src/gallium/drivers/swr/rasterizer/core/tilemgr.cpp
> +++ b/src/gallium/drivers/swr/rasterizer/core/tilemgr.cpp
> @@ -100,7 +100,7 @@ HOTTILE* HotTileMgr::GetHotTile(SWR_CONTEXT* pContext, DRAW_CONTEXT* pDC, uint32
> {
> uint32_t size = numSamples * mHotTileSize[attachment];
> uint32_t numaNode = ((x ^ y) & pContext->threadPool.numaMask);
> - hotTile.pBuffer = (uint8_t*)AllocHotTileMem(size, KNOB_SIMD_WIDTH * 4, numaNode);
> + hotTile.pBuffer = (uint8_t*)AllocHotTileMem(size, 64, numaNode);
> hotTile.state = HOTTILE_INVALID;
> hotTile.numSamples = numSamples;
> hotTile.renderTargetArrayIndex = renderTargetArrayIndex;
> @@ -124,7 +124,7 @@ HOTTILE* HotTileMgr::GetHotTile(SWR_CONTEXT* pContext, DRAW_CONTEXT* pDC, uint32
>
> uint32_t size = numSamples * mHotTileSize[attachment];
> uint32_t numaNode = ((x ^ y) & pContext->threadPool.numaMask);
> - hotTile.pBuffer = (uint8_t*)AllocHotTileMem(size, KNOB_SIMD_WIDTH * 4, numaNode);
> + hotTile.pBuffer = (uint8_t*)AllocHotTileMem(size, 64, numaNode);
> hotTile.state = HOTTILE_INVALID;
> hotTile.numSamples = numSamples;
> }
> @@ -194,7 +194,7 @@ HOTTILE* HotTileMgr::GetHotTileNoLoad(
> if (create)
> {
> uint32_t size = numSamples * mHotTileSize[attachment];
> - hotTile.pBuffer = (uint8_t*)AlignedMalloc(size, KNOB_SIMD_WIDTH * 4);
> + hotTile.pBuffer = (uint8_t*)AlignedMalloc(size, 64);
> hotTile.state = HOTTILE_INVALID;
> hotTile.numSamples = numSamples;
> hotTile.renderTargetArrayIndex = 0;
> --
> 2.11.0
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev
More information about the mesa-dev
mailing list