diff options
author | Ian Romanick <[email protected]> | 2015-09-14 12:46:21 -0700 |
---|---|---|
committer | Ian Romanick <[email protected]> | 2015-09-23 09:56:56 -0700 |
commit | b8461e03f01167a8bafe7fa9f12ff0ec246533b4 (patch) | |
tree | 2d82e0b87caa6ca3c19ece27099c1596734dcfae /src | |
parent | 265624c5af6f7eaa18bc81cc8aa8aeb0f5801861 (diff) |
t_dd_dmatmp: Require HAVE_LINES
Two drivers use this file, and both support lines.
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')
-rw-r--r-- | src/mesa/tnl_dd/t_dd_dmatmp.h | 17 |
1 files changed, 3 insertions, 14 deletions
diff --git a/src/mesa/tnl_dd/t_dd_dmatmp.h b/src/mesa/tnl_dd/t_dd_dmatmp.h index dadbf21d54a..14dfa1d5659 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) -#error "must have at least triangles to use render template" +#if !defined(HAVE_TRIANGLES) || !HAVE_LINES +#error "must have lines and triangles to use render template" #endif #if HAVE_QUAD_STRIPS || HAVE_QUADS @@ -142,7 +142,6 @@ static void TAG(render_lines_verts)( struct gl_context *ctx, GLuint count, GLuint flags ) { - if (HAVE_LINES) { LOCAL_VARS; int dmasz = GET_SUBSEQUENT_VB_MAX_VERTS(); int currentsz; @@ -165,11 +164,6 @@ static void TAG(render_lines_verts)( struct gl_context *ctx, TAG(emit_verts)(ctx, start + j, nr, ALLOC_VERTS(nr)); currentsz = dmasz; } - - } else { - fprintf(stderr, "%s - cannot draw primitive\n", __func__); - return; - } } @@ -673,7 +667,6 @@ static void TAG(render_lines_elts)( struct gl_context *ctx, GLuint count, GLuint flags ) { - if (HAVE_LINES) { LOCAL_VARS; int dmasz = GET_SUBSEQUENT_VB_MAX_ELTS(); int currentsz; @@ -698,10 +691,6 @@ static void TAG(render_lines_elts)( struct gl_context *ctx, FLUSH(); currentsz = dmasz; } - } else { - fprintf(stderr, "%s - cannot draw primitive\n", __func__); - return; - } } @@ -1122,7 +1111,7 @@ static GLboolean TAG(validate_render)( struct gl_context *ctx, ok = HAVE_POINTS; break; case GL_LINES: - ok = HAVE_LINES && !ctx->Line.StippleFlag; + ok = !ctx->Line.StippleFlag; break; case GL_LINE_STRIP: ok = HAVE_LINE_STRIPS && !ctx->Line.StippleFlag; |