prog->nir = brw_create_nir(brw, shProg, prog, (gl_shader_stage) stage,
compiler->scalar_stage[stage]);
+ }
+
+ for (stage = 0; stage < ARRAY_SIZE(shProg->_LinkedShaders); stage++) {
+ struct gl_linked_shader *shader = shProg->_LinkedShaders[stage];
+ if (!shader)
+ continue;
+
+ struct gl_program *prog = shader->Program;
+ nir_shader *nir = shader->Program->nir;
+ brw_shader_gather_info(nir, prog);
+
+ NIR_PASS_V(nir, nir_lower_samplers, shProg);
+ NIR_PASS_V(nir, nir_lower_atomics, shProg);
+
infos[stage] = &prog->nir->info;
update_xfb_info(prog->sh.LinkedTransformFeedback, infos[stage]);
NIR_PASS(progress, nir, nir_lower_system_values);
NIR_PASS_V(nir, brw_nir_lower_uniforms, is_scalar);
- brw_shader_gather_info(nir, prog);
-
- if (shader_prog) {
- NIR_PASS_V(nir, nir_lower_samplers, shader_prog);
- NIR_PASS_V(nir, nir_lower_atomics, shader_prog);
- }
-
return nir;
}
prog->nir = brw_create_nir(brw, NULL, prog, MESA_SHADER_FRAGMENT, true);
+ brw_shader_gather_info(prog->nir, prog);
+
brw_fs_precompile(ctx, prog);
break;
}
prog->nir = brw_create_nir(brw, NULL, prog, MESA_SHADER_VERTEX,
compiler->scalar_stage[MESA_SHADER_VERTEX]);
+ brw_shader_gather_info(prog->nir, prog);
+
brw_vs_precompile(ctx, prog);
break;
}