glsl: Add ir_demote
authorCaio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
Fri, 20 Sep 2019 16:27:00 +0000 (09:27 -0700)
committerCaio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
Mon, 30 Sep 2019 19:44:30 +0000 (12:44 -0700)
commitaf1a6f0f770ae7432fd506f5f33fbe9e00e253af
treedc2216dfc44b1dbd1bbce05f27b7fd0bbc146ed1
parentc81b912eb7adff326070fc18353d51ef6dec0dcb
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>
src/compiler/glsl/glsl_to_nir.cpp
src/compiler/glsl/ir.h
src/compiler/glsl/ir_clone.cpp
src/compiler/glsl/ir_hierarchical_visitor.cpp
src/compiler/glsl/ir_hierarchical_visitor.h
src/compiler/glsl/ir_hv_accept.cpp
src/compiler/glsl/ir_print_visitor.cpp
src/compiler/glsl/ir_print_visitor.h
src/compiler/glsl/ir_visitor.h
src/mesa/program/ir_to_mesa.cpp
src/mesa/state_tracker/st_glsl_to_tgsi.cpp