Mesa (master): i965/fs: Drop our dead push constants before overflowing to pull constants.
Eric Anholt
anholt at kemper.freedesktop.org
Tue Oct 29 20:44:41 UTC 2013
Module: Mesa
Branch: master
Commit: 774b787d6b7abe601309cf437b09b592fea0394d
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=774b787d6b7abe601309cf437b09b592fea0394d
Author: Eric Anholt <eric at anholt.net>
Date: Mon Oct 28 17:00:23 2013 -0700
i965/fs: Drop our dead push constants before overflowing to pull constants.
The idea of the original order was that you'd dead code eliminate accesses
to push constants. But I've never seen a case of that (nor has
shader-db), while we frequently see sparse accesses of large constant
arrays that would overflow into pull constants.
Cuts pull constant use on csgo, serious sam, planeshift, and the cave:
total instructions in shared programs: 1695103 -> 1688795 (-0.37%)
instructions in affected programs: 92024 -> 85716 (-6.85%)
GAINED: 339
LOST: 0
Reviewed-by: Kenneth Graunke <kenneth at whitecape.org>
---
src/mesa/drivers/dri/i965/brw_fs.cpp | 3 +--
1 files changed, 1 insertions(+), 2 deletions(-)
diff --git a/src/mesa/drivers/dri/i965/brw_fs.cpp b/src/mesa/drivers/dri/i965/brw_fs.cpp
index 76d8a29..a60941a 100644
--- a/src/mesa/drivers/dri/i965/brw_fs.cpp
+++ b/src/mesa/drivers/dri/i965/brw_fs.cpp
@@ -3070,6 +3070,7 @@ fs_visitor::run()
split_virtual_grfs();
move_uniform_array_access_to_pull_constants();
+ remove_dead_constants();
setup_pull_constants();
bool progress;
@@ -3090,8 +3091,6 @@ fs_visitor::run()
progress = compute_to_mrf() || progress;
} while (progress);
- remove_dead_constants();
-
schedule_instructions(false);
lower_uniform_pull_constant_loads();
More information about the mesa-commit
mailing list