glsl: Add helperInvocationEXT() builtin
authorCaio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
Fri, 20 Sep 2019 17:50:37 +0000 (10:50 -0700)
committerCaio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
Mon, 30 Sep 2019 19:44:30 +0000 (12:44 -0700)
commit61fa4b5707f20d1c281d35e942b6aa462f75612a
tree3acffcb430a11481dd8e47712bc6d837d5b177b6
parent3439956377f903ed7e673f020cd9e7dc0a980128
glsl: Add helperInvocationEXT() builtin

From EXT_demote_to_helper_invocation, implemented with the existing
nir_intrinsic_is_helper_invocation.

Such builtin is necessary when using `demote` because we can't
redefine the value of gl_HelperInvocation (since it is an input
variable).

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
src/compiler/glsl/builtin_functions.cpp
src/compiler/glsl/glsl_to_nir.cpp
src/compiler/glsl/ir.h
src/mesa/state_tracker/st_glsl_to_tgsi.cpp