swr/rast: Correctly align 64-byte spills/fills
authorAlok Hota <alok.hota@intel.com>
Mon, 13 Aug 2018 23:14:45 +0000 (18:14 -0500)
committerAlok Hota <alok.hota@intel.com>
Fri, 15 Feb 2019 20:53:54 +0000 (14:53 -0600)
Fixes crashes on some compute shaders when running on AVX512

Reviewed-by: Bruce Cherniak <bruce.cherniak@intel.com>
src/gallium/drivers/swr/rasterizer/core/backend.cpp

index 883475cb753820c188fdaa19d09fac13cb54b816..db6b778a672c6b89aa3467ebf1ce286dd99e97e3 100644 (file)
@@ -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);