Re: [Mesa-dev] [PATCH 4/4] i965: Optimize batchbuffer macros.

2015-07-14 Thread Chris Wilson
On Mon, Jul 13, 2015 at 02:52:00PM -0700, Matt Turner wrote: > --- a/src/mesa/drivers/dri/i965/brw_urb.c > +++ b/src/mesa/drivers/dri/i965/brw_urb.c > @@ -252,7 +252,7 @@ void brw_upload_urb_fence(struct brw_context *brw) > if ((USED_BATCH(brw->batch) & 15) > 12) { >int pad = 16 - (USED

[Mesa-dev] [PATCH 4/4] i965: Optimize batchbuffer macros.

2015-07-13 Thread Matt Turner
Previously OUT_BATCH was just a macro around an inline function which does brw->batch.map[brw->batch.used++] = dword; When making consecutive calls to intel_batchbuffer_emit_dword() the compiler isn't able to recognize that we're writing consecutive memory locations or that it doesn't need to