{
struct brw_context *brw = brw_context(ctx);
struct intel_context *intel = &brw->intel;
+ unsigned int stage;
+
+ for (stage = 0; stage < ARRAY_SIZE(prog->_LinkedShaders); stage++) {
+ struct brw_shader *shader =
+ (struct brw_shader *)prog->_LinkedShaders[stage];
+
+ if (!shader)
+ continue;
- struct brw_shader *shader =
- (struct brw_shader *)prog->_LinkedShaders[MESA_SHADER_FRAGMENT];
- if (shader != NULL) {
void *mem_ctx = ralloc_context(NULL);
bool progress;
do {
progress = false;
- brw_do_channel_expressions(shader->ir);
- brw_do_vector_splitting(shader->ir);
+ if (stage == MESA_SHADER_FRAGMENT) {
+ brw_do_channel_expressions(shader->ir);
+ brw_do_vector_splitting(shader->ir);
+ }
progress = do_lower_jumps(shader->ir, true, true,
true, /* main return */