summaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/dri/i965/brw_draw.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/drivers/dri/i965/brw_draw.c')
-rw-r--r--src/mesa/drivers/dri/i965/brw_draw.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_draw.c b/src/mesa/drivers/dri/i965/brw_draw.c
index 39a26b0..bff484f 100644
--- a/src/mesa/drivers/dri/i965/brw_draw.c
+++ b/src/mesa/drivers/dri/i965/brw_draw.c
@@ -140,9 +140,16 @@ brw_set_prim(struct brw_context *brw, const struct _mesa_prim *prim)
static void
gen6_set_prim(struct brw_context *brw, const struct _mesa_prim *prim)
{
+ const struct gl_context *ctx = &brw->ctx;
+ uint32_t hw_prim;
+
DBG("PRIM: %s\n", _mesa_enum_to_string(prim->mode));
- const uint32_t hw_prim = get_hw_prim_for_gl_prim(prim->mode);
+ if (prim->mode == GL_PATCHES)
+ hw_prim = _3DPRIM_PATCHLIST(ctx->TessCtrlProgram.patch_vertices);
+ else
+ hw_prim = get_hw_prim_for_gl_prim(prim->mode);
+
if (hw_prim != brw->primitive) {
brw->primitive = hw_prim;
brw->ctx.NewDriverState |= BRW_NEW_PRIMITIVE;