[Mesa-dev] [PATCH 2/2 v3] i965: Allocate the whole URB to the VS and fix calculations.
idr at freedesktop.org
Fri Apr 8 15:23:45 PDT 2011
-----BEGIN PGP SIGNED MESSAGE-----
On 04/08/2011 01:39 PM, Kenneth Graunke wrote:
> The previous calculation neglected to multiply by nr_vs_entries, instead
> comparing whether twice the size of one VS URB entry was bigger than the
> entire URB space. Furthermore, it 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.
> v3: Bah! Apparently ROUND_DOWN_TO(256, 4) results in 252. Not what I want at all.
> Replaced this with x - x % 4, which gives the correct answer (256).
Eh... whats wrong with 'x = x & ~3'?
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org/
-----END PGP SIGNATURE-----
More information about the mesa-dev