nir: Tag entrypoint for easy recognition by nir_shader_get_entrypoint()

We're going to have multiple functions, so nir_shader_get_entrypoint()
needs to do something a little smarter.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
This commit is contained in:
Matt Turner
2018-09-06 11:12:24 -07:00
parent 393b59e077
commit dde73e646f
7 changed files with 30 additions and 6 deletions
+1
View File
@@ -684,6 +684,7 @@ clone_function(clone_state *state, const nir_function *fxn, nir_shader *ns)
nfxn->num_params = fxn->num_params;
nfxn->params = ralloc_array(state->ns, nir_parameter, fxn->num_params);
memcpy(nfxn->params, fxn->params, sizeof(nir_parameter) * fxn->num_params);
nfxn->is_entrypoint = fxn->is_entrypoint;
/* At first glance, it looks like we should clone the function_impl here.
* However, call instructions need to be able to reference at least the