mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-01 03:48:06 +02:00
gallium: fix mis-matched malloc/free vs. aligned malloc/free
Use aligned malloc/free for teximage data everywhere to be consistant. The mismatch didn't make any difference when HAVE_POSIX_MEMALIGN was defined.
This commit is contained in:
parent
055d986efe
commit
8d6ef125ac
1 changed files with 2 additions and 2 deletions
|
|
@ -156,7 +156,7 @@ st_FreeTextureImageData(GLcontext * ctx, struct gl_texture_image *texImage)
|
|||
}
|
||||
|
||||
if (texImage->Data) {
|
||||
free(texImage->Data);
|
||||
_mesa_align_free(texImage->Data);
|
||||
texImage->Data = NULL;
|
||||
}
|
||||
}
|
||||
|
|
@ -541,7 +541,7 @@ st_TexImage(GLcontext * ctx,
|
|||
sizeInBytes = depth * dstRowStride * postConvHeight;
|
||||
}
|
||||
|
||||
texImage->Data = malloc(sizeInBytes);
|
||||
texImage->Data = _mesa_align_malloc(sizeInBytes, 16);
|
||||
}
|
||||
|
||||
if (!texImage->Data) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue