Some of the opts are not called in the general optimastion loop
in the state trackers glsl -> nir conversion. We need to call
the radeonsi specific optimisation once before scanning over
the nir otherwise we can end up gathering info on code that
is later removed.
Fixes an assert in the piglit test:
./bin/varying-struct-centroid_gles3
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
assert(program->ir_type == PIPE_SHADER_IR_NIR);
sel.nir = program->ir.nir;
+ si_nir_opts(sel.nir);
si_nir_scan_shader(sel.nir, &sel.info);
si_lower_nir(&sel);
}
sel->nir = state->ir.nir;
+ si_nir_opts(sel->nir);
si_nir_scan_shader(sel->nir, &sel->info);
si_nir_scan_tess_ctrl(sel->nir, &sel->tcs_info);
}