Mesa (master): i965: Fix new FS handling of builtin uniforms with packed scalars in structs.
Eric Anholt
anholt at kemper.freedesktop.org
Thu Sep 30 20:47:22 UTC 2010
Module: Mesa
Branch: master
Commit: c6960e4471abe287448b9d0e7e6519d588cdf43c
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=c6960e4471abe287448b9d0e7e6519d588cdf43c
Author: Eric Anholt <eric at anholt.net>
Date: Thu Sep 30 13:26:38 2010 -0700
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.
---
src/mesa/drivers/dri/i965/brw_fs.cpp | 8 ++++----
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 efa0f21..0a77b5a 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];
}
}
}
More information about the mesa-commit
mailing list