Skip to content
Snippets Groups Projects
Commit ab3aa96e authored by Alexandre Julliard's avatar Alexandre Julliard
Browse files

vkd3d: Always use _BitScanReverse on Windows.


Use ULONG instead of unsigned long for non-Mingw msvcrt builds.

Signed-off-by: Alexandre Julliard's avatarAlexandre Julliard <julliard@winehq.org>
Signed-off-by: default avatarHenri Verbeet <hverbeet@codeweavers.com>
parent 22e6581f
No related branches found
No related tags found
No related merge requests found
......@@ -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)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment