i965/gen5: Fix grf_used calculation for 16-wide.
authorEric Anholt <eric@anholt.net>
Fri, 24 Jun 2011 22:40:51 +0000 (15:40 -0700)
committerEric Anholt <eric@anholt.net>
Sat, 25 Jun 2011 00:57:53 +0000 (17:57 -0700)
commit773556e0f537eba82d9d68d618e229140f413620
tree6c8d399bdfd7f89f8463ff4afe72d22b6de5b0c3
parent7b44830ef40b6d4644c3f55189ed2457e6822428
i965/gen5: Fix grf_used calculation for 16-wide.

If we happened to allocate a texture result (or other vector) to the
highest hardware register slot, and we were in 16-wide, we would
under-count the registers used and potentially wrap around to g0 if
that allocation crossed a 16-register block boundary.  Bad rendering
and hangs ensued.

Tested-by: Ian Romanick <idr@freedesktop.org>
src/mesa/drivers/dri/i965/brw_fs_reg_allocate.cpp