From: Tim Rowley Date: Tue, 7 Nov 2017 21:24:25 +0000 (-0600) Subject: swr/rast: Add alignment to transpose targets X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=44025def06a8b8d1c019f611079a003964ea7511;p=mesa.git swr/rast: Add alignment to transpose targets Needed to ensure alignment for avx512. Fixes address sanitizer crash. Reviewed-by: Bruce Cherniak --- diff --git a/src/gallium/drivers/swr/rasterizer/core/binner.cpp b/src/gallium/drivers/swr/rasterizer/core/binner.cpp index b624ae69b34..9d1f0d87994 100644 --- a/src/gallium/drivers/swr/rasterizer/core/binner.cpp +++ b/src/gallium/drivers/swr/rasterizer/core/binner.cpp @@ -796,10 +796,10 @@ endBinTriangles: // transpose verts needed for backend /// @todo modify BE to take non-transformed verts - simd4scalar vHorizX[SIMD_WIDTH]; - simd4scalar vHorizY[SIMD_WIDTH]; - simd4scalar vHorizZ[SIMD_WIDTH]; - simd4scalar vHorizW[SIMD_WIDTH]; + OSALIGNSIMD16(simd4scalar) vHorizX[SIMD_WIDTH]; + OSALIGNSIMD16(simd4scalar) vHorizY[SIMD_WIDTH]; + OSALIGNSIMD16(simd4scalar) vHorizZ[SIMD_WIDTH]; + OSALIGNSIMD16(simd4scalar) vHorizW[SIMD_WIDTH]; TransposeVertices(vHorizX, tri[0].x, tri[1].x, tri[2].x); TransposeVertices(vHorizY, tri[0].y, tri[1].y, tri[2].y); @@ -1510,10 +1510,10 @@ void BinPostSetupLinesImpl( // transpose verts needed for backend /// @todo modify BE to take non-transformed verts - simd4scalar vHorizX[SIMD_WIDTH]; - simd4scalar vHorizY[SIMD_WIDTH]; - simd4scalar vHorizZ[SIMD_WIDTH]; - simd4scalar vHorizW[SIMD_WIDTH]; + OSALIGNSIMD16(simd4scalar) vHorizX[SIMD_WIDTH]; + OSALIGNSIMD16(simd4scalar) vHorizY[SIMD_WIDTH]; + OSALIGNSIMD16(simd4scalar) vHorizZ[SIMD_WIDTH]; + OSALIGNSIMD16(simd4scalar) vHorizW[SIMD_WIDTH]; if (!primMask) {