mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2024-11-21 16:46:41 -08:00
vkd3d: Always use _BitScanReverse on Windows.
Use ULONG instead of unsigned long for non-Mingw msvcrt builds. Signed-off-by: Alexandre Julliard <julliard@winehq.org> Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
This commit is contained in:
parent
22e6581ffc
commit
ab3aa96e1f
@ -88,10 +88,10 @@ static inline bool vkd3d_bitmask_is_contiguous(unsigned int mask)
|
||||
/* Undefined for x == 0. */
|
||||
static inline unsigned int vkd3d_log2i(unsigned int x)
|
||||
{
|
||||
#ifdef _MSC_VER
|
||||
#ifdef _WIN32
|
||||
/* _BitScanReverse returns the index of the highest set bit,
|
||||
* unlike clz which is 31 - index. */
|
||||
unsigned long result;
|
||||
ULONG result;
|
||||
_BitScanReverse(&result, x);
|
||||
return (unsigned int)result;
|
||||
#elif defined(HAVE_BUILTIN_CLZ)
|
||||
|
Loading…
Reference in New Issue
Block a user