glsl: Add ir_demote

To represent the new `demote` keyword when using
EXT_demote_to_helper_invocation extension.  Most of the changes are to
include it in the visitors.

Demote is not considered a control flow, so also include an empty
visit member function in ir_control_flow_visitor.

Only NIR actually supports `demote`, so assert the translations for
TGSI and Mesa's gl_program -- since the demote is not expected to
appear for those.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
This commit is contained in:
Caio Marcelo de Oliveira Filho
2019-09-20 09:27:00 -07:00
parent c81b912eb7
commit af1a6f0f77
11 changed files with 95 additions and 0 deletions

View File

@@ -564,6 +564,13 @@ ir_print_visitor::visit(ir_discard *ir)
}
void
ir_print_visitor::visit(ir_demote *ir)
{
fprintf(f, "(demote)");
}
void
ir_print_visitor::visit(ir_if *ir)
{