i965: Use ctx->Texture._MaxEnabledTexImageUnit for upper bound
authorChris Forbes <chrisf@ijw.co.nz>
Sun, 13 Apr 2014 00:37:32 +0000 (12:37 +1200)
committerChris Forbes <chrisf@ijw.co.nz>
Sun, 20 Apr 2014 22:13:07 +0000 (10:13 +1200)
commitd63026f62ac0d9c4674a93d12843ea96e77b3c5e
tree5314f7f143d26cf2f903e76144d6f646b12e59ed
parentc4a98e76d7dcb84ba6a0337dc975351966c4dac7
i965: Use ctx->Texture._MaxEnabledTexImageUnit for upper bound

Avoid looping over 32/48/96 (!!) tex image units every draw, most of
which we don't care about.

Improves performance on everyone's favorite not-a-benchmark by 2.9% on
Haswell.

Signed-off-by: Chris Forbes <chrisf@ijw.co.nz>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
src/mesa/drivers/dri/i965/brw_draw.c
src/mesa/drivers/dri/i965/brw_tex.c