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?

The pointer emission variant at least makes it trivial to use
   *((uint64_t *)map)++ = reloc64
if so desired.
-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre
_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to