Skip to content

Commit

Permalink
Implement csel printing
Browse files Browse the repository at this point in the history
  • Loading branch information
jrmuizel committed Dec 18, 2019
1 parent 6df8af4 commit f758ca0
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/glsl/ir_print_glsl_visitor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -754,6 +754,16 @@ void ir_print_glsl_visitor::visit(ir_expression *ir)
buffer.asprintf_append (")");
}
}
else if (ir->operation == ir_triop_csel)
{
buffer.asprintf_append ("mix(");
ir->operands[2]->accept(this);
buffer.asprintf_append (", ");
ir->operands[1]->accept(this);
buffer.asprintf_append (", bvec%d(", ir->operands[1]->type->vector_elements);
ir->operands[0]->accept(this);
buffer.asprintf_append ("))");
}
else if (ir->operation == ir_binop_vector_extract)
{
// a[b]
Expand Down

0 comments on commit f758ca0

Please sign in to comment.