Another attempt at fixing the MSVC2005 build.
Apparently direct casting is illegal there too, even though they don't have the cast operators. Reviewed-by: Kim (cherry picked from commit 45c60ceac3d5a401543d7d56a44d1f9227464431)
This commit is contained in:
parent
49fc892129
commit
c889ddb59d
@ -525,7 +525,12 @@ public:
|
|||||||
|
|
||||||
// pre-VS 2008 doesn't have cast intrinsics, whereas 2008 and later requires it
|
// pre-VS 2008 doesn't have cast intrinsics, whereas 2008 and later requires it
|
||||||
#if defined(Q_CC_MSVC) && _MSC_VER < 1500
|
#if defined(Q_CC_MSVC) && _MSC_VER < 1500
|
||||||
static inline Int32x4 v_greaterOrEqual(Float32x4 a, Float32x4 b) { return (__m128i)_mm_cmpgt_ps(a, b); }
|
static inline Int32x4 v_greaterOrEqual(Float32x4 a, Float32x4 b)
|
||||||
|
{
|
||||||
|
union Convert { Int32x4 vi; Float32x4 vf; } convert;
|
||||||
|
convert.vf = _mm_cmpgt_ps(a, b);
|
||||||
|
return convert.vi;
|
||||||
|
}
|
||||||
#else
|
#else
|
||||||
static inline Int32x4 v_greaterOrEqual(Float32x4 a, Float32x4 b) { return _mm_castps_si128(_mm_cmpgt_ps(a, b)); }
|
static inline Int32x4 v_greaterOrEqual(Float32x4 a, Float32x4 b) { return _mm_castps_si128(_mm_cmpgt_ps(a, b)); }
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
Reference in New Issue
Block a user