i965: Move more code into codegen-branch of the fs_visitor::run() if statement

These last few operations all only apply when we've actually generated
code, optimized and allocated registers.  The dummy and the repclear
shaders don't need the gen4 send workaround, and don't spill.  This
means we can move these lines into the else-branch, which will make
the following refactoring easier.

v2 (Ken): Rebase on master, which removed the uncompressed stack.

Signed-off-by: Kristian Høgsberg <krh@bitplanet.net>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
This commit is contained in:
Kristian Høgsberg 2014-11-13 16:28:17 -08:00 committed by Kenneth Graunke
parent f2bb655ac7
commit 5c4efc644e
1 changed files with 11 additions and 12 deletions

View File

@ -3624,22 +3624,21 @@ fs_visitor::run()
break;
}
}
}
/* This must come after all optimization and register allocation, since
* it inserts dead code that happens to have side effects, and it does
* so based on the actual physical registers in use.
*/
insert_gen4_send_dependency_workarounds();
/* This must come after all optimization and register allocation, since
* it inserts dead code that happens to have side effects, and it does
* so based on the actual physical registers in use.
*/
insert_gen4_send_dependency_workarounds();
if (failed)
return false;
if (failed)
return false;
if (!allocated_without_spills)
schedule_instructions(SCHEDULE_POST);
if (!allocated_without_spills)
schedule_instructions(SCHEDULE_POST);
if (last_scratch > 0) {
prog_data->total_scratch = brw_get_scratch_size(last_scratch);
if (last_scratch > 0)
prog_data->total_scratch = brw_get_scratch_size(last_scratch);
}
if (stage == MESA_SHADER_FRAGMENT) {