{
return state->INTEL_shader_atomic_float_minmax_enable;
}
+
+static bool
+demote_to_helper_invocation(const _mesa_glsl_parse_state *state)
+{
+ return state->EXT_demote_to_helper_invocation_enable;
+}
+
/** @} */
/******************************************************************************/
ir_function_signature *_vote(const char *intrinsic_name,
builtin_available_predicate avail);
+ ir_function_signature *_helper_invocation_intrinsic();
+ ir_function_signature *_helper_invocation();
+
#undef B0
#undef B1
#undef B2
_read_first_invocation_intrinsic(glsl_type::uvec4_type),
NULL);
+ add_function("__intrinsic_helper_invocation",
+ _helper_invocation_intrinsic(), NULL);
}
/**
_vote("__intrinsic_vote_eq", v460_desktop),
NULL);
+ add_function("helperInvocationEXT", _helper_invocation(), NULL);
+
add_function("__builtin_idiv64",
generate_ir::idiv64(mem_ctx, integer_functions_supported),
NULL);
return sig;
}
+ir_function_signature *
+builtin_builder::_helper_invocation_intrinsic()
+{
+ MAKE_INTRINSIC(glsl_type::bool_type, ir_intrinsic_helper_invocation,
+ demote_to_helper_invocation, 0);
+ return sig;
+}
+
+ir_function_signature *
+builtin_builder::_helper_invocation()
+{
+ MAKE_SIG(glsl_type::bool_type, demote_to_helper_invocation, 0);
+
+ ir_variable *retval = body.make_temp(glsl_type::bool_type, "retval");
+
+ body.emit(call(shader->symbols->get_function("__intrinsic_helper_invocation"),
+ retval, sig->parameters));
+ body.emit(ret(retval));
+
+ return sig;
+}
+
/** @} */
/******************************************************************************/
case ir_intrinsic_read_first_invocation:
op = nir_intrinsic_read_first_invocation;
break;
+ case ir_intrinsic_helper_invocation:
+ op = nir_intrinsic_is_helper_invocation;
+ break;
default:
unreachable("not reached");
}
nir_builder_instr_insert(&b, &instr->instr);
break;
}
+ case nir_intrinsic_is_helper_invocation: {
+ nir_ssa_dest_init(&instr->instr, &instr->dest, 1, 1, NULL);
+ instr->num_components = 1;
+ nir_builder_instr_insert(&b, &instr->instr);
+ break;
+ }
default:
unreachable("not reached");
}
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),