ir_expression *
ir_expression::clone(void *mem_ctx, struct hash_table *ht) const
{
- ir_rvalue *op[Elements(this->operands)] = { NULL, };
+ ir_rvalue *op[ARRAY_SIZE(this->operands)] = { NULL, };
unsigned int i;
for (i = 0; i < get_num_operands(); i++) {
case ir_tex:
case ir_lod:
case ir_query_levels:
+ case ir_texture_samples:
+ case ir_samples_identical:
break;
case ir_txb:
new_tex->lod_info.bias = this->lod_info.bias->clone(mem_ctx, ht);
{
ir_function *copy = new(mem_ctx) ir_function(this->name);
+ copy->is_subroutine = this->is_subroutine;
+ copy->subroutine_index = this->subroutine_index;
+ copy->num_subroutine_types = this->num_subroutine_types;
+ copy->subroutine_types = ralloc_array(mem_ctx, const struct glsl_type *, copy->num_subroutine_types);
+ for (int i = 0; i < copy->num_subroutine_types; i++)
+ copy->subroutine_types[i] = this->subroutine_types[i];
+
foreach_in_list(const ir_function_signature, sig, &this->signatures) {
ir_function_signature *sig_copy = sig->clone(mem_ctx, ht);
copy->add_signature(sig_copy);
case GLSL_TYPE_UINT:
case GLSL_TYPE_INT:
case GLSL_TYPE_FLOAT:
+ case GLSL_TYPE_DOUBLE:
case GLSL_TYPE_BOOL:
return new(mem_ctx) ir_constant(this->type, &this->value);
return c;
}
+ case GLSL_TYPE_FUNCTION:
case GLSL_TYPE_SAMPLER:
case GLSL_TYPE_IMAGE:
case GLSL_TYPE_ATOMIC_UINT:
case GLSL_TYPE_VOID:
case GLSL_TYPE_ERROR:
+ case GLSL_TYPE_SUBROUTINE:
case GLSL_TYPE_INTERFACE:
assert(!"Should not get here.");
break;