summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/swr
diff options
context:
space:
mode:
authorTim Rowley <[email protected]>2017-10-03 15:23:44 -0500
committerTim Rowley <[email protected]>2017-10-06 13:27:39 -0500
commit9716c69e22613229bdc78c0a28491f39bec2520d (patch)
tree9b5893dc091a80143b23a1af483aa787e1b302bb /src/gallium/drivers/swr
parent0763f814d7b5cb4da945d9211faab47e8523fdad (diff)
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 <[email protected]>
Diffstat (limited to 'src/gallium/drivers/swr')
-rw-r--r--src/gallium/drivers/swr/rasterizer/core/clip.h4
1 files changed, 2 insertions, 2 deletions
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<SIMD_T> *transposedPrims = reinterpret_cast<SIMDVERTEX_T<SIMD_T> *>(malloc(sizeof(SIMDVERTEX_T<SIMD_T>) * 2));
+ SIMDVERTEX_T<SIMD_T> *transposedPrims = reinterpret_cast<SIMDVERTEX_T<SIMD_T> *>(AlignedMalloc(sizeof(SIMDVERTEX_T<SIMD_T>) * 2, 64));
#else
SIMDVERTEX_T<SIMD_T> transposedPrims[2];
@@ -667,7 +667,7 @@ public:
}
#if defined(_DEBUG)
- free(transposedPrims);
+ AlignedFree(transposedPrims);
#endif
// update global pipeline stat