mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-04-19 12:20:40 +02:00
microsoft/spirv_to_dxil: Implement TODO for removing dead functions
Reviewed-by: Bill Kristiansen <billkris@microsoft.com> Reviewed-by: Michael Tang <tangm@microsoft.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9846>
This commit is contained in:
parent
bd64669fa7
commit
39aa32b838
1 changed files with 9 additions and 1 deletions
|
|
@ -61,10 +61,18 @@ spirv_to_dxil(const uint32_t *words, size_t word_count,
|
|||
NIR_PASS_V(nir, nir_opt_deref);
|
||||
NIR_PASS_V(nir, nir_lower_returns);
|
||||
NIR_PASS_V(nir, nir_inline_functions);
|
||||
// todo remove all non-entrypoint functions
|
||||
NIR_PASS_V(nir, nir_lower_variable_initializers,
|
||||
~nir_var_function_temp);
|
||||
|
||||
// Pick off the single entrypoint that we want.
|
||||
nir_function *entrypoint;
|
||||
foreach_list_typed_safe(nir_function, func, node, &nir->functions) {
|
||||
if (func->is_entrypoint)
|
||||
entrypoint = func;
|
||||
else
|
||||
exec_node_remove(&func->node);
|
||||
}
|
||||
assert(exec_list_length(&nir->functions) == 1);
|
||||
struct nir_to_dxil_options opts = {0};
|
||||
|
||||
struct blob dxil_blob;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue