965: allocate buffer space to hold batch commands
authorKeith Whitwell <keith@tungstengraphics.com>
Wed, 19 Dec 2007 13:11:56 +0000 (13:11 +0000)
committerKeith Whitwell <keith@tungstengraphics.com>
Wed, 19 Dec 2007 13:13:53 +0000 (13:13 +0000)
src/mesa/pipe/xlib/xm_winsys_aub.c

index ef3d975afbdb9dd2ebbfa0fc1f66590ffde4920d..dd7c7255078e8f2af55d61ccb7a7d3921118e31c 100644 (file)
@@ -226,10 +226,16 @@ void xmesa_commands_aub(struct pipe_winsys *winsys,
                        unsigned nr_dwords)
 {
    struct aub_pipe_winsys *iws = aub_pipe_winsys(winsys);
+   unsigned size = nr_dwords * 4;
+
+   assert(iws->used + size < iws->size);
+
    brw_aub_gtt_cmds( iws->aubfile, 
-                    0,         /* ?? */
+                    AUB_BUF_START + iws->used,
                     cmds,
                     nr_dwords * sizeof(int) );
+
+   iws->used += size;
 }