#define MAKE_INTRINSIC(return_type, id, avail, ...) \
ir_function_signature *sig = \
new_sig(return_type, avail, __VA_ARGS__); \
- sig->is_intrinsic = true; \
+ sig->_is_intrinsic = true; \
sig->intrinsic_id = id;
ir_function_signature *
sig->is_defined = true;
} else {
- sig->is_intrinsic = true;
+ sig->_is_intrinsic = true;
sig->intrinsic_id = id;
}
void
nir_visitor::create_function(ir_function_signature *ir)
{
- if (ir->is_intrinsic)
+ if (ir->is_intrinsic())
return;
nir_function *func = nir_function_create(shader, ir->function_name());
void
nir_visitor::visit(ir_function_signature *ir)
{
- if (ir->is_intrinsic)
+ if (ir->is_intrinsic())
return;
struct hash_entry *entry =
void
nir_visitor::visit(ir_call *ir)
{
- if (ir->callee->is_intrinsic) {
+ if (ir->callee->is_intrinsic()) {
nir_intrinsic_op op;
switch (ir->callee->intrinsic_id) {
ir_function_signature::ir_function_signature(const glsl_type *return_type,
builtin_available_predicate b)
: ir_instruction(ir_type_function_signature),
- return_type(return_type), is_defined(false), is_intrinsic(false),
+ return_type(return_type), is_defined(false), _is_intrinsic(false),
intrinsic_id(ir_intrinsic_invalid), builtin_avail(b), _function(NULL)
{
this->origin = NULL;
/** Whether or not this function signature is a built-in. */
bool is_builtin() const;
+ /** Whehter or not this function signautre is an intrinsic. */
+ inline bool is_intrinsic() const
+ {
+ return _is_intrinsic;
+ }
+
/**
* Whether or not this function is an intrinsic to be implemented
* by the driver.
*/
- bool is_intrinsic;
+ bool _is_intrinsic;
/** Indentifier for this intrinsic. */
enum ir_intrinsic_id intrinsic_id;
const char *const name = callee->function_name();
/* We don't actually need to find intrinsics; they're not real */
- if (callee->is_intrinsic)
+ if (callee->is_intrinsic())
return visit_continue;
/* Determine if the requested function signature already exists in the
linked_sig->replace_parameters(&formal_parameters);
- linked_sig->is_intrinsic = sig->is_intrinsic;
+ linked_sig->_is_intrinsic = sig->_is_intrinsic;
linked_sig->intrinsic_id = sig->intrinsic_id;
if (sig->is_defined) {
ir_function_signature *sig =
f->matching_signature(NULL, actual_parameters, false);
- if (sig && (sig->is_defined || sig->is_intrinsic))
+ if (sig && (sig->is_defined || sig->is_intrinsic()))
return sig;
}
ir_function_signature(glsl_type::void_type, compute_shader_enabled);
assert(sig);
sig->replace_parameters(&sig_params);
- sig->is_intrinsic = true;
+ sig->_is_intrinsic = true;
sig->intrinsic_id = ir_intrinsic_shared_store;
ir_function *f = new(mem_ctx) ir_function("__intrinsic_store_shared");
new(mem_ctx) ir_function_signature(type, compute_shader_enabled);
assert(sig);
sig->replace_parameters(&sig_params);
- sig->is_intrinsic = true;
+ sig->_is_intrinsic = true;
sig->intrinsic_id = ir_intrinsic_shared_load;
ir_function *f = new(mem_ctx) ir_function("__intrinsic_load_shared");
compute_shader_enabled);
assert(sig);
sig->replace_parameters(&sig_params);
- sig->is_intrinsic = true;
+ sig->_is_intrinsic = true;
assert(ir->callee->intrinsic_id >= ir_intrinsic_generic_load);
assert(ir->callee->intrinsic_id <= ir_intrinsic_generic_atomic_comp_swap);
ir_function_signature(glsl_type::void_type, shader_storage_buffer_object);
assert(sig);
sig->replace_parameters(&sig_params);
- sig->is_intrinsic = true;
+ sig->_is_intrinsic = true;
sig->intrinsic_id = ir_intrinsic_ssbo_store;
ir_function *f = new(mem_ctx) ir_function("__intrinsic_store_ssbo");
new(mem_ctx) ir_function_signature(type, shader_storage_buffer_object);
assert(sig);
sig->replace_parameters(&sig_params);
- sig->is_intrinsic = true;
+ sig->_is_intrinsic = true;
sig->intrinsic_id = ir_intrinsic_ssbo_load;
ir_function *f = new(mem_ctx) ir_function("__intrinsic_load_ssbo");
shader_storage_buffer_object);
assert(sig);
sig->replace_parameters(&sig_params);
- sig->is_intrinsic = true;
+ sig->_is_intrinsic = true;
assert(ir->callee->intrinsic_id >= ir_intrinsic_generic_load);
assert(ir->callee->intrinsic_id <= ir_intrinsic_generic_atomic_comp_swap);