mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-03-12 04:40:42 +01:00
rusticl: Let backend control convert_alu_types lowering
Signed-off-by: Rob Clark <rob.clark@oss.qualcomm.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40179>
This commit is contained in:
parent
b74a07a422
commit
dfaa4375c3
2 changed files with 11 additions and 1 deletions
|
|
@ -860,6 +860,12 @@ typedef struct nir_shader_compiler_options {
|
|||
*/
|
||||
void (*lower_mediump_io)(struct nir_shader *nir);
|
||||
|
||||
/**
|
||||
* If driver wishes to control which @convert_alu_types to lower, it
|
||||
* can implement this callback.
|
||||
*/
|
||||
bool (*lower_convert_alu_types)(nir_intrinsic_instr *convert_alu_types);
|
||||
|
||||
/**
|
||||
* Return the maximum cost of an expression that's written to a shader
|
||||
* output that can be moved into the next shader to remove that output.
|
||||
|
|
|
|||
|
|
@ -1047,7 +1047,11 @@ fn compile_nir_variant(
|
|||
}
|
||||
res.input_size = nir.uniform_size();
|
||||
|
||||
nir_pass!(nir, nir_lower_convert_alu_types, None);
|
||||
nir_pass!(
|
||||
nir,
|
||||
nir_lower_convert_alu_types,
|
||||
nir_options.lower_convert_alu_types
|
||||
);
|
||||
nir_pass!(nir, nir_opt_intrinsics);
|
||||
|
||||
opt_nir(nir, dev, true);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue