diff options
author | Ian Romanick <[email protected]> | 2015-09-14 12:38:19 -0700 |
---|---|---|
committer | Ian Romanick <[email protected]> | 2015-09-23 09:56:51 -0700 |
commit | 4ecc387a935d2364c5be02cbf7a72b0a05fa419a (patch) | |
tree | aa57bd37354ed9aca70a1b7dc4e0fca5c8bd89cc /src/mesa/tnl_dd/t_dd_dmatmp.h | |
parent | 249ba09f59af870dc55eacede5b1e164873c397d (diff) |
t_dd_dmatmp: Remove HAVE_QUADS support
Two drivers use this file, and neither supports quads.
No piglit regressions on i915 (G33) or radeon (Radeon 7500).
Signed-off-by: Ian Romanick <[email protected]>
Reviewed-by: Brian Paul <[email protected]>
Diffstat (limited to 'src/mesa/tnl_dd/t_dd_dmatmp.h')
-rw-r--r-- | src/mesa/tnl_dd/t_dd_dmatmp.h | 51 |
1 files changed, 5 insertions, 46 deletions
diff --git a/src/mesa/tnl_dd/t_dd_dmatmp.h b/src/mesa/tnl_dd/t_dd_dmatmp.h index 5da0eae37cc..33a0256496c 100644 --- a/src/mesa/tnl_dd/t_dd_dmatmp.h +++ b/src/mesa/tnl_dd/t_dd_dmatmp.h @@ -43,8 +43,8 @@ #error "must have at least triangles to use render template" #endif -#if HAVE_QUAD_STRIPS -#error "quad strips not supported by render template" +#if HAVE_QUAD_STRIPS || HAVE_QUADS +#error "quads and quad strips not supported by render template" #endif #if !HAVE_ELTS @@ -525,25 +525,7 @@ static void TAG(render_quads_verts)( struct gl_context *ctx, /* Emit whole number of quads in total. */ count -= count & 3; - if (HAVE_QUADS) { - LOCAL_VARS; - int dmasz = (GET_SUBSEQUENT_VB_MAX_VERTS()/4) * 4; - int currentsz; - GLuint j, nr; - - INIT(GL_QUADS); - - currentsz = (GET_CURRENT_VB_MAX_VERTS()/4) * 4; - if (currentsz < 8) - currentsz = dmasz; - - for (j = 0; j < count; j += nr) { - nr = MIN2( currentsz, count - j ); - TAG(emit_verts)(ctx, start + j, nr, ALLOC_VERTS(nr)); - currentsz = dmasz; - } - } - else if (HAVE_ELTS) { + if (HAVE_ELTS) { /* Hardware doesn't have a quad primitive type -- try to * simulate it using indexed vertices and the triangle * primitive: @@ -1048,28 +1030,7 @@ static void TAG(render_quads_elts)( struct gl_context *ctx, /* Emit whole number of quads in total. */ count -= count & 3; - if (HAVE_QUADS) { - LOCAL_VARS; - GLuint *elts = TNL_CONTEXT(ctx)->vb.Elts; - int dmasz = GET_SUBSEQUENT_VB_MAX_ELTS()/4*4; - int currentsz; - GLuint j, nr; - - FLUSH(); - ELT_INIT( GL_TRIANGLES ); - - currentsz = GET_CURRENT_VB_MAX_ELTS()/4*4; - - if (currentsz < 8) - currentsz = dmasz; - - for (j = 0; j < count; j += nr) { - nr = MIN2( currentsz, count - j ); - TAG(emit_elts)(ctx, elts + start + j, nr, ALLOC_ELTS(nr)); - FLUSH(); - currentsz = dmasz; - } - } else { + { LOCAL_VARS; GLuint *elts = TNL_CONTEXT(ctx)->vb.Elts; int dmasz = GET_SUBSEQUENT_VB_MAX_ELTS(); @@ -1208,9 +1169,7 @@ static GLboolean TAG(validate_render)( struct gl_context *ctx, ok = HAVE_TRI_STRIPS; break; case GL_QUADS: - if (HAVE_QUADS) { - ok = GL_TRUE; - } else if (HAVE_ELTS) { + if (HAVE_ELTS) { ok = (GLint) count < GET_SUBSEQUENT_VB_MAX_ELTS(); } else { |