summaryrefslogtreecommitdiff
path: root/src/mesa/drivers/dri/i965/brw_gs.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/drivers/dri/i965/brw_gs.c')
-rw-r--r--src/mesa/drivers/dri/i965/brw_gs.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_gs.c b/src/mesa/drivers/dri/i965/brw_gs.c
index 5409e55788..cfcc8ea4d6 100644
--- a/src/mesa/drivers/dri/i965/brw_gs.c
+++ b/src/mesa/drivers/dri/i965/brw_gs.c
@@ -60,7 +60,7 @@ static void compile_gs_prog( struct brw_context *brw,
*/
c.nr_attrs = brw_count_bits(c.key.attrs);
- if (intel->gen == 5)
+ if (intel->gen >= 5)
c.nr_regs = (c.nr_attrs + 1) / 2 + 3; /* are vertices packed, or reg-aligned? */
else
c.nr_regs = (c.nr_attrs + 1) / 2 + 1; /* are vertices packed, or reg-aligned? */
@@ -85,9 +85,14 @@ static void compile_gs_prog( struct brw_context *brw,
*/
switch (key->primitive) {
case GL_QUADS:
+ /* Gen6: VF has already converted into polygon. */
+ if (intel->gen == 6)
+ return;
brw_gs_quads( &c, key );
break;
case GL_QUAD_STRIP:
+ if (intel->gen == 6)
+ return;
brw_gs_quad_strip( &c, key );
break;
case GL_LINE_LOOP:
@@ -160,7 +165,7 @@ static const GLenum gs_prim[GL_POLYGON+1] = {
static void populate_key( struct brw_context *brw,
struct brw_gs_prog_key *key )
{
- GLcontext *ctx = &brw->intel.ctx;
+ struct gl_context *ctx = &brw->intel.ctx;
memset(key, 0, sizeof(*key));
/* CACHE_NEW_VS_PROG */