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>
This commit is contained in:
Caio Marcelo de Oliveira Filho
2019-09-20 10:50:37 -07:00
parent 3439956377
commit 61fa4b5707
4 changed files with 48 additions and 0 deletions

View File

@@ -1138,6 +1138,8 @@ enum ir_intrinsic_id {
ir_intrinsic_read_invocation,
ir_intrinsic_read_first_invocation,
ir_intrinsic_helper_invocation,
ir_intrinsic_shared_load,
ir_intrinsic_shared_store = MAKE_INTRINSIC_FOR_TYPE(store, shared),
ir_intrinsic_shared_atomic_add = MAKE_INTRINSIC_FOR_TYPE(atomic_add, shared),