From 8d6ef125ac6044438db5b89d6d310ccfc4b8140a Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Fri, 17 Oct 2008 13:35:42 -0600 Subject: 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. --- src/mesa/state_tracker/st_cb_texture.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/mesa/state_tracker/st_cb_texture.c b/src/mesa/state_tracker/st_cb_texture.c index a018cdee64..0b2b639a5b 100644 --- a/src/mesa/state_tracker/st_cb_texture.c +++ b/src/mesa/state_tracker/st_cb_texture.c @@ -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) { -- cgit v1.2.3 From d422c1eb5c0fac8f946758ecce96072505c77683 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Fri, 17 Oct 2008 13:37:11 -0600 Subject: mesa: redraw upon keypress in trivial/tri.c --- progs/trivial/tri.c | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/progs/trivial/tri.c b/progs/trivial/tri.c index 12fa8d11b6..64c529415c 100644 --- a/progs/trivial/tri.c +++ b/progs/trivial/tri.c @@ -56,15 +56,13 @@ static void Reshape(int width, int height) static void Key(unsigned char key, int x, int y) { - - switch (key) { - case 27: - exit(0); - default: - return; - } - - glutPostRedisplay(); + switch (key) { + case 27: + exit(0); + default: + glutPostRedisplay(); + return; + } } static void Draw(void) -- cgit v1.2.3