Skip to content

glsl: Fix many bugs in lowering to ir_triop_csel

Ian Romanick requested to merge idr/mesa:review/issue-6292 into main

ir_triop_csel is a very restricted opcode. The key restriction that was violated in afee5dc6 is that all the sources, including the Boolean selector, must have the same number of vector elements.

In a conditional assignment, the Boolean control was always a scalar.

In a conditional assignment with a write mask, the LHS and the RHS could have different number of components.

This commit fixes both of those issues. It also adds a missing clone() of the LHS that was noticed by Illia.

Fixes: afee5dc6 ("glsl: Lower if to conditional select instead of conditional assignment")
Closes: #6292 (closed)

Edited by Ian Romanick

Merge request reports