summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorChia-I Wu <olv@lunarg.com>2010-08-04 14:37:40 +0800
committerChia-I Wu <olv@lunarg.com>2010-08-06 13:39:37 +0800
commit642d5ba79abc6a231a5fdabb3454b9b082b0d7f8 (patch)
tree01aacfc67ff435b636f3560ffa99c621f56d695f /src
parentf1fc444bb05421404f42e8d08e9085c6fb6ce7a9 (diff)
draw: Remove unnecessary vertex flag ANDs.
Vertex flags are a contract between vcache and the pipeline. They are set only for the first vertex of a primitive.
Diffstat (limited to 'src')
-rw-r--r--src/gallium/auxiliary/draw/draw_pipe.c34
1 files changed, 15 insertions, 19 deletions
diff --git a/src/gallium/auxiliary/draw/draw_pipe.c b/src/gallium/auxiliary/draw/draw_pipe.c
index 3421b826d9..070ac803c8 100644
--- a/src/gallium/auxiliary/draw/draw_pipe.c
+++ b/src/gallium/auxiliary/draw/draw_pipe.c
@@ -179,18 +179,17 @@ static void do_triangle( struct draw_context *draw,
do_triangle( draw, \
i0, /* flags */ \
verts + stride * (i0 & ~DRAW_PIPE_FLAG_MASK), \
- verts + stride * (i1 & ~DRAW_PIPE_FLAG_MASK), \
- verts + stride * (i2 & ~DRAW_PIPE_FLAG_MASK) )
+ verts + stride * (i1), \
+ verts + stride * (i2) )
#define LINE(flags,i0,i1) \
do_line( draw, \
i0, /* flags */ \
verts + stride * (i0 & ~DRAW_PIPE_FLAG_MASK), \
- verts + stride * (i1 & ~DRAW_PIPE_FLAG_MASK) )
+ verts + stride * (i1) )
#define POINT(i0) \
- do_point( draw, \
- verts + stride * (i0 & ~DRAW_PIPE_FLAG_MASK) )
+ do_point( draw, verts + stride * (i0) )
#define GET_ELT(idx) (elts[idx])
@@ -268,22 +267,19 @@ void draw_pipeline_run( struct draw_context *draw,
* This code is for non-indexed (aka linear) rendering (no elts).
*/
-#define TRIANGLE(flags,i0,i1,i2) \
- do_triangle( draw, \
- flags, /* flags */ \
- verts + stride * ((i0) & ~DRAW_PIPE_FLAG_MASK), \
- verts + stride * ((i1) & ~DRAW_PIPE_FLAG_MASK), \
- verts + stride * ((i2) & ~DRAW_PIPE_FLAG_MASK))
+#define TRIANGLE(flags,i0,i1,i2) \
+ do_triangle( draw, flags, \
+ verts + stride * (i0), \
+ verts + stride * (i1), \
+ verts + stride * (i2) )
-#define LINE(flags,i0,i1) \
- do_line( draw, \
- flags, \
- verts + stride * ((i0) & ~DRAW_PIPE_FLAG_MASK), \
- verts + stride * ((i1) & ~DRAW_PIPE_FLAG_MASK))
+#define LINE(flags,i0,i1) \
+ do_line( draw, flags, \
+ verts + stride * (i0), \
+ verts + stride * (i1) )
-#define POINT(i0) \
- do_point( draw, \
- verts + stride * ((i0) & ~DRAW_PIPE_FLAG_MASK) )
+#define POINT(i0) \
+ do_point( draw, verts + stride * (i0) )
#define GET_ELT(idx) (idx)