Mesa (gallium-0.1): pipebuffer: Fix alignment assertion.
Jose Fonseca
jrfonseca at kemper.freedesktop.org
Mon Sep 28 17:33:34 UTC 2009
Module: Mesa
Branch: gallium-0.1
Commit: b297d9005800dd0326198ec766444f9320e422b0
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=b297d9005800dd0326198ec766444f9320e422b0
Author: José Fonseca <jfonseca at vmware.com>
Date: Wed Jan 28 15:53:09 2009 +0000
pipebuffer: Fix alignment assertion.
(cherry picked from commit 815de0a5dfadbe9a2618b94c4f28a799cc501a14)
---
src/gallium/auxiliary/pipebuffer/pb_bufmgr_mm.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/gallium/auxiliary/pipebuffer/pb_bufmgr_mm.c b/src/gallium/auxiliary/pipebuffer/pb_bufmgr_mm.c
index 37984e7..15b42ba 100644
--- a/src/gallium/auxiliary/pipebuffer/pb_bufmgr_mm.c
+++ b/src/gallium/auxiliary/pipebuffer/pb_bufmgr_mm.c
@@ -154,8 +154,8 @@ mm_bufmgr_create_buffer(struct pb_manager *mgr,
struct mm_buffer *mm_buf;
/* We don't handle alignments larger then the one initially setup */
- assert(desc->alignment % (1 << mm->align2) == 0);
- if(desc->alignment % (1 << mm->align2))
+ assert(pb_check_alignment(desc->alignment, 1 << mm->align2));
+ if(!pb_check_alignment(desc->alignment, 1 << mm->align2))
return NULL;
pipe_mutex_lock(mm->mutex);
More information about the mesa-commit
mailing list