From 2e3dfe97ee514a9ef8bd0a862360854d9be392d3 Mon Sep 17 00:00:00 2001 From: Keith Whitwell Date: Wed, 19 Dec 2007 13:11:56 +0000 Subject: [PATCH] 965: allocate buffer space to hold batch commands --- src/mesa/pipe/xlib/xm_winsys_aub.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/mesa/pipe/xlib/xm_winsys_aub.c b/src/mesa/pipe/xlib/xm_winsys_aub.c index ef3d975afbd..dd7c7255078 100644 --- a/src/mesa/pipe/xlib/xm_winsys_aub.c +++ b/src/mesa/pipe/xlib/xm_winsys_aub.c @@ -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; } -- 2.30.2