diff options
Diffstat (limited to 'src/glsl/ir_constant_expression.cpp')
-rw-r--r-- | src/glsl/ir_constant_expression.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/glsl/ir_constant_expression.cpp b/src/glsl/ir_constant_expression.cpp index 38b6dd59759..f5b5bd87b6b 100644 --- a/src/glsl/ir_constant_expression.cpp +++ b/src/glsl/ir_constant_expression.cpp @@ -1710,10 +1710,10 @@ ir_expression::constant_expression_value(struct hash_table *variable_context) } case ir_quadop_bitfield_insert: { - int offset = op[2]->value.i[0]; - int bits = op[3]->value.i[0]; - for (unsigned c = 0; c < components; c++) { + int offset = op[2]->value.i[c]; + int bits = op[3]->value.i[c]; + if (bits == 0) data.u[c] = op[0]->value.u[c]; else if (offset < 0 || bits < 0) |