#define LIBGLESV2_MATHUTIL_H_
#include "common/debug.h"
-
-#if defined(_WIN32)
-#include <intrin.h>
-#endif
+#include "common/platform.h"
#include <limits>
#include <algorithm>
inline bool supportsSSE2()
{
-#if defined(_WIN32)
+#ifdef ANGLE_PLATFORM_WINDOWS
static bool checked = false;
static bool supports = false;
return value + alignment - 1 - (value - 1) % alignment;
}
+inline unsigned int UnsignedCeilDivide(unsigned int value, unsigned int divisor)
+{
+ unsigned int divided = value / divisor;
+ return (divided + ((value % divisor == 0) ? 0 : 1));
+}
+
template <class T>
inline bool IsUnsignedAdditionSafe(T lhs, T rhs)
{