*/
while (tmp) {
- GLuint i = ffsll(tmp)-1;
+ GLuint i = _mesa_ffsll(tmp)-1;
struct brw_vertex_element *input = &brw->vb.inputs[i];
tmp &= ~((GLuint64EXT)1<<i);
#endif
}
+int
+_mesa_ffsll(long long val)
+{
+#ifdef ffsll
+ return ffsll(val);
+#else
+ int bit;
+
+ assert(sizeof(val) == 8);
+
+ bit = ffs(val);
+ if (bit != 0)
+ return bit;
+
+ bit = ffs(val >> 32);
+ if (bit != 0)
+ return 32 + bit;
+
+ return 0;
+#endif
+}
/**
* Return number of bits set in given GLuint.
extern int
_mesa_ffs(int i);
+extern int
+_mesa_ffsll(long long i);
+
extern unsigned int
_mesa_bitcount(unsigned int n);