965: align buffer allocations to 4k
authorKeith Whitwell <keith@tungstengraphics.com>
Wed, 19 Dec 2007 14:20:23 +0000 (14:20 +0000)
committerKeith Whitwell <keith@tungstengraphics.com>
Wed, 19 Dec 2007 14:20:23 +0000 (14:20 +0000)
src/mesa/pipe/xlib/xm_winsys_aub.c

index dd7c7255078e8f2af55d61ccb7a7d3921118e31c..60ba233f35d7ccee3c72e9b69f955bdf23c8bf7f 100644 (file)
@@ -35,9 +35,9 @@
 
 #include "glxheader.h"
 #include "xmesaP.h"
-#include "main/macros.h"
 
 #include "pipe/p_winsys.h"
+#include "pipe/p_util.h"
 #include "pipe/i965simple/brw_winsys.h"
 #include "brw_aub.h"
 #include "xm_winsys_aub.h"
@@ -159,7 +159,7 @@ static int aub_buffer_data(struct pipe_winsys *winsys,
       assert(iws->used + size < iws->size);
       sbo->data = iws->pool + iws->used;
       sbo->offset = AUB_BUF_START + iws->used;
-      iws->used += size;
+      iws->used += align(size, 4096);
    }
 
    sbo->size = size;
@@ -235,7 +235,7 @@ void xmesa_commands_aub(struct pipe_winsys *winsys,
                     cmds,
                     nr_dwords * sizeof(int) );
 
-   iws->used += size;
+   iws->used += align(size, 4096);
 }