diff options
author | Brian <[email protected]> | 2008-01-23 12:48:41 -0700 |
---|---|---|
committer | Brian <[email protected]> | 2008-01-23 12:48:41 -0700 |
commit | cd3643698eafa0869a8317b002e5b066de0172e7 (patch) | |
tree | e7474c2e8079b5069b68adca09bd9882bf65c4c9 /src/mesa/pipe/draw/draw_stipple.c | |
parent | b3f081999f8eb904370df7492e39184268c77c13 (diff) |
gallium: overhaul usage of vertex_info in draw module.
Remove all dependencies on vertex_info, except for draw_vbuf.
Drawing stages now strictly operate on post-transformed vertices and don't
know anything about hw vertices.
Use vertex program output info for two-side/flat/etc stages.
Temporarily disable vbuf module in softpipe driver.
Diffstat (limited to 'src/mesa/pipe/draw/draw_stipple.c')
-rw-r--r-- | src/mesa/pipe/draw/draw_stipple.c | 30 |
1 files changed, 8 insertions, 22 deletions
diff --git a/src/mesa/pipe/draw/draw_stipple.c b/src/mesa/pipe/draw/draw_stipple.c index 3e0d5689e18..2a47eb7be23 100644 --- a/src/mesa/pipe/draw/draw_stipple.c +++ b/src/mesa/pipe/draw/draw_stipple.c @@ -61,6 +61,7 @@ stipple_stage(struct draw_stage *stage) /** * Compute interpolated vertex attributes for 'dst' at position 't' * between 'v0' and 'v1'. + * XXX using linear interpolation for all attribs at this time. */ static void screen_interp( struct draw_context *draw, @@ -70,28 +71,13 @@ screen_interp( struct draw_context *draw, const struct vertex_header *v1 ) { uint attr; - for (attr = 0; attr < draw->vertex_info.num_attribs; attr++) { - switch (draw->vertex_info.interp_mode[attr]) { - case INTERP_NONE: - case INTERP_CONSTANT: - COPY_4FV(dst->data[attr], v0->data[attr]); - break; - case INTERP_PERSPECTIVE: - /* Fall-through */ - /* XXX special-case perspective? */ - case INTERP_LINEAR: - { - const float *val0 = v0->data[attr]; - const float *val1 = v1->data[attr]; - float *newv = dst->data[attr]; - uint i; - for (i = 0; i < 4; i++) { - newv[i] = val0[i] + t * (val1[i] - val0[i]); - } - } - break; - default: - abort(); + for (attr = 0; attr < draw->num_vs_outputs; attr++) { + const float *val0 = v0->data[attr]; + const float *val1 = v1->data[attr]; + float *newv = dst->data[attr]; + uint i; + for (i = 0; i < 4; i++) { + newv[i] = val0[i] + t * (val1[i] - val0[i]); } } } |