mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-06 21:50:11 +01:00
rusticl/kernel: set has_variable_shared_mem on the nir
Signed-off-by: Karol Herbst <kherbst@redhat.com> Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19855>
This commit is contained in:
parent
0e5722cd22
commit
87147e2b09
2 changed files with 17 additions and 0 deletions
|
|
@ -688,6 +688,12 @@ fn lower_and_optimize_nir_late(
|
|||
* other things we depend on
|
||||
*/
|
||||
KernelArg::assign_locations(args, &mut res, nir);
|
||||
|
||||
/* update the has_variable_shared_mem info as we might have DCEed all of them */
|
||||
nir.set_has_variable_shared_mem(
|
||||
args.iter()
|
||||
.any(|arg| arg.kind == KernelArgType::MemLocal && !arg.dead),
|
||||
);
|
||||
dev.screen.finalize_nir(nir);
|
||||
|
||||
nir.pass0(nir_opt_dce);
|
||||
|
|
|
|||
|
|
@ -186,6 +186,17 @@ impl NirShader {
|
|||
}
|
||||
}
|
||||
|
||||
pub fn set_has_variable_shared_mem(&mut self, val: bool) {
|
||||
unsafe {
|
||||
self.nir
|
||||
.as_mut()
|
||||
.info
|
||||
.anon_1
|
||||
.cs
|
||||
.set_has_variable_shared_mem(val)
|
||||
}
|
||||
}
|
||||
|
||||
pub fn variables_with_mode(
|
||||
&mut self,
|
||||
mode: nir_variable_mode,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue