summaryrefslogtreecommitdiffstats
path: root/src/mesa/tnl_dd
diff options
context:
space:
mode:
authorIan Romanick <ian.d.romanick@intel.com>2015-09-14 14:14:08 -0700
committerIan Romanick <ian.d.romanick@intel.com>2015-09-23 09:57:04 -0700
commitdcd8e49962b550f8854fff20e0369dae5550f640 (patch)
tree363f8324b30b74e93cf1db74fae51d9fdf068cf1 /src/mesa/tnl_dd
parent1ecdf956ac699aee5e8c62887a40608accb0ac94 (diff)
downloadexternal_mesa3d-dcd8e49962b550f8854fff20e0369dae5550f640.zip
external_mesa3d-dcd8e49962b550f8854fff20e0369dae5550f640.tar.gz
external_mesa3d-dcd8e49962b550f8854fff20e0369dae5550f640.tar.bz2
t_dd_dmatmp: Indentation and formatting fixes after HAVE_LINE_STRIPS change
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>
Diffstat (limited to 'src/mesa/tnl_dd')
-rw-r--r--src/mesa/tnl_dd/t_dd_dmatmp.h260
1 files changed, 123 insertions, 137 deletions
diff --git a/src/mesa/tnl_dd/t_dd_dmatmp.h b/src/mesa/tnl_dd/t_dd_dmatmp.h
index c0fe5d0..bfdae5a 100644
--- a/src/mesa/tnl_dd/t_dd_dmatmp.h
+++ b/src/mesa/tnl_dd/t_dd_dmatmp.h
@@ -167,86 +167,81 @@ static void TAG(render_lines_verts)(struct gl_context *ctx,
}
-static void TAG(render_line_strip_verts)( struct gl_context *ctx,
- GLuint start,
- GLuint count,
- GLuint flags )
+static void TAG(render_line_strip_verts)(struct gl_context *ctx,
+ GLuint start,
+ GLuint count,
+ GLuint flags)
{
- LOCAL_VARS;
- int dmasz = GET_SUBSEQUENT_VB_MAX_VERTS();
- int currentsz;
- GLuint j, nr;
+ LOCAL_VARS;
+ int dmasz = GET_SUBSEQUENT_VB_MAX_VERTS();
+ int currentsz;
+ GLuint j, nr;
- INIT( GL_LINE_STRIP );
+ INIT(GL_LINE_STRIP);
- currentsz = GET_CURRENT_VB_MAX_VERTS();
- if (currentsz < 8)
- currentsz = dmasz;
+ currentsz = GET_CURRENT_VB_MAX_VERTS();
+ if (currentsz < 8)
+ currentsz = dmasz;
- for (j = 0; j + 1 < count; j += nr - 1 ) {
- nr = MIN2( currentsz, count - j );
- TAG(emit_verts)(ctx, start + j, nr, ALLOC_VERTS(nr));
- currentsz = dmasz;
- }
+ for (j = 0; j + 1 < count; j += nr - 1) {
+ nr = MIN2(currentsz, count - j);
+ TAG(emit_verts)(ctx, start + j, nr, ALLOC_VERTS(nr));
+ currentsz = dmasz;
+ }
- FLUSH();
+ FLUSH();
}
-static void TAG(render_line_loop_verts)( struct gl_context *ctx,
- GLuint start,
- GLuint count,
- GLuint flags )
+static void TAG(render_line_loop_verts)(struct gl_context *ctx,
+ GLuint start,
+ GLuint count,
+ GLuint flags)
{
- LOCAL_VARS;
- int dmasz = GET_SUBSEQUENT_VB_MAX_VERTS();
- int currentsz;
- GLuint j, nr;
-
- INIT( GL_LINE_STRIP );
+ LOCAL_VARS;
+ int dmasz = GET_SUBSEQUENT_VB_MAX_VERTS();
+ int currentsz;
+ GLuint j, nr;
- j = (flags & PRIM_BEGIN) ? 0 : 1;
+ INIT(GL_LINE_STRIP);
- /* Ensure last vertex won't wrap buffers:
- */
- currentsz = GET_CURRENT_VB_MAX_VERTS();
- currentsz--;
- dmasz--;
+ j = (flags & PRIM_BEGIN) ? 0 : 1;
- if (currentsz < 8) {
- currentsz = dmasz;
- }
-
- if (j + 1 < count) {
- for ( ; j + 1 < count; j += nr - 1 ) {
- nr = MIN2( currentsz, count - j );
+ /* Ensure last vertex won't wrap buffers:
+ */
+ currentsz = GET_CURRENT_VB_MAX_VERTS();
+ currentsz--;
+ dmasz--;
- if (j + nr >= count &&
- count > 1 &&
- (flags & PRIM_END))
- {
- void *tmp;
- tmp = ALLOC_VERTS(nr+1);
- tmp = TAG(emit_verts)(ctx, start + j, nr, tmp);
- tmp = TAG(emit_verts)( ctx, start, 1, tmp );
- (void) tmp;
- }
- else {
- TAG(emit_verts)(ctx, start + j, nr, ALLOC_VERTS(nr));
- currentsz = dmasz;
- }
- }
+ if (currentsz < 8)
+ currentsz = dmasz;
+ if (j + 1 < count) {
+ for (/* empty */; j + 1 < count; j += nr - 1) {
+ nr = MIN2(currentsz, count - j);
+
+ if (j + nr >= count &&
+ count > 1 &&
+ (flags & PRIM_END)) {
+ void *tmp;
+ tmp = ALLOC_VERTS(nr+1);
+ tmp = TAG(emit_verts)(ctx, start + j, nr, tmp);
+ tmp = TAG(emit_verts)( ctx, start, 1, tmp );
+ (void) tmp;
+ } else {
+ TAG(emit_verts)(ctx, start + j, nr, ALLOC_VERTS(nr));
+ currentsz = dmasz;
+ }
}
- else if (count > 1 && (flags & PRIM_END)) {
- void *tmp;
- tmp = ALLOC_VERTS(2);
- tmp = TAG(emit_verts)( ctx, start+1, 1, tmp );
- tmp = TAG(emit_verts)( ctx, start, 1, tmp );
- (void) tmp;
- }
+ } else if (count > 1 && (flags & PRIM_END)) {
+ void *tmp;
+ tmp = ALLOC_VERTS(2);
+ tmp = TAG(emit_verts)( ctx, start+1, 1, tmp );
+ tmp = TAG(emit_verts)( ctx, start, 1, tmp );
+ (void) tmp;
+ }
- FLUSH();
+ FLUSH();
}
@@ -682,89 +677,84 @@ static void TAG(render_lines_elts)(struct gl_context *ctx,
}
-static void TAG(render_line_strip_elts)( struct gl_context *ctx,
- GLuint start,
- GLuint count,
- GLuint flags )
+static void TAG(render_line_strip_elts)(struct gl_context *ctx,
+ GLuint start,
+ GLuint count,
+ GLuint flags)
{
- LOCAL_VARS;
- int dmasz = GET_SUBSEQUENT_VB_MAX_ELTS();
- int currentsz;
- GLuint *elts = TNL_CONTEXT(ctx)->vb.Elts;
- GLuint j, nr;
+ LOCAL_VARS;
+ int dmasz = GET_SUBSEQUENT_VB_MAX_ELTS();
+ int currentsz;
+ GLuint *elts = TNL_CONTEXT(ctx)->vb.Elts;
+ GLuint j, nr;
- FLUSH(); /* always a new primitive */
- ELT_INIT( GL_LINE_STRIP );
+ FLUSH(); /* always a new primitive */
+ ELT_INIT(GL_LINE_STRIP);
- currentsz = GET_CURRENT_VB_MAX_ELTS();
- if (currentsz < 8)
- currentsz = dmasz;
+ currentsz = GET_CURRENT_VB_MAX_ELTS();
+ if (currentsz < 8)
+ currentsz = dmasz;
- for (j = 0; j + 1 < count; j += nr - 1) {
- nr = MIN2( currentsz, count - j );
- TAG(emit_elts)( ctx, elts + start + j, nr, ALLOC_ELTS(nr));
- FLUSH();
- currentsz = dmasz;
- }
+ for (j = 0; j + 1 < count; j += nr - 1) {
+ nr = MIN2(currentsz, count - j);
+ TAG(emit_elts)(ctx, elts + start + j, nr, ALLOC_ELTS(nr));
+ FLUSH();
+ currentsz = dmasz;
+ }
}
-static void TAG(render_line_loop_elts)( struct gl_context *ctx,
- GLuint start,
- GLuint count,
- GLuint flags )
+static void TAG(render_line_loop_elts)(struct gl_context *ctx,
+ GLuint start,
+ GLuint count,
+ GLuint flags)
{
- LOCAL_VARS;
- int dmasz = GET_SUBSEQUENT_VB_MAX_ELTS();
- int currentsz;
- GLuint *elts = TNL_CONTEXT(ctx)->vb.Elts;
- GLuint j, nr;
-
- FLUSH();
- ELT_INIT( GL_LINE_STRIP );
-
- j = (flags & PRIM_BEGIN) ? 0 : 1;
-
- currentsz = GET_CURRENT_VB_MAX_ELTS();
- if (currentsz < 8) {
- currentsz = dmasz;
- }
+ LOCAL_VARS;
+ int dmasz = GET_SUBSEQUENT_VB_MAX_ELTS();
+ int currentsz;
+ GLuint *elts = TNL_CONTEXT(ctx)->vb.Elts;
+ GLuint j, nr;
- /* Ensure last vertex doesn't wrap:
- */
- currentsz--;
- dmasz--;
+ FLUSH();
+ ELT_INIT(GL_LINE_STRIP);
- if (j + 1 < count) {
- for ( ; j + 1 < count; j += nr - 1 ) {
- nr = MIN2( currentsz, count - j );
+ j = (flags & PRIM_BEGIN) ? 0 : 1;
- if (j + nr >= count &&
- count > 1 &&
- (flags & PRIM_END))
- {
- void *tmp;
- tmp = ALLOC_ELTS(nr+1);
- tmp = TAG(emit_elts)(ctx, elts + start + j, nr, tmp);
- tmp = TAG(emit_elts)( ctx, elts+start, 1, tmp );
- (void) tmp;
- }
- else {
- TAG(emit_elts)(ctx, elts + start + j, nr, ALLOC_ELTS(nr));
- currentsz = dmasz;
- }
- }
+ currentsz = GET_CURRENT_VB_MAX_ELTS();
+ if (currentsz < 8)
+ currentsz = dmasz;
+ /* Ensure last vertex doesn't wrap:
+ */
+ currentsz--;
+ dmasz--;
+
+ if (j + 1 < count) {
+ for (/* empty */; j + 1 < count; j += nr - 1) {
+ nr = MIN2(currentsz, count - j);
+
+ if (j + nr >= count &&
+ count > 1 &&
+ (flags & PRIM_END)) {
+ void *tmp;
+ tmp = ALLOC_ELTS(nr+1);
+ tmp = TAG(emit_elts)(ctx, elts + start + j, nr, tmp);
+ tmp = TAG(emit_elts)(ctx, elts + start, 1, tmp);
+ (void) tmp;
+ } else {
+ TAG(emit_elts)(ctx, elts + start + j, nr, ALLOC_ELTS(nr));
+ currentsz = dmasz;
+ }
}
- else if (count > 1 && (flags & PRIM_END)) {
- void *tmp;
- tmp = ALLOC_ELTS(2);
- tmp = TAG(emit_elts)( ctx, elts+start+1, 1, tmp );
- tmp = TAG(emit_elts)( ctx, elts+start, 1, tmp );
- (void) tmp;
- }
+ } else if (count > 1 && (flags & PRIM_END)) {
+ void *tmp;
+ tmp = ALLOC_ELTS(2);
+ tmp = TAG(emit_elts)( ctx, elts+start+1, 1, tmp );
+ tmp = TAG(emit_elts)( ctx, elts+start, 1, tmp );
+ (void) tmp;
+ }
- FLUSH();
+ FLUSH();
}
@@ -1086,11 +1076,7 @@ static GLboolean TAG(validate_render)( struct gl_context *ctx,
ok = HAVE_POINTS;
break;
case GL_LINES:
- ok = !ctx->Line.StippleFlag;
- break;
case GL_LINE_STRIP:
- ok = !ctx->Line.StippleFlag;
- break;
case GL_LINE_LOOP:
ok = !ctx->Line.StippleFlag;
break;