aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa
diff options
context:
space:
mode:
authorEric Anholt <[email protected]>2010-09-30 13:26:38 -0700
committerEric Anholt <[email protected]>2010-09-30 13:45:42 -0700
commitc6960e4471abe287448b9d0e7e6519d588cdf43c (patch)
treeb48af23d142a28d051970171160cb6464f7c3ae1 /src/mesa
parenta7cddd7de3123eb13e68c35aa111ff4060669f59 (diff)
i965: Fix new FS handling of builtin uniforms with packed scalars in structs.
We were pointing each element at the .x channel of the ParameterValues. Fixes glsl1-linear fog.
Diffstat (limited to 'src/mesa')
-rw-r--r--src/mesa/drivers/dri/i965/brw_fs.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_fs.cpp b/src/mesa/drivers/dri/i965/brw_fs.cpp
index efa0f2136b2..0a77b5ab4ed 100644
--- a/src/mesa/drivers/dri/i965/brw_fs.cpp
+++ b/src/mesa/drivers/dri/i965/brw_fs.cpp
@@ -696,12 +696,12 @@ fs_visitor::setup_builtin_uniform_values(ir_variable *ir)
*/
int last_swiz = -1;
for (unsigned int i = 0; i < 4; i++) {
- int this_swiz = GET_SWZ(element->swizzle, i);
- if (this_swiz == last_swiz)
+ int swiz = GET_SWZ(element->swizzle, i);
+ if (swiz == last_swiz)
break;
- last_swiz = this_swiz;
+ last_swiz = swiz;
- c->prog_data.param[c->prog_data.nr_params++] = &vec_values[i];
+ c->prog_data.param[c->prog_data.nr_params++] = &vec_values[swiz];
}
}
}