[Mesa-dev] [PATCH] i965/fs: Drop our dead push constants before overflowing to pull constants.
kenneth at whitecape.org
Tue Oct 29 08:34:20 CET 2013
On 10/28/2013 10:19 PM, Eric Anholt wrote:
> 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
> src/mesa/drivers/dri/i965/brw_fs.cpp | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
Awesome. We obviously need to run this before demoting to pull
constants. It'd be nice to do it after optimization as well, but that's
a royal pain to get working...I have many branches that crash and burn
at one point or another. Not sure why I didn't think to just /move/ the
call like you did here.
Nice work :)
Reviewed-by: Kenneth Graunke <kenneth at whitecape.org>
More information about the mesa-dev