st/mesa: define ST_NEW_ flags as uint64_t values, not enums
authorBrian Paul <brianp@vmware.com>
Mon, 8 Aug 2016 22:37:00 +0000 (16:37 -0600)
committerBrian Paul <brianp@vmware.com>
Tue, 9 Aug 2016 13:50:18 +0000 (07:50 -0600)
commit60dc36a680ff0f768647d928395e19e4fdffa68d
tree6724dcde5fe635782f11a624c7cc75d84956e72d
parentd9519c6f069d2784b2b5eec45085cf21223888de
st/mesa: define ST_NEW_ flags as uint64_t values, not enums

MSVC doesn't support 64-bit enum values, at least not with C code.
The compiler was warning:

c:\users\brian\projects\mesa\src\mesa\state_tracker\st_atom_list.h(43) : warning
 C4309: 'initializing' : truncation of constant value
c:\users\brian\projects\mesa\src\mesa\state_tracker\st_atom_list.h(44) : warning
 C4309: 'initializing' : truncation of constant value
...

And at runtime we crashed since the high 32-bits of the 'dirty' bitmask
was always 0xffffffff and the 32+u_bit_scan() index went out of bounds of
the atoms[] array.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
src/mesa/state_tracker/st_atom.h