mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-03 15:50:17 +01:00
i965: Move optimizations from brw_nir_lower_io to brw_postprocess_nir.
This simplifies things. Every caller of brw_nir_lower_io() immediately calls brw_postprocess_nir(). The only real change this will have is that we get an extra brw_nir_optimize() call when compiling compute shaders, but that seems fine. Signed-off-by: Kenneth Graunke <kenneth@whitecape.org> Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
This commit is contained in:
parent
dcd4a841e9
commit
51f8797993
1 changed files with 3 additions and 1 deletions
|
|
@ -518,7 +518,7 @@ brw_nir_lower_io(nir_shader *nir,
|
|||
OPT_V(brw_nir_lower_outputs, devinfo, is_scalar);
|
||||
OPT_V(nir_lower_io, nir_var_all, is_scalar ? type_size_scalar : type_size_vec4);
|
||||
|
||||
return nir_optimize(nir, is_scalar);
|
||||
return nir;
|
||||
}
|
||||
|
||||
/* Prepare the given shader for codegen
|
||||
|
|
@ -539,6 +539,8 @@ brw_postprocess_nir(nir_shader *nir,
|
|||
bool progress; /* Written by OPT and OPT_V */
|
||||
(void)progress;
|
||||
|
||||
nir = nir_optimize(nir, is_scalar);
|
||||
|
||||
if (devinfo->gen >= 6) {
|
||||
/* Try and fuse multiply-adds */
|
||||
OPT(brw_nir_opt_peephole_ffma);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue