On Sat, Jul 11, 2015 at 11:08 AM, Chris Wilson <ch...@chris-wilson.co.uk> wrote: > On Fri, Jul 10, 2015 at 11:44:58AM -0700, Matt Turner wrote: >> So that everything writing to the batch between BEGIN_BATCH() and >> ADVANCE_BATCH() goes through OUT_BATCH. > > Reviewed-by: Chris Wilson <ch...@chris-wilson.co.uk> > >> +#define OUT_RELOC64(buf, read_domains, write_domain, delta) do { \ >> + uint64_t reloc64 = intel_batchbuffer_reloc64(brw, buf, read_domains, \ >> + write_domain, delta); \ >> + OUT_BATCH(reloc64); \ >> + OUT_BATCH(reloc64 >> 32); \ >> } while (0) > > Is the compiler smart enough to convert this to movq?
It is not, but I'm not totally sure that's better -- an unaligned movq might cross a cache boundary which is apparently pretty expensive. > The pointer emission variant at least makes it trivial to use > *((uint64_t *)map)++ = reloc64 > if so desired. I'll do some performance tests on top of my v3 series. _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev