Browse Source

Merge pull request #976 from amaury-ml/compfix

Fixing minor issues reported by the compiler #976
Christophe 6 years ago
parent
commit
d666b5e533
3 changed files with 3 additions and 24 deletions
  1. 2 1
      glm/detail/func_common.inl
  2. 1 1
      glm/detail/func_geometric_simd.inl
  3. 0 22
      glm/detail/type_vec4_simd.inl

+ 2 - 1
glm/detail/func_common.inl

@@ -287,7 +287,8 @@ namespace detail
 			std::numeric_limits<genFIType>::is_iec559 || (std::numeric_limits<genFIType>::is_signed && std::numeric_limits<genFIType>::is_integer),
 			"'sign' only accept signed inputs");
 
-		return detail::compute_sign<1, genFIType, defaultp, std::numeric_limits<genFIType>::is_iec559, highp>::call(vec<1, genFIType>(x)).x;
+		return detail::compute_sign<1, genFIType, defaultp,
+                                    std::numeric_limits<genFIType>::is_iec559, detail::is_aligned<highp>::value>::call(vec<1, genFIType>(x)).x;
 	}
 
 	template<length_t L, typename T, qualifier Q>

+ 1 - 1
glm/detail/func_geometric_simd.inl

@@ -155,7 +155,7 @@ namespace detail
 
 			float32x4_t vd = vrsqrteq_f32(p);
 			vec<4, float, Q> Result;
-			Result.data = vmulq_f32(v, vd);
+			Result.data = vmulq_f32(v.data, vd);
 			return Result;
 		}
 	};

+ 0 - 22
glm/detail/type_vec4_simd.inl

@@ -582,28 +582,6 @@ namespace detail {
 		}
 	};
 
-	template<qualifier Q>
-	struct compute_vec4_div<uint, Q, true>
-	{
-		static vec<4, uint, Q> call(vec<4, uint, Q> const& a, vec<4, uint, Q> const& b)
-		{
-			vec<4, uint, Q> Result;
-			Result.data = vdivq_u32(a.data, b.data);
-			return Result;
-		}
-	};
-
-	template<qualifier Q>
-	struct compute_vec4_div<int, Q, true>
-	{
-		static vec<4, int, Q> call(vec<4, float, Q> const& a, vec<4, int, Q> const& b)
-		{
-			vec<4, int, Q> Result;
-			Result.data = vdivq_s32(a.data, b.data);
-			return Result;
-		}
-	};
-
 	template<qualifier Q>
 	struct compute_vec4_equal<float, Q, false, 32, true>
 	{