mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-07 11:28:05 +02:00
anv: Lower any remaining globals when cmat_calls are inlined
Fixes: 3debca7dc6 ("anv: Enable cooperativeMatrixPerElementOperations")
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40938>
This commit is contained in:
parent
31c8e14df3
commit
356d88457a
1 changed files with 9 additions and 0 deletions
|
|
@ -1472,7 +1472,16 @@ anv_shader_lower_nir(struct anv_device *device,
|
|||
NIR_PASS(_, nir, nir_opt_dce);
|
||||
NIR_PASS(inlined, nir, nir_inline_functions);
|
||||
nir_remove_non_entrypoints(nir);
|
||||
|
||||
if (inlined) {
|
||||
/* Some shader_temp vars may have remained multi-function before
|
||||
* cmat lowering/inlining. Now that everything was inlined,
|
||||
* they may be lowered to locals.
|
||||
*/
|
||||
bool lowered_globals = false;
|
||||
NIR_PASS(lowered_globals, nir, nir_lower_global_vars_to_local);
|
||||
if (lowered_globals)
|
||||
NIR_PASS(_, nir, nir_split_struct_vars, nir_var_function_temp);
|
||||
NIR_PASS(_, nir, nir_opt_copy_prop_vars);
|
||||
NIR_PASS(_, nir, nir_opt_copy_prop);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue