swr/rast: stop using MSFT types in platform independent code
[mesa.git] / src / gallium / drivers / swr / rasterizer / core / utils.h
index a8c58d9d4efa011cee0e8bb2ba6a9996ab34f786..392ee4ba94a73831eab46c53bd01f2e02715e327 100644 (file)
@@ -122,6 +122,16 @@ uint32_t ComputeCRC(uint32_t crc, const void *pData, uint32_t size)
     return crc;
 }
 
+//////////////////////////////////////////////////////////////////////////
+/// Check specified bit within a data word
+//////////////////////////////////////////////////////////////////////////
+template <typename T>
+INLINE
+static bool CheckBit(T word, uint32_t bit)
+{
+    return 0 != (word & (T(1) << bit));
+}
+
 //////////////////////////////////////////////////////////////////////////
 /// Add byte offset to any-type pointer
 //////////////////////////////////////////////////////////////////////////