From: Alok Hota Date: Mon, 13 Aug 2018 23:14:45 +0000 (-0500) Subject: swr/rast: Correctly align 64-byte spills/fills X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=ae400a9b113a46ef0e1224f75bbb4f0533686cec;p=mesa.git swr/rast: Correctly align 64-byte spills/fills Fixes crashes on some compute shaders when running on AVX512 Reviewed-by: Bruce Cherniak --- diff --git a/src/gallium/drivers/swr/rasterizer/core/backend.cpp b/src/gallium/drivers/swr/rasterizer/core/backend.cpp index 883475cb753..db6b778a672 100644 --- a/src/gallium/drivers/swr/rasterizer/core/backend.cpp +++ b/src/gallium/drivers/swr/rasterizer/core/backend.cpp @@ -61,14 +61,14 @@ void ProcessComputeBE(DRAW_CONTEXT* pDC, size_t spillFillSize = pDC->pState->state.totalSpillFillSize; if (spillFillSize && pSpillFillBuffer == nullptr) { - pSpillFillBuffer = pDC->pArena->AllocAlignedSync(spillFillSize, KNOB_SIMD_BYTES); + pSpillFillBuffer = pDC->pArena->AllocAlignedSync(spillFillSize, KNOB_SIMD16_BYTES); } size_t scratchSpaceSize = pDC->pState->state.scratchSpaceSize * pDC->pState->state.scratchSpaceNumInstances; if (scratchSpaceSize && pScratchSpace == nullptr) { - pScratchSpace = pDC->pArena->AllocAlignedSync(scratchSpaceSize, KNOB_SIMD_BYTES); + pScratchSpace = pDC->pArena->AllocAlignedSync(scratchSpaceSize, KNOB_SIMD16_BYTES); } const API_STATE& state = GetApiState(pDC);