mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-24 08:50:13 +01:00
rusticl/kernel: run driver requested lowering passes
Signed-off-by: Karol Herbst <kherbst@redhat.com> Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15439>
This commit is contained in:
parent
a502f61f28
commit
6f73397c4e
2 changed files with 18 additions and 0 deletions
|
|
@ -218,6 +218,11 @@ fn lower_and_optimize_nir_late(
|
|||
args: usize,
|
||||
) -> Vec<InternalKernelArg> {
|
||||
let mut res = Vec::new();
|
||||
let nir_options = unsafe {
|
||||
&*dev
|
||||
.screen
|
||||
.nir_shader_compiler_options(pipe_shader_type::PIPE_SHADER_COMPUTE)
|
||||
};
|
||||
let mut lower_state = rusticl_lower_state::default();
|
||||
|
||||
nir.pass2(
|
||||
|
|
@ -285,6 +290,18 @@ fn lower_and_optimize_nir_late(
|
|||
|
||||
// TODO whatever clc is doing here
|
||||
|
||||
if nir_options.lower_to_scalar {
|
||||
nir.pass2(
|
||||
nir_lower_alu_to_scalar,
|
||||
nir_options.lower_to_scalar_filter,
|
||||
ptr::null(),
|
||||
);
|
||||
}
|
||||
|
||||
if nir_options.lower_int64_options.0 != 0 {
|
||||
nir.pass0(nir_lower_int64);
|
||||
}
|
||||
|
||||
nir.pass1(nir_lower_convert_alu_types, None);
|
||||
nir.pass0(nir_opt_dce);
|
||||
dev.screen.finalize_nir(nir);
|
||||
|
|
|
|||
|
|
@ -210,6 +210,7 @@ rusticl_mesa_bindings_rs = rust.bindgen(
|
|||
'--whitelist-var', 'PIPE_.*',
|
||||
'--bitfield-enum', 'pipe_map_flags',
|
||||
'--allowlist-var', 'stderr',
|
||||
'--bitfield-enum', 'nir_lower_int64_options',
|
||||
],
|
||||
)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue