mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 22:38:05 +02:00
nir: Add nir_remove_non_exported
For libraries. Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io> Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com> Reviewed-by: Karol Herbst <kherbst@redhat.com> Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25498>
This commit is contained in:
parent
6014f745d5
commit
23bea25207
2 changed files with 14 additions and 0 deletions
|
|
@ -3401,3 +3401,12 @@ nir_remove_non_entrypoints(nir_shader *nir)
|
|||
}
|
||||
assert(exec_list_length(&nir->functions) == 1);
|
||||
}
|
||||
|
||||
void
|
||||
nir_remove_non_exported(nir_shader *nir)
|
||||
{
|
||||
nir_foreach_function_safe(func, nir) {
|
||||
if (!func->is_exported)
|
||||
exec_node_remove(&func->node);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -4150,7 +4150,12 @@ nir_shader_get_function_for_name(const nir_shader *shader, const char *name)
|
|||
return NULL;
|
||||
}
|
||||
|
||||
/*
|
||||
* After all functions are forcibly inlined, these passes remove redundant
|
||||
* functions from a shader and library respectively.
|
||||
*/
|
||||
void nir_remove_non_entrypoints(nir_shader *shader);
|
||||
void nir_remove_non_exported(nir_shader *shader);
|
||||
|
||||
nir_shader *nir_shader_create(void *mem_ctx,
|
||||
gl_shader_stage stage,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue