summaryrefslogtreecommitdiffstats
path: root/src/mesa/tnl_dd
diff options
context:
space:
mode:
authorIan Romanick <[email protected]>2015-09-14 14:08:40 -0700
committerIan Romanick <[email protected]>2015-09-23 09:57:01 -0700
commit1ecdf956ac699aee5e8c62887a40608accb0ac94 (patch)
tree47c3669c3242e8ce67c5f25deef2485f83977006 /src/mesa/tnl_dd
parent1ab8a69a3b7e2846a602f14aa6e4dd5994be1615 (diff)
t_dd_dmatmp: Require HAVE_LINE_STRIPS
Two drivers use this file, and both support line strips. 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.h33
1 files changed, 4 insertions, 29 deletions
diff --git a/src/mesa/tnl_dd/t_dd_dmatmp.h b/src/mesa/tnl_dd/t_dd_dmatmp.h
index 477fe36c9e9..c0fe5d09d30 100644
--- a/src/mesa/tnl_dd/t_dd_dmatmp.h
+++ b/src/mesa/tnl_dd/t_dd_dmatmp.h
@@ -39,8 +39,8 @@
* tristrips, lineloops to linestrips), or to indexed vertices.
*/
-#if !defined(HAVE_TRIANGLES) || !HAVE_LINES
-#error "must have lines and triangles to use render template"
+#if !defined(HAVE_TRIANGLES) || !HAVE_LINES || !HAVE_LINE_STRIPS
+#error "must have lines, line strips, and triangles to use render template"
#endif
#if HAVE_QUAD_STRIPS || HAVE_QUADS
@@ -172,7 +172,6 @@ static void TAG(render_line_strip_verts)( struct gl_context *ctx,
GLuint count,
GLuint flags )
{
- if (HAVE_LINE_STRIPS) {
LOCAL_VARS;
int dmasz = GET_SUBSEQUENT_VB_MAX_VERTS();
int currentsz;
@@ -191,11 +190,6 @@ static void TAG(render_line_strip_verts)( struct gl_context *ctx,
}
FLUSH();
-
- } else {
- fprintf(stderr, "%s - cannot draw primitive\n", __func__);
- return;
- }
}
@@ -204,7 +198,6 @@ static void TAG(render_line_loop_verts)( struct gl_context *ctx,
GLuint count,
GLuint flags )
{
- if (HAVE_LINE_STRIPS) {
LOCAL_VARS;
int dmasz = GET_SUBSEQUENT_VB_MAX_VERTS();
int currentsz;
@@ -254,11 +247,6 @@ static void TAG(render_line_loop_verts)( struct gl_context *ctx,
}
FLUSH();
-
- } else {
- fprintf(stderr, "%s - cannot draw primitive\n", __func__);
- return;
- }
}
@@ -699,7 +687,6 @@ static void TAG(render_line_strip_elts)( struct gl_context *ctx,
GLuint count,
GLuint flags )
{
- if (HAVE_LINE_STRIPS) {
LOCAL_VARS;
int dmasz = GET_SUBSEQUENT_VB_MAX_ELTS();
int currentsz;
@@ -719,12 +706,6 @@ static void TAG(render_line_strip_elts)( struct gl_context *ctx,
FLUSH();
currentsz = dmasz;
}
- } else {
- /* TODO: Try to emit as indexed lines.
- */
- fprintf(stderr, "%s - cannot draw primitive\n", __func__);
- return;
- }
}
@@ -733,7 +714,6 @@ static void TAG(render_line_loop_elts)( struct gl_context *ctx,
GLuint count,
GLuint flags )
{
- if (HAVE_LINE_STRIPS) {
LOCAL_VARS;
int dmasz = GET_SUBSEQUENT_VB_MAX_ELTS();
int currentsz;
@@ -785,11 +765,6 @@ static void TAG(render_line_loop_elts)( struct gl_context *ctx,
}
FLUSH();
- } else {
- /* TODO: Try to emit as indexed lines */
- fprintf(stderr, "%s - cannot draw primitive\n", __func__);
- return;
- }
}
@@ -1114,10 +1089,10 @@ static GLboolean TAG(validate_render)( struct gl_context *ctx,
ok = !ctx->Line.StippleFlag;
break;
case GL_LINE_STRIP:
- ok = HAVE_LINE_STRIPS && !ctx->Line.StippleFlag;
+ ok = !ctx->Line.StippleFlag;
break;
case GL_LINE_LOOP:
- ok = HAVE_LINE_STRIPS && !ctx->Line.StippleFlag;
+ ok = !ctx->Line.StippleFlag;
break;
case GL_TRIANGLES:
ok = HAVE_TRIANGLES;