return;
Id type_id = allocate_id(strct, 0);
- writer.write_op_name(type_id, strct.name);
+ writer.write_op_name(type_id, (strct.block_name.empty() ? strct.name : strct.block_name));
if(!strct.block_name.empty())
writer.write_op_decorate(type_id, DECO_BLOCK);
}
}
- writer.write_op_name(var_id, var.name);
+ if(var.name.find(' ')==string::npos)
+ writer.write_op_name(var_id, var.name);
}
void SpirVGenerator::visit_entry_point(FunctionDeclaration &func, Id func_id)
{
Id param_id = allocate_id(*func.parameters[i], param_type_ids[i]);
writer.write_op(content.functions, OP_FUNCTION_PARAMETER, param_type_ids[i], param_id);
+ writer.write_op_name(param_id, func.parameters[i]->name);
// TODO This is probably incorrect if the parameter is assigned to.
variable_load_ids[func.parameters[i].get()] = param_id;
}