var->state_slots = NULL;
}
- var->constant_value = constant_copy(ir->constant_value, var);
var->constant_initializer = constant_copy(ir->constant_initializer, var);
var->interface_type = ir->get_interface_type();
{
/*
* We don't know if this variable is an an array or struct that gets
- * dereferenced, so do the safe thing an make it a variable and return a
- * dereference.
+ * dereferenced, so do the safe thing an make it a variable with a
+ * constant initializer and return a dereference.
*/
nir_variable *var = ralloc(this->shader, nir_variable);
var->type = ir->type;
var->data.mode = nir_var_local;
var->data.read_only = true;
- var->constant_value = constant_copy(ir, var);
var->constant_initializer = constant_copy(ir, var);
exec_list_push_tail(&this->impl->locals, &var->node);
/**
* Was an initial binding explicitly set in the shader?
*
- * If so, constant_value contains an integer ir_constant representing the
- * initial binding point.
+ * If so, constant_initializer contains an integer nir_constant
+ * representing the initial binding point.
*/
unsigned explicit_binding:1;
nir_state_slot *state_slots; /**< State descriptors. */
/*@}*/
- /**
- * Value assigned in the initializer of a variable declared "const"
- */
- nir_constant *constant_value;
-
/**
* Constant expression assigned in the initializer of the variable
- *
- * \warning
- * This field and \c ::constant_value are distinct. Even if the two fields
- * refer to constants with the same value, they must point to separate
- * objects.
*/
nir_constant *constant_initializer;