nir_shader *shader = nir_shader_clone(mem_ctx, src_shader);
shader = brw_nir_apply_sampler_key(shader, compiler->devinfo, &key->tex,
true);
+ shader = brw_nir_lower_io(shader, compiler->devinfo, true,
+ false, NULL);
shader = brw_postprocess_nir(shader, compiler->devinfo, true);
/* key->alpha_test_func means simulating alpha testing via discards,
if (nir->stage != MESA_SHADER_VERTEX &&
nir->stage != MESA_SHADER_TESS_CTRL &&
- nir->stage != MESA_SHADER_TESS_EVAL) {
+ nir->stage != MESA_SHADER_TESS_EVAL &&
+ nir->stage != MESA_SHADER_FRAGMENT) {
nir = brw_nir_lower_io(nir, devinfo, is_scalar, false, NULL);
}
/* Finish the optimization and compilation process */
if (nir->stage != MESA_SHADER_VERTEX &&
nir->stage != MESA_SHADER_TESS_CTRL &&
- nir->stage != MESA_SHADER_TESS_EVAL) {
+ nir->stage != MESA_SHADER_TESS_EVAL &&
+ nir->stage != MESA_SHADER_FRAGMENT) {
nir = brw_nir_lower_io(nir, &pipeline->device->info,
compiler->scalar_stage[stage], false, NULL);
}