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
This commit is contained in:
parent
8b2d5f431f
commit
668cdbe129
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue