glsl: Add conditional-select IR.
It's a ?: that operates per-component on vectors. Will be used in upcoming lowering pass for ldexp and the implementation of frexp. csel(selector, a, b): per-component result = selector ? a : b Reviewed-by: Kenneth Graunke <kenneth@whitecape.org> Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
This commit is contained in:
@@ -436,6 +436,7 @@ ir_expression::ir_expression(int op, ir_rvalue *op0, ir_rvalue *op1,
|
||||
break;
|
||||
|
||||
case ir_triop_bfi:
|
||||
case ir_triop_csel:
|
||||
this->type = op1->type;
|
||||
break;
|
||||
|
||||
@@ -553,6 +554,7 @@ static const char *const operator_strs[] = {
|
||||
"vector_extract",
|
||||
"fma",
|
||||
"lrp",
|
||||
"csel",
|
||||
"bfi",
|
||||
"bitfield_extract",
|
||||
"vector_insert",
|
||||
|
Reference in New Issue
Block a user