data.i[c] = (int) op[0]->value.f[c];
}
break;
+ case ir_unop_f2u:
+ assert(op[0]->type->base_type == GLSL_TYPE_FLOAT);
+ for (unsigned c = 0; c < op[0]->type->components(); c++) {
+ data.i[c] = (unsigned) op[0]->value.f[c];
+ }
+ break;
case ir_unop_i2f:
assert(op[0]->type->base_type == GLSL_TYPE_INT);
for (unsigned c = 0; c < op[0]->type->components(); c++) {
foreach_list(n, actual_parameters) {
ir_constant *constant = ((ir_rvalue *) n)->constant_expression_value(variable_context);
- if (constant == NULL)
- return NULL;
+ if (constant == NULL) {
+ hash_table_dtor(deref_hash);
+ return NULL;
+ }
+
ir_variable *var = (ir_variable *)parameter_info;
hash_table_insert(deref_hash, constant, var);