intel: Make batch macros for doing BCS_SWCTRL setup.
authorEric Anholt <eric@anholt.net>
Mon, 3 Jun 2013 23:49:40 +0000 (16:49 -0700)
committerEric Anholt <eric@anholt.net>
Mon, 17 Jun 2013 22:43:13 +0000 (15:43 -0700)
commit78c2fc59256d7ff9c7fbd3ce6352b78b9ca37f89
treeccbdcf01ac756d568283aa7a19102b4a806fcb0e
parentb65b1c3148ad7ebaaca422bc572dead0864dcd6a
intel: Make batch macros for doing BCS_SWCTRL setup.

We're going to add more BCS_SWCTRL setup instances soon, and you have to
be careful to have the set and restore atomic with the rendering that's
done, so that our state doesn't leak out to other rendering processes.

v2: Rewrite the patch to have batch begin/advance macros so that magic
    numbers don't get sprinkled around (and so you don't mix up your
    do-I-need-to-reset vs what-do-I-reset-to logic, which I nearly did in
    the next patch when first writing it)

Acked-by: Kenneth Graunke <kenneth@whitecape.org>
src/mesa/drivers/dri/intel/intel_blit.c