i965: Allocate the whole URB to the VS and fix calculations for Gen6.
authorKenneth Graunke <kenneth@whitecape.org>
Tue, 12 Apr 2011 22:42:06 +0000 (15:42 -0700)
committerKenneth Graunke <kenneth@whitecape.org>
Mon, 18 Apr 2011 22:26:34 +0000 (15:26 -0700)
commit42a805700039e81a9245f46f153e2cd9705cd0d7
tree7e0f0683df5a1fa4f44fb8e9af4c8c065fdc573e
parent3d5cfcfed16c5a79bdf67027afe4ea8058b899cb
i965: Allocate the whole URB to the VS and fix calculations for Gen6.

Since we never enable the GS on Sandybridge, there's no need to allocate
it any URB space.

Furthermore, the previous calculation was incorrect: it neglected to
multiply by nr_vs_entries, instead comparing whether twice the size of
a single VS URB entry was bigger than the entire URB space.  It also
neglected to take into account that vs_size is in units of 128 byte
blocks, while urb_size is in bytes.

Despite the above problems, the calculations resulted in an acceptable
programming of the URB in most cases, at least on GT2.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Eric Anholt <eric@anholt.net>
src/mesa/drivers/dri/i965/brw_context.c
src/mesa/drivers/dri/i965/brw_context.h
src/mesa/drivers/dri/i965/gen6_urb.c