mirror of
https://github.com/doitsujin/dxvk.git
synced 2024-12-05 01:24:14 +01:00
[util] Cast _tzcnt_u64 to uint32_t
MSVC has _tzcnt_u64 return a uint64_t, which obviously, it can never return a number that big.
This commit is contained in:
parent
69b1aa251d
commit
287412f746
@ -101,7 +101,7 @@ namespace dxvk::bit {
|
||||
|
||||
inline uint32_t tzcnt(uint64_t n) {
|
||||
#if defined(DXVK_ARCH_X86_64) && defined(_MSC_VER) && !defined(__clang__)
|
||||
return _tzcnt_u64(n);
|
||||
return (uint32_t)_tzcnt_u64(n);
|
||||
#elif defined(DXVK_ARCH_X86_64) && defined(__BMI__)
|
||||
return __tzcnt_u64(n);
|
||||
#elif defined(DXVK_ARCH_X86_64) && (defined(__GNUC__) || defined(__clang__))
|
||||
|
Loading…
Reference in New Issue
Block a user