i965/blorp: Rearrange order of blit validation and preparation steps.
authorPaul Berry <stereotype441@gmail.com>
Fri, 13 Jul 2012 21:21:27 +0000 (14:21 -0700)
committerPaul Berry <stereotype441@gmail.com>
Tue, 24 Jul 2012 21:52:57 +0000 (14:52 -0700)
commitfa1d267beb4adb542ea90b805306599f602c38d2
treea8813c26f15b362a2a96693071426702bfc8d51c
parenteac4f1a70772c1480778bae2563199c12634893e
i965/blorp: Rearrange order of blit validation and preparation steps.

This patch rearranges the order of steps performed by a blorp blit
from this:

- Sync up state of window system buffers.
- Find buffers.
- Find miptrees.
- Make sure buffer formats match.
- Handle mirroring.
- Make sure width and height match.
- Handle clipping/scissoring.
- Account for window system origin conventions.
- Do depth resolves, if applicable.
- Do the blit.
- Record the need for a future HiZ resolve, if applicable.

To this:

- Sync up state of window system buffers.
- Handle mirroring.
- Make sure width and height match.
- Handle clipping/scissoring.
- Account for window system origin conventions.
- Find buffers.
- Make sure buffer formats match.
- Find miptrees.
- Do depth resolves, if applicable.
- Do the blit.
- Record the need for a future HiZ resolve, if applicable.

The steps are the same, but they are now performed in an order that
will make it possible to implement correct DrawBuffers support.  Note
that the last four steps are now in a separate function
(do_blorp_blit), since they will need to be executed repeatedly when
DrawBuffers support is added.

Reviewed-by: Chad Versace <chad.versace@linux.intel.com>
src/mesa/drivers/dri/i965/brw_blorp_blit.cpp