mirror of
https://github.com/doitsujin/dxvk.git
synced 2025-03-06 20:58:37 +01:00
Fix tzcnt intrinsic on MSVC (#381)
This commit is contained in:
parent
126c50a674
commit
5cc3afcf30
1 changed files with 7 additions and 1 deletions
|
@ -1,6 +1,10 @@
|
|||
#pragma once
|
||||
|
||||
#ifndef _MSC_VER
|
||||
#include <x86intrin.h>
|
||||
#else
|
||||
#include <intrin.h>
|
||||
#endif
|
||||
|
||||
namespace dxvk::bit {
|
||||
|
||||
|
@ -17,7 +21,9 @@ namespace dxvk::bit {
|
|||
}
|
||||
|
||||
inline uint32_t tzcnt(uint32_t n) {
|
||||
#if defined(__BMI__)
|
||||
#if defined(_MSC_VER)
|
||||
return _tzcnt_u32(n);
|
||||
#elif defined(__BMI__)
|
||||
return __tzcnt_u32(n);
|
||||
#elif defined(__GNUC__)
|
||||
uint32_t res;
|
||||
|
|
Loading…
Add table
Reference in a new issue