summaryrefslogtreecommitdiffstats
path: root/src/gallium/state_trackers/nine/volume9.c
diff options
context:
space:
mode:
authorAxel Davy <[email protected]>2016-10-21 17:27:10 +0200
committerAxel Davy <[email protected]>2016-10-24 21:56:44 +0200
commit942778099ea597ee6b04ebdc74f506667fc7782c (patch)
tree85f64d52a5221be68421a7d5d6cc48f29037407e /src/gallium/state_trackers/nine/volume9.c
parent54010cf8b6da71a1b14c0dc586bb7e6be27052de (diff)
st/nine: Use align_calloc instead of align_malloc
We are not sure exactly what needs to be 0 initialized, but we are missing some cases. 0 initialize all our current aligned allocation. Fixes Tree of Savior visual issues. Signed-off-by: Axel Davy <[email protected]>
Diffstat (limited to 'src/gallium/state_trackers/nine/volume9.c')
-rw-r--r--src/gallium/state_trackers/nine/volume9.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/gallium/state_trackers/nine/volume9.c b/src/gallium/state_trackers/nine/volume9.c
index e2201af9019..89565f24732 100644
--- a/src/gallium/state_trackers/nine/volume9.c
+++ b/src/gallium/state_trackers/nine/volume9.c
@@ -42,7 +42,7 @@ NineVolume9_AllocateData( struct NineVolume9 *This )
DBG("(%p(This=%p),level=%u) Allocating 0x%x bytes of system memory.\n",
This->base.container, This, This->level, size);
- This->data = (uint8_t *)align_malloc(size, 32);
+ This->data = (uint8_t *)align_calloc(size, 32);
if (!This->data)
return E_OUTOFMEMORY;
return D3D_OK;
@@ -124,7 +124,7 @@ NineVolume9_ctor( struct NineVolume9 *This,
This->layer_stride_conversion = util_format_get_2d_size(This->format_conversion,
This->stride_conversion,
pDesc->Height);
- This->data_conversion = align_malloc(This->layer_stride_conversion *
+ This->data_conversion = align_calloc(This->layer_stride_conversion *
This->desc.Depth, 32);
if (!This->data_conversion)
return E_OUTOFMEMORY;