From 392b0954c265fdd66b2de99ab677d2e662935682 Mon Sep 17 00:00:00 2001 From: Keith Whitwell Date: Fri, 15 Oct 2010 13:52:00 +0100 Subject: llvmpipe: use aligned loads/stores for plane values --- src/gallium/drivers/llvmpipe/lp_rast_tri.c | 12 ++++++------ src/gallium/drivers/llvmpipe/lp_setup_tri.c | 6 +++--- 2 files changed, 9 insertions(+), 9 deletions(-) (limited to 'src') diff --git a/src/gallium/drivers/llvmpipe/lp_rast_tri.c b/src/gallium/drivers/llvmpipe/lp_rast_tri.c index 659eb1cac3a..042c315635e 100644 --- a/src/gallium/drivers/llvmpipe/lp_rast_tri.c +++ b/src/gallium/drivers/llvmpipe/lp_rast_tri.c @@ -261,9 +261,9 @@ lp_rast_triangle_3_16(struct lp_rasterizer_task *task, struct { unsigned mask:16; unsigned i:8; unsigned j:8; } out[16]; unsigned nr = 0; - __m128i p0 = _mm_loadu_si128((__m128i *)&plane[0]); /* c, dcdx, dcdy, eo */ - __m128i p1 = _mm_loadu_si128((__m128i *)&plane[1]); /* c, dcdx, dcdy, eo */ - __m128i p2 = _mm_loadu_si128((__m128i *)&plane[2]); /* c, dcdx, dcdy, eo */ + __m128i p0 = _mm_load_si128((__m128i *)&plane[0]); /* c, dcdx, dcdy, eo */ + __m128i p1 = _mm_load_si128((__m128i *)&plane[1]); /* c, dcdx, dcdy, eo */ + __m128i p2 = _mm_load_si128((__m128i *)&plane[2]); /* c, dcdx, dcdy, eo */ __m128i zero = _mm_setzero_si128(); __m128i c; @@ -367,9 +367,9 @@ lp_rast_triangle_3_4(struct lp_rasterizer_task *task, int x = (arg.triangle.plane_mask & 0xff) + task->x; int y = (arg.triangle.plane_mask >> 8) + task->y; - __m128i p0 = _mm_loadu_si128((__m128i *)&plane[0]); /* c, dcdx, dcdy, eo */ - __m128i p1 = _mm_loadu_si128((__m128i *)&plane[1]); /* c, dcdx, dcdy, eo */ - __m128i p2 = _mm_loadu_si128((__m128i *)&plane[2]); /* c, dcdx, dcdy, eo */ + __m128i p0 = _mm_load_si128((__m128i *)&plane[0]); /* c, dcdx, dcdy, eo */ + __m128i p1 = _mm_load_si128((__m128i *)&plane[1]); /* c, dcdx, dcdy, eo */ + __m128i p2 = _mm_load_si128((__m128i *)&plane[2]); /* c, dcdx, dcdy, eo */ __m128i zero = _mm_setzero_si128(); __m128i c; diff --git a/src/gallium/drivers/llvmpipe/lp_setup_tri.c b/src/gallium/drivers/llvmpipe/lp_setup_tri.c index 49ded9e0452..c6cb9afda47 100644 --- a/src/gallium/drivers/llvmpipe/lp_setup_tri.c +++ b/src/gallium/drivers/llvmpipe/lp_setup_tri.c @@ -382,9 +382,9 @@ do_triangle_ccw(struct lp_setup_context *setup, transpose4_epi32(&c, &dcdx, &dcdy, &eo, &p0, &p1, &p2, &unused); - _mm_storeu_si128((__m128i *)&plane[0], p0); - _mm_storeu_si128((__m128i *)&plane[1], p1); - _mm_storeu_si128((__m128i *)&plane[2], p2); + _mm_store_si128((__m128i *)&plane[0], p0); + _mm_store_si128((__m128i *)&plane[1], p1); + _mm_store_si128((__m128i *)&plane[2], p2); } #else { -- cgit v1.2.3