mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2025-04-13 05:43:18 -07: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. */
|
/* Undefined for x == 0. */
|
||||||
static inline unsigned int vkd3d_log2i(unsigned int x)
|
static inline unsigned int vkd3d_log2i(unsigned int x)
|
||||||
{
|
{
|
||||||
#ifdef _MSC_VER
|
#ifdef _WIN32
|
||||||
/* _BitScanReverse returns the index of the highest set bit,
|
/* _BitScanReverse returns the index of the highest set bit,
|
||||||
* unlike clz which is 31 - index. */
|
* unlike clz which is 31 - index. */
|
||||||
unsigned long result;
|
ULONG result;
|
||||||
_BitScanReverse(&result, x);
|
_BitScanReverse(&result, x);
|
||||||
return (unsigned int)result;
|
return (unsigned int)result;
|
||||||
#elif defined(HAVE_BUILTIN_CLZ)
|
#elif defined(HAVE_BUILTIN_CLZ)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user