From fa124a337ca10d2c5d2d81a89dc8c21a7ba2f58b Mon Sep 17 00:00:00 2001 From: Matt Turner Date: Fri, 13 Feb 2015 10:34:39 -0800 Subject: [PATCH] i965/fs: Call calculate_cfg() before optimize(). The CFG is fundamental to the FS IR, not merely a piece of optimization. Reviewed-by: Ben Widawsky --- src/mesa/drivers/dri/i965/brw_fs.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/mesa/drivers/dri/i965/brw_fs.cpp b/src/mesa/drivers/dri/i965/brw_fs.cpp index 0f1300c1cc6..a311266201b 100644 --- a/src/mesa/drivers/dri/i965/brw_fs.cpp +++ b/src/mesa/drivers/dri/i965/brw_fs.cpp @@ -3557,8 +3557,6 @@ fs_visitor::optimize() { const char *stage_name = stage == MESA_SHADER_VERTEX ? "vs" : "fs"; - calculate_cfg(); - split_virtual_grfs(); move_uniform_array_access_to_pull_constants(); @@ -3734,6 +3732,8 @@ fs_visitor::run_vs() emit_urb_writes(); + calculate_cfg(); + optimize(); assign_curb_setup(); @@ -3813,6 +3813,8 @@ fs_visitor::run_fs() emit_fb_writes(); + calculate_cfg(); + optimize(); assign_curb_setup(); -- 2.30.2