mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-09 11:08:03 +02:00
nir/phis_to_scalar,gcm: Use nir_deref_mode_may_be
In both cases, we're trying to determine if a load is scalarizable. We don't want to scalarize if it's a function_temp or shader_temp because it might turn into something we can't scalarize. Reviewed-by: Jesse Natalie <jenatali@microsoft.com> Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6332>
This commit is contained in:
parent
9f3e3dfd2f
commit
fff78fc1c5
2 changed files with 4 additions and 4 deletions
|
|
@ -91,8 +91,8 @@ is_phi_src_scalarizable(nir_phi_src *src,
|
|||
* might turn into one of the things we can't scalarize.
|
||||
*/
|
||||
nir_deref_instr *deref = nir_src_as_deref(src_intrin->src[0]);
|
||||
return !(deref->mode & (nir_var_function_temp |
|
||||
nir_var_shader_temp));
|
||||
return !nir_deref_mode_may_be(deref, nir_var_function_temp |
|
||||
nir_var_shader_temp);
|
||||
}
|
||||
|
||||
case nir_intrinsic_interp_deref_at_centroid:
|
||||
|
|
|
|||
|
|
@ -146,8 +146,8 @@ is_src_scalarizable(nir_src *src)
|
|||
* might turn into one of the things we can't scalarize.
|
||||
*/
|
||||
nir_deref_instr *deref = nir_src_as_deref(src_intrin->src[0]);
|
||||
return !(deref->mode & (nir_var_function_temp |
|
||||
nir_var_shader_temp));
|
||||
return !nir_deref_mode_may_be(deref, (nir_var_function_temp |
|
||||
nir_var_shader_temp));
|
||||
}
|
||||
|
||||
case nir_intrinsic_interp_deref_at_centroid:
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue