diff options
author | Caio Marcelo de Oliveira Filho <[email protected]> | 2019-09-20 09:27:00 -0700 |
---|---|---|
committer | Caio Marcelo de Oliveira Filho <[email protected]> | 2019-09-30 12:44:30 -0700 |
commit | af1a6f0f770ae7432fd506f5f33fbe9e00e253af (patch) | |
tree | dc2216dfc44b1dbd1bbce05f27b7fd0bbc146ed1 /src/compiler/glsl/ir.h | |
parent | c81b912eb7adff326070fc18353d51ef6dec0dcb (diff) |
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 <[email protected]>
Diffstat (limited to 'src/compiler/glsl/ir.h')
-rw-r--r-- | src/compiler/glsl/ir.h | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/src/compiler/glsl/ir.h b/src/compiler/glsl/ir.h index ba831f2c1ed..e3c28bbb2b8 100644 --- a/src/compiler/glsl/ir.h +++ b/src/compiler/glsl/ir.h @@ -74,6 +74,7 @@ enum ir_node_type { ir_type_loop_jump, ir_type_return, ir_type_discard, + ir_type_demote, ir_type_emit_vertex, ir_type_end_primitive, ir_type_barrier, @@ -1805,6 +1806,28 @@ public: /** + * IR instruction representing demote statements from + * GL_EXT_demote_to_helper_invocation. + */ +class ir_demote : public ir_instruction { +public: + ir_demote() + : ir_instruction(ir_type_demote) + { + } + + virtual ir_demote *clone(void *mem_ctx, struct hash_table *ht) const; + + virtual void accept(ir_visitor *v) + { + v->visit(this); + } + + virtual ir_visitor_status accept(ir_hierarchical_visitor *); +}; + + +/** * Texture sampling opcodes used in ir_texture */ enum ir_texture_opcode { |