From ae400a9b113a46ef0e1224f75bbb4f0533686cec Mon Sep 17 00:00:00 2001 From: Alok Hota Date: Mon, 13 Aug 2018 18:14:45 -0500 Subject: [PATCH] swr/rast: Correctly align 64-byte spills/fills Fixes crashes on some compute shaders when running on AVX512 Reviewed-by: Bruce Cherniak --- src/gallium/drivers/swr/rasterizer/core/backend.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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); -- 2.30.2