diff options
author | Eric Anholt <[email protected]> | 2011-08-09 14:49:29 -0700 |
---|---|---|
committer | Eric Anholt <[email protected]> | 2011-08-16 13:04:43 -0700 |
commit | fea7d34b3545878ce00914f388e1eeebf55f7748 (patch) | |
tree | 973215452ad1cac921b97f2e35dbd241a49240d6 /src/mesa | |
parent | 0b359e3ea015576d0e75bf5ec19aceef337311a3 (diff) |
i965/vs: Fix builtin uniform setup.
I want to intelligently pack them at some point, but for now we have
the params set up in groups of 4. Fixes glsl-vs-normalscale.
Diffstat (limited to 'src/mesa')
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp b/src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp index e11ec40cc7b..93252f73285 100644 --- a/src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp +++ b/src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp @@ -443,13 +443,12 @@ vec4_visitor::setup_builtin_uniform_values(ir_variable *ir) int last_swiz = -1; for (unsigned int j = 0; j < 4; j++) { int swiz = GET_SWZ(slots[i].swizzle, j); - if (swiz == last_swiz) - break; last_swiz = swiz; c->prog_data.param[this->uniforms * 4 + j] = &values[swiz]; c->prog_data.param_convert[this->uniforms * 4 + j] = PARAM_NO_CONVERT; - this->uniform_size[this->uniforms]++; + if (swiz <= last_swiz) + this->uniform_size[this->uniforms]++; } this->uniforms++; } |