From: Keith Whitwell Date: Wed, 19 Dec 2007 13:11:56 +0000 (+0000) Subject: 965: allocate buffer space to hold batch commands X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=2e3dfe97ee514a9ef8bd0a862360854d9be392d3;p=mesa.git 965: allocate buffer space to hold batch commands --- 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; }