mirror of
https://github.com/doitsujin/dxvk.git
synced 2025-02-27 22:54:16 +01:00
Fix tzcnt intrinsic on MSVC (#381)
This commit is contained in:
parent
126c50a674
commit
5cc3afcf30
@ -1,6 +1,10 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
|
#ifndef _MSC_VER
|
||||||
#include <x86intrin.h>
|
#include <x86intrin.h>
|
||||||
|
#else
|
||||||
|
#include <intrin.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
namespace dxvk::bit {
|
namespace dxvk::bit {
|
||||||
|
|
||||||
@ -17,7 +21,9 @@ namespace dxvk::bit {
|
|||||||
}
|
}
|
||||||
|
|
||||||
inline uint32_t tzcnt(uint32_t n) {
|
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);
|
return __tzcnt_u32(n);
|
||||||
#elif defined(__GNUC__)
|
#elif defined(__GNUC__)
|
||||||
uint32_t res;
|
uint32_t res;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user