Scratch this patch. Not all of that code is dead, just the part where we add the return variable.
On Fri, Oct 9, 2015 at 7:09 AM, Jason Ekstrand <ja...@jlekstrand.net> wrote: > --- > src/glsl/nir/glsl_to_nir.cpp | 39 +-------------------------------------- > 1 file changed, 1 insertion(+), 38 deletions(-) > > diff --git a/src/glsl/nir/glsl_to_nir.cpp b/src/glsl/nir/glsl_to_nir.cpp > index efaa73e..874e361 100644 > --- a/src/glsl/nir/glsl_to_nir.cpp > +++ b/src/glsl/nir/glsl_to_nir.cpp > @@ -495,44 +495,7 @@ nir_visitor::visit(ir_function_signature *ir) > if (ir->is_intrinsic) > return; > > - struct hash_entry *entry = > - _mesa_hash_table_search(this->overload_table, ir); > - > - assert(entry); > - nir_function_overload *overload = (nir_function_overload *) entry->data; > - > - if (ir->is_defined) { > - nir_function_impl *impl = nir_function_impl_create(overload); > - this->impl = impl; > - > - unsigned num_params = overload->num_params; > - impl->num_params = num_params; > - impl->params = ralloc_array(this->shader, nir_variable *, num_params); > - unsigned i = 0; > - foreach_in_list(ir_variable, param, &ir->parameters) { > - param->accept(this); > - impl->params[i] = this->var; > - i++; > - } > - > - if (overload->return_type == glsl_type::void_type) { > - impl->return_var = NULL; > - } else { > - impl->return_var = ralloc(this->shader, nir_variable); > - impl->return_var->name = ralloc_strdup(impl->return_var, > - "return_var"); > - impl->return_var->type = overload->return_type; > - } > - > - this->is_global = false; > - > - this->cf_node_list = &impl->body; > - visit_exec_list(&ir->body, this); > - > - this->is_global = true; > - } else { > - overload->impl = NULL; > - } > + assert(!"Functions should be lowered away at this point"); > } > > void > -- > 2.5.0.400.gff86faf > _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev