diff options
author | Eric Anholt <[email protected]> | 2010-09-27 15:46:51 -0700 |
---|---|---|
committer | Ian Romanick <[email protected]> | 2010-09-28 18:31:05 -0700 |
commit | 1ab0d45c9fc78c86597f376478dd98973d6a4b49 (patch) | |
tree | 3cdf7d3737e29238e3e92e4c8dbb232c793417df | |
parent | 269dd5116293f0bc94f6fd7c03f7446b75776470 (diff) |
glsl: Fix broadcast_index of lower_variable_index_to_cond_assign.
It's trying to get an int smeared across all channels, not trying to
get a 1:1 mapping of a subset of a vector's channels. This usually
ended up not mattering with ir_to_mesa, since it just smears floats
into every chan of a vec4.
Fixes:
glsl1-temp array with swizzled variable indexing
(cherry picked from commit 668cdbe12958247f4a563c362dbf3247de7ccc3f)
-rw-r--r-- | src/glsl/lower_variable_index_to_cond_assign.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/glsl/lower_variable_index_to_cond_assign.cpp b/src/glsl/lower_variable_index_to_cond_assign.cpp index 68f30ca0ef8..5f0dd731135 100644 --- a/src/glsl/lower_variable_index_to_cond_assign.cpp +++ b/src/glsl/lower_variable_index_to_cond_assign.cpp @@ -117,7 +117,7 @@ struct switch_generator new(this->mem_ctx) ir_dereference_variable(index); if (comps) { - const ir_swizzle_mask m = { 0, 1, 2, 3, comps, false }; + const ir_swizzle_mask m = { 0, 0, 0, 0, comps, false }; broadcast_index = new(this->mem_ctx) ir_swizzle(broadcast_index, m); } |