summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorKenneth Graunke <[email protected]>2015-03-09 01:58:53 -0700
committerKenneth Graunke <[email protected]>2015-03-12 08:29:48 -0700
commitb9dea9bc45299f19c445170a4cac27810547de00 (patch)
treeee95eb71ae4ae1e0f854f358924992b21eac6f96 /src
parent1f0067811c059fb3b284a2169e94fbdec7a4b909 (diff)
i965/nir: Lower to registers a bit later.
We can't safely call nir_optimize() with register present, since several passes called in the loop can't handle registers, and will fail asserts. Notably, nir_lower_vec_alus() and nir_opt_algebraic() really don't want registers. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
Diffstat (limited to 'src')
-rw-r--r--src/mesa/drivers/dri/i965/brw_fs_nir.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_fs_nir.cpp b/src/mesa/drivers/dri/i965/brw_fs_nir.cpp
index ef836939705..c225c00f973 100644
--- a/src/mesa/drivers/dri/i965/brw_fs_nir.cpp
+++ b/src/mesa/drivers/dri/i965/brw_fs_nir.cpp
@@ -108,9 +108,6 @@ fs_visitor::emit_nir_code()
nir_lower_io(nir);
nir_validate_shader(nir);
- nir_lower_locals_to_regs(nir);
- nir_validate_shader(nir);
-
nir_remove_dead_variables(nir);
nir_validate_shader(nir);
@@ -125,6 +122,9 @@ fs_visitor::emit_nir_code()
nir_optimize(nir);
+ nir_lower_locals_to_regs(nir);
+ nir_validate_shader(nir);
+
nir_lower_to_source_mods(nir);
nir_validate_shader(nir);
nir_copy_prop(nir);