llvmpipe: do IR counting for shader cache management after optimization.
authorRoland Scheidegger <sroland@vmware.com>
Fri, 16 May 2014 20:45:27 +0000 (22:45 +0200)
committerRoland Scheidegger <sroland@vmware.com>
Mon, 19 May 2014 15:07:41 +0000 (17:07 +0200)
commit1e9cbbb1c40b3df8443877410b5d34a2f12e9ab0
treee19c49ac1397652e056a1d66dc31cdb71cdad280
parent9e74de884a0595e577ebdfb7c7c13f4fd4d4dff5
llvmpipe: do IR counting for shader cache management after optimization.

2ea923cf571235dfe573c35c3f0d90f632bd86d8 had the side effect of IR counting
now being done after IR optimization instead of before. Some quick analysis
shows that there's roughly 1.5 times more IR instructions before optimization
than after, hence the effective shader cache size got quite a bit smaller.
Could counter this with an increase of the instruction limit but it probably
makes more sense to count them after optimizations, so move that code.

Reviewed-by: Brian Paul <brianp@vmware.com>
src/gallium/auxiliary/gallivm/lp_bld_type.c
src/gallium/auxiliary/gallivm/lp_bld_type.h
src/gallium/drivers/llvmpipe/lp_state_fs.c