i965: Disable Z16 on contexts that don't require it. 79/6279/1
authorEric Anholt <eric@anholt.net>
Thu, 25 Apr 2013 19:34:07 +0000 (12:34 -0700)
committerEric Anholt <eric@anholt.net>
Mon, 29 Apr 2013 18:41:34 +0000 (11:41 -0700)
commit73bc6061f5c3b6a3bb7a8114bb2e1ab77d23cfdb
tree6cbfb1078fb529a8f0c8b03a536b2d0bcdf0df7a
parente409889213f3d3bf80c46898b3a48178d9c785f8
i965: Disable Z16 on contexts that don't require it.

It appears that Z16 on Intel hardware is in fact slower than Z24, so
people are getting surprisingly hurt when trying to use Z16 as a
performance-versus-precision tradeoff, or when they're targeting GLES2 and
that's all you get.

GL 3.0+ have Z16 on the list of required exact format sizes, but GLES
doesn't, so choose the better-performing layout in that case.  Improves
GLB 2.7 trex performance at 1920x1080 by 10.7% +/- 1.1% (n=3) on my IVB
system.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
src/mesa/drivers/dri/i965/brw_wm_surface_state.c