i965: Combine brw_emit_prim and gen7_emit_prim.
authorKenneth Graunke <kenneth@whitecape.org>
Sat, 6 Apr 2013 06:10:39 +0000 (23:10 -0700)
committerKenneth Graunke <kenneth@whitecape.org>
Mon, 2 Sep 2013 01:54:37 +0000 (18:54 -0700)
commit976d1d6665686cf6be6f3388a28c21516d94de76
tree175c1e671136e67d98838a89eadd774835a0f277
parenta3335417e3c1f8ef6947f7ae57e75e3df501cef5
i965: Combine brw_emit_prim and gen7_emit_prim.

These functions have almost identical code; the only difference is that
a few of the bits moved around.  Adding a few trivial conditionals
allows the same function to work on all generations, and the resulting
code is still quite readable.

v2: Comment that the workaround flush is only necessary on SNB
    (requested by Paul Berry).

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Paul Berry <stereotype441@gmail.com>
src/mesa/drivers/dri/i965/brw_draw.c