From: José Fonseca Date: Wed, 28 Jan 2009 15:53:09 +0000 (+0000) Subject: pipebuffer: Fix alignment assertion. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=815de0a5dfadbe9a2618b94c4f28a799cc501a14;p=mesa.git pipebuffer: Fix alignment assertion. --- diff --git a/src/gallium/auxiliary/pipebuffer/pb_bufmgr_mm.c b/src/gallium/auxiliary/pipebuffer/pb_bufmgr_mm.c index a976d3041ac..d4434c6962f 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);