From: Tim Rowley Date: Tue, 3 Oct 2017 20:23:44 +0000 (-0500) Subject: swr/rast: use proper alignment for debug transposedPrims X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=9716c69e22613229bdc78c0a28491f39bec2520d;p=mesa.git swr/rast: use proper alignment for debug transposedPrims Causing a crash in ParaView waveletcontour.py test when _DEBUG defined due to vector aligned copy with unaligned address. Reviewed-by: Bruce Cherniak --- diff --git a/src/gallium/drivers/swr/rasterizer/core/clip.h b/src/gallium/drivers/swr/rasterizer/core/clip.h index cde5261521e..e9a410daa31 100644 --- a/src/gallium/drivers/swr/rasterizer/core/clip.h +++ b/src/gallium/drivers/swr/rasterizer/core/clip.h @@ -561,7 +561,7 @@ public: #if defined(_DEBUG) // TODO: need to increase stack size, allocating SIMD16-widened transposedPrims causes stack overflow in debug builds - SIMDVERTEX_T *transposedPrims = reinterpret_cast *>(malloc(sizeof(SIMDVERTEX_T) * 2)); + SIMDVERTEX_T *transposedPrims = reinterpret_cast *>(AlignedMalloc(sizeof(SIMDVERTEX_T) * 2, 64)); #else SIMDVERTEX_T transposedPrims[2]; @@ -667,7 +667,7 @@ public: } #if defined(_DEBUG) - free(transposedPrims); + AlignedFree(transposedPrims); #endif // update global pipeline stat