mesa: Don't pass paramter to __builtin_clz which would hve undefined result.
authorPauli Nieminen <suokkos@gmail.com>
Sun, 14 Feb 2010 12:16:20 +0000 (14:16 +0200)
committerPauli Nieminen <suokkos@gmail.com>
Sun, 14 Feb 2010 17:55:58 +0000 (19:55 +0200)
commit6e958832afe9544973528bed78dd3a340b8686f3
treea4e63d1468fc8854649bfc3afc33d04eb4b36fc4
parent7344e20ce4a333bfd8ab142cfdf98098e16b001d
mesa: Don't pass paramter to __builtin_clz which would hve undefined result.

__builtin_clz with parameter 0 has undefined value. When
using -O3 optimizing this would result to too large next
power of two value.

Fix is to check if passed value is 1 and modify formula
for that case.
src/mesa/main/imports.h