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 <ian.d.romanick@intel.com> Reviewed-by: Brian Paul <brianp@vmware.com>
This commit is contained in:
@@ -64,7 +64,6 @@
|
||||
#define HAVE_TRI_STRIP_1 0 /* has it, template can't use it yet */
|
||||
#define HAVE_TRI_FANS 1
|
||||
#define HAVE_POLYGONS 1
|
||||
#define HAVE_QUADS 0
|
||||
|
||||
#define HAVE_ELTS 0
|
||||
|
||||
|
||||
@@ -355,7 +355,6 @@ void r100_swtcl_flush(struct gl_context *ctx, uint32_t current_offset)
|
||||
#define HAVE_TRI_STRIPS 1
|
||||
#define HAVE_TRI_STRIP_1 0
|
||||
#define HAVE_TRI_FANS 1
|
||||
#define HAVE_QUADS 0
|
||||
#define HAVE_POLYGONS 0
|
||||
/* \todo: is it possible to make "ELTS" work with t_vertex code ? */
|
||||
#define HAVE_ELTS 0
|
||||
|
||||
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user