summaryrefslogtreecommitdiffstats
path: root/src/mesa/tnl_dd
diff options
context:
space:
mode:
authorIan Romanick <[email protected]>2015-09-14 14:19:44 -0700
committerIan Romanick <[email protected]>2015-09-23 09:57:06 -0700
commit22b73f3c2a09375c49bd6202dabdbff368351315 (patch)
treeb04d9cac698a5d65ad5d63b8a283f60b9674f659 /src/mesa/tnl_dd
parentdcd8e49962b550f8854fff20e0369dae5550f640 (diff)
t_dd_dmatmp: Require HAVE_TRIANGLES
Two drivers use this file, and both support triangles. 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')
-rw-r--r--src/mesa/tnl_dd/t_dd_dmatmp.h14
1 files changed, 4 insertions, 10 deletions
diff --git a/src/mesa/tnl_dd/t_dd_dmatmp.h b/src/mesa/tnl_dd/t_dd_dmatmp.h
index bfdae5a428a..563875cd75c 100644
--- a/src/mesa/tnl_dd/t_dd_dmatmp.h
+++ b/src/mesa/tnl_dd/t_dd_dmatmp.h
@@ -39,7 +39,7 @@
* tristrips, lineloops to linestrips), or to indexed vertices.
*/
-#if !defined(HAVE_TRIANGLES) || !HAVE_LINES || !HAVE_LINE_STRIPS
+#if !HAVE_TRIANGLES || !HAVE_LINES || !HAVE_LINE_STRIPS
#error "must have lines, line strips, and triangles to use render template"
#endif
@@ -552,7 +552,7 @@ static void TAG(render_quads_verts)(struct gl_context *ctx,
RELEASE_ELT_VERTS();
}
- else if (HAVE_TRIANGLES) {
+ else {
/* Hardware doesn't have a quad primitive type -- try to
* simulate it using triangle primitive. This is a win for
* gears, but is it useful in the broader world?
@@ -574,12 +574,6 @@ static void TAG(render_quads_verts)(struct gl_context *ctx,
(void) tmp;
}
}
- else {
- /* Vertices won't fit in a single buffer, should never happen.
- */
- fprintf(stderr, "%s - cannot draw primitive\n", __func__);
- return;
- }
}
static void TAG(render_noop)( struct gl_context *ctx,
@@ -1081,7 +1075,7 @@ static GLboolean TAG(validate_render)( struct gl_context *ctx,
ok = !ctx->Line.StippleFlag;
break;
case GL_TRIANGLES:
- ok = HAVE_TRIANGLES;
+ ok = GL_TRUE;
break;
case GL_TRIANGLE_STRIP:
ok = HAVE_TRI_STRIPS;
@@ -1118,7 +1112,7 @@ static GLboolean TAG(validate_render)( struct gl_context *ctx,
ok = (GLint) count < GET_SUBSEQUENT_VB_MAX_ELTS();
}
else {
- ok = HAVE_TRIANGLES; /* flatshading is ok. */
+ ok = GL_TRUE; /* flatshading is ok. */
}
break;
default: