summaryrefslogtreecommitdiff
path: root/src/mesa
diff options
context:
space:
mode:
authorBrian <brian.paul@tungstengraphics.com>2007-07-24 14:31:16 -0600
committerBrian <brian.paul@tungstengraphics.com>2007-07-24 14:31:16 -0600
commit2de4c7573efe7bdccea48448c37a9f28124b8df7 (patch)
treecb11626e1df12f94c980698ced7fb76843fc4c4e /src/mesa
parent67b61520ce1fabe2256e606ea73729f44d57fa99 (diff)
Fix a typo (i << i) that was fouling up the vertex layout info.
Diffstat (limited to 'src/mesa')
-rw-r--r--src/mesa/pipe/softpipe/sp_state_derived.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/mesa/pipe/softpipe/sp_state_derived.c b/src/mesa/pipe/softpipe/sp_state_derived.c
index 27220ea8fa..a470cc256e 100644
--- a/src/mesa/pipe/softpipe/sp_state_derived.c
+++ b/src/mesa/pipe/softpipe/sp_state_derived.c
@@ -63,11 +63,14 @@ static const GLuint frag_to_vf[FRAG_ATTRIB_MAX] =
};
-/* Derived from: fs, setup states.
+/**
+ * Determine which post-transform / pre-rasterization vertex attributes
+ * we need.
+ * Derived from: fs, setup states.
*/
static void calculate_vertex_layout( struct softpipe_context *softpipe )
{
- const GLuint inputsRead = softpipe->fs.inputs_read;
+ const GLbitfield inputsRead = softpipe->fs.inputs_read;
GLuint slot_to_vf_attr[VF_ATTRIB_MAX];
GLbitfield attr_mask = 0x0;
GLuint i;
@@ -87,7 +90,7 @@ static void calculate_vertex_layout( struct softpipe_context *softpipe )
* as fixed point or ubyte format.
*/
for (i = 1; i < FRAG_ATTRIB_TEX0; i++) {
- if (inputsRead & (i << i)) {
+ if (inputsRead & (1 << i)) {
if (softpipe->setup.flatshade
&& (i == FRAG_ATTRIB_COL0 || i == FRAG_ATTRIB_COL1))
EMIT_ATTR(frag_to_vf[i], i, INTERP_CONSTANT);
@@ -97,7 +100,7 @@ static void calculate_vertex_layout( struct softpipe_context *softpipe )
}
for (i = FRAG_ATTRIB_TEX0; i < FRAG_ATTRIB_MAX; i++) {
- if (inputsRead & (i << i)) {
+ if (inputsRead & (1 << i)) {
EMIT_ATTR(frag_to_vf[i], i, INTERP_PERSPECTIVE);
}
}