commit | d41740e969ce1ef084fa7a51208d43ac6883adf8 | [log] [tgz] |
---|---|---|
author | Pauli Nieminen <suokkos@gmail.com> | Sat Feb 06 06:32:40 2010 +0200 |
committer | Pauli Nieminen <suokkos@gmail.com> | Sat Feb 06 19:24:44 2010 +0200 |
tree | 9f1ec89bd15527bfb3cf037a2189ca87fa09f2b1 | |
parent | f8969dd24ff4264c0c11ea5266093b6ce2ef221a [diff] |
mesa/main: Add function to find next higher power of two. With gcc implementation uses __builtin_clr which counts number of leading zeros. Fallback implementation uses bit manipulation. First it duplicates the highest bit to all lower bits and then adds one to get the power of two number.