1
0
mirror of https://github.com/doitsujin/dxvk.git synced 2024-11-29 19:24:10 +01:00

Fix tzcnt intrinsic on MSVC (#381)

This commit is contained in:
Joshua Ashton 2018-05-19 08:26:25 +01:00 committed by Philip Rebohle
parent 126c50a674
commit 5cc3afcf30

View File

@ -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;