i965: Map GL_PATCHES to 3DPRIM_PATCHLIST_n.
authorKenneth Graunke <kenneth@whitecape.org>
Sat, 25 Jul 2015 04:15:35 +0000 (21:15 -0700)
committerKenneth Graunke <kenneth@whitecape.org>
Wed, 11 Nov 2015 16:33:48 +0000 (08:33 -0800)
commita2987ff57f08325f6e1dedae578bd6251a22b2b4
treec9c70325b21bd6e66d379714490481d2c9507d6b
parentcbb7d90e5784b1e44c1801f74c3088638940442d
i965: Map GL_PATCHES to 3DPRIM_PATCHLIST_n.

Inspired by a patch by Fabian Bieler.

Fabian defined a _3DPRIM_PATCHLIST_0 macro (which isn't actually a valid
topology type); I instead chose to make a macro that takes an argument.
He also took the number of patch vertices from _mesa_prim (which was set
to ctx->TessCtrlProgram.patch_vertices) - I chose to use it directly to
avoid the need for the VBO patch.

v2: Change macro to 0x20 + (n - 1) instead of 0x1F + n to better match
    the documentation (suggested by Ian).

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
src/mesa/drivers/dri/i965/brw_defines.h
src/mesa/drivers/dri/i965/brw_draw.c