summaryrefslogtreecommitdiffstats
path: root/src/mesa/pipe/softpipe
diff options
context:
space:
mode:
authorBrian <[email protected]>2007-08-30 14:41:23 -0600
committerBrian <[email protected]>2007-08-30 14:43:08 -0600
commit942b9bc5bc13d959baa86779a7c669cf96659b9a (patch)
tree8753ff6f40f91fb7b3eff740ccde1edb35349bed /src/mesa/pipe/softpipe
parentaaf03b94861cbf5a602863e4542dd1c2e54ba365 (diff)
In draw_flatshade.c use vertex_info->interp_mode[] to choose attribs/colors to cpy.
One less dependency on the TGSI_ATTRIB_x flags. This requires setting the vertex_info->interp_mode[] values in the i915 driver and passing them to draw_set_vertex_attributes().
Diffstat (limited to 'src/mesa/pipe/softpipe')
-rw-r--r--src/mesa/pipe/softpipe/sp_context.h7
-rw-r--r--src/mesa/pipe/softpipe/sp_prim_setup.c4
-rw-r--r--src/mesa/pipe/softpipe/sp_state_derived.c4
3 files changed, 7 insertions, 8 deletions
diff --git a/src/mesa/pipe/softpipe/sp_context.h b/src/mesa/pipe/softpipe/sp_context.h
index ddd06ab0b78..fd0af6f727d 100644
--- a/src/mesa/pipe/softpipe/sp_context.h
+++ b/src/mesa/pipe/softpipe/sp_context.h
@@ -46,13 +46,6 @@ struct draw_context;
struct draw_stage;
-enum interp_mode {
- INTERP_CONSTANT,
- INTERP_LINEAR,
- INTERP_PERSPECTIVE
-};
-
-
#define SP_NEW_VIEWPORT 0x1
#define SP_NEW_SETUP 0x2
#define SP_NEW_FS 0x4
diff --git a/src/mesa/pipe/softpipe/sp_prim_setup.c b/src/mesa/pipe/softpipe/sp_prim_setup.c
index a7e1c9e017a..b3c9f51e95c 100644
--- a/src/mesa/pipe/softpipe/sp_prim_setup.c
+++ b/src/mesa/pipe/softpipe/sp_prim_setup.c
@@ -487,6 +487,10 @@ static void setup_tri_coefficients( struct setup_stage *setup )
for (j = 0; j < NUM_CHANNELS; j++)
tri_persp_coeff(setup, slot, j);
break;
+
+ default:
+ /* invalid interp mode */
+ assert(0);
}
}
}
diff --git a/src/mesa/pipe/softpipe/sp_state_derived.c b/src/mesa/pipe/softpipe/sp_state_derived.c
index 3bbe9c9fd9d..ff0a275fcea 100644
--- a/src/mesa/pipe/softpipe/sp_state_derived.c
+++ b/src/mesa/pipe/softpipe/sp_state_derived.c
@@ -135,11 +135,13 @@ static void calculate_vertex_layout( struct softpipe_context *softpipe )
/* If the attributes have changed, tell the draw module about
* the new vertex layout.
*/
- if (vinfo->attr_mask != softpipe->attr_mask) {
+ /* XXX we also need to do this when the shading mode (interp modes) change: */
+ if (1/*vinfo->attr_mask != softpipe->attr_mask*/) {
softpipe->attr_mask = vinfo->attr_mask;
draw_set_vertex_attributes( softpipe->draw,
vinfo->slot_to_attrib,
+ vinfo->interp_mode,
vinfo->num_attribs);
}
}