diff options
author | Brian <[email protected]> | 2007-07-10 11:03:51 -0600 |
---|---|---|
committer | Brian <[email protected]> | 2007-07-10 11:03:51 -0600 |
commit | 17b86cfa4e9403b2d887d832556dc4f1a1271ce0 (patch) | |
tree | 7d5e691091857520e6c38395c2aa5ddb12cf96e2 /src | |
parent | e7a208514812506eeb9862b91258392da646b618 (diff) |
Comments, minor clean-up.
Diffstat (limited to 'src')
-rw-r--r-- | src/mesa/pipe/softpipe/sp_state_derived.c | 21 |
1 files changed, 12 insertions, 9 deletions
diff --git a/src/mesa/pipe/softpipe/sp_state_derived.c b/src/mesa/pipe/softpipe/sp_state_derived.c index dd8a490f3b5..429ae55397e 100644 --- a/src/mesa/pipe/softpipe/sp_state_derived.c +++ b/src/mesa/pipe/softpipe/sp_state_derived.c @@ -36,18 +36,18 @@ #include "sp_state.h" -#define EMIT_ATTR( ATTR, FRAG_ATTR, INTERP ) \ -do { \ - slot_to_vf_attr[softpipe->nr_attrs] = ATTR; \ - softpipe->vf_attr_to_slot[ATTR] = softpipe->nr_attrs; \ +#define EMIT_ATTR( VF_ATTR, FRAG_ATTR, INTERP ) \ +do { \ + slot_to_vf_attr[softpipe->nr_attrs] = VF_ATTR; \ + softpipe->vf_attr_to_slot[VF_ATTR] = softpipe->nr_attrs; \ softpipe->fp_attr_to_slot[FRAG_ATTR] = softpipe->nr_attrs; \ - softpipe->interp[softpipe->nr_attrs] = INTERP; \ - softpipe->nr_attrs++; \ - attr_mask |= (1<<ATTR); \ + softpipe->interp[softpipe->nr_attrs] = INTERP; \ + softpipe->nr_attrs++; \ + attr_mask |= (1 << (VF_ATTR)); \ } while (0) -static GLuint frag_to_vf[FRAG_ATTRIB_MAX] = +static const GLuint frag_to_vf[FRAG_ATTRIB_MAX] = { VF_ATTRIB_POS, VF_ATTRIB_COLOR0, @@ -71,7 +71,7 @@ static void calculate_vertex_layout( struct softpipe_context *softpipe ) struct gl_fragment_program *fp = softpipe->fs.fp; const GLuint inputsRead = fp->Base.InputsRead; GLuint slot_to_vf_attr[VF_ATTRIB_MAX]; - GLuint attr_mask = 0; + GLbitfield attr_mask = 0x0; GLuint i; softpipe->nr_attrs = 0; @@ -116,6 +116,9 @@ static void calculate_vertex_layout( struct softpipe_context *softpipe ) } } + /* If the attributes have changed, tell the draw module (which in turn + * tells the vf module) about the new vertex layout. + */ if (attr_mask != softpipe->attr_mask) { softpipe->attr_mask = attr_mask; |