summaryrefslogtreecommitdiffstats
path: root/src/gallium/state_trackers/nine/surface9.c
diff options
context:
space:
mode:
authorPatrick Rudolph <[email protected]>2015-05-12 07:27:37 +0200
committerAxel Davy <[email protected]>2015-08-21 22:21:45 +0200
commit886227d363b7e889e2a9162c27059e2a9fe79cb7 (patch)
treee3c955ea39f28f40fa725b7859ee10b6a6e3f88c /src/gallium/state_trackers/nine/surface9.c
parent3c4864fa5539d6b34863c28f3650289fd2a4ce93 (diff)
st/nine: Align texture memory
Align texture memory on 32 byte boundry to allow SSE/AVX memcpy to work on locked rects. This fixes some crashes with games using SSE. Reviewed-by: David Heidelberg <[email protected]> Reviewed-by: Axel Davy <[email protected]> Signed-off-by: Patrick Rudolph <[email protected]>
Diffstat (limited to 'src/gallium/state_trackers/nine/surface9.c')
-rw-r--r--src/gallium/state_trackers/nine/surface9.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/gallium/state_trackers/nine/surface9.c b/src/gallium/state_trackers/nine/surface9.c
index 7533cb3a454..164b34e02d5 100644
--- a/src/gallium/state_trackers/nine/surface9.c
+++ b/src/gallium/state_trackers/nine/surface9.c
@@ -104,11 +104,11 @@ NineSurface9_ctor( struct NineSurface9 *This,
/* Ram buffer with no parent. Has to allocate the resource itself */
if (!pResource && !pContainer) {
assert(!user_buffer);
- This->data = MALLOC(
+ This->data = align_malloc(
nine_format_get_level_alloc_size(This->base.info.format,
pDesc->Width,
pDesc->Height,
- 0));
+ 0), 32);
if (!This->data)
return E_OUTOFMEMORY;
}