pipebuffer: Fix alignment assertion.
authorJosé Fonseca <jfonseca@vmware.com>
Wed, 28 Jan 2009 15:53:09 +0000 (15:53 +0000)
committerJosé Fonseca <jfonseca@vmware.com>
Wed, 28 Jan 2009 15:54:13 +0000 (15:54 +0000)
src/gallium/auxiliary/pipebuffer/pb_bufmgr_mm.c

index a976d3041ac9ea16cd7ba1f9a54dc257f4aa03c6..d4434c6962fa37d80a0a05311f0fec63f5f2499e 100644 (file)
@@ -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);