-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 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/ iEYEARECAAYFAk2fivEACgkQX1gOwKyEAw85tACgimPTnqoN89xWlwp3fwm96jOL dgwAn1XVRc0Rlm3vB4cdkZdvoxcHxPzV =yXfu -----END PGP SIGNATURE----- _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev