freedreno: Add layout_resource_for_modifier screen vfunc
[mesa.git] / src / gallium / drivers / swr / rasterizer / common / intrin.h
index 59d66bc60a8b801ff4d0c2dab5e9aae4df31f01b..4c413caf44110baf79448e2f5152a888b1747329 100644 (file)
@@ -1,25 +1,25 @@
 /****************************************************************************
-* Copyright (C) 2014-2015 Intel Corporation.   All Rights Reserved.
-*
-* Permission is hereby granted, free of charge, to any person obtaining a
-* copy of this software and associated documentation files (the "Software"),
-* to deal in the Software without restriction, including without limitation
-* the rights to use, copy, modify, merge, publish, distribute, sublicense,
-* and/or sell copies of the Software, and to permit persons to whom the
-* Software is furnished to do so, subject to the following conditions:
-*
-* The above copyright notice and this permission notice (including the next
-* paragraph) shall be included in all copies or substantial portions of the
-* Software.
-*
-* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
-* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
-* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
-* IN THE SOFTWARE.
-****************************************************************************/
+ * Copyright (C) 2014-2015 Intel Corporation.   All Rights Reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the next
+ * paragraph) shall be included in all copies or substantial portions of the
+ * Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
+ * IN THE SOFTWARE.
+ ****************************************************************************/
 
 #ifndef __SWR_INTRIN_H__
 #define __SWR_INTRIN_H__
 
 #if !defined(SIMD_ARCH)
 #define SIMD_ARCH KNOB_ARCH
-#endif 
+#endif
 
 #include "simdlib_types.hpp"
 
-typedef SIMDImpl::SIMD128Impl::Float                      simd4scalar;
-typedef SIMDImpl::SIMD128Impl::Double                     simd4scalard;
-typedef SIMDImpl::SIMD128Impl::Integer                    simd4scalari;
-typedef SIMDImpl::SIMD128Impl::Vec4                       simd4vector;
-typedef SIMDImpl::SIMD128Impl::Mask                       simd4mask;
-
-typedef SIMDImpl::SIMD256Impl::Float                      simd8scalar;
-typedef SIMDImpl::SIMD256Impl::Double                     simd8scalard;
-typedef SIMDImpl::SIMD256Impl::Integer                    simd8scalari;
-typedef SIMDImpl::SIMD256Impl::Vec4                       simd8vector;
-typedef SIMDImpl::SIMD256Impl::Mask                       simd8mask;
-
-typedef SIMDImpl::SIMD512Impl::Float                      simd16scalar;
-typedef SIMDImpl::SIMD512Impl::Double                     simd16scalard;
-typedef SIMDImpl::SIMD512Impl::Integer                    simd16scalari;
-typedef SIMDImpl::SIMD512Impl::Vec4                       simd16vector;
-typedef SIMDImpl::SIMD512Impl::Mask                       simd16mask;
-
-#if KNOB_SIMD_WIDTH == 8 
-typedef simd8scalar     simdscalar;
-typedef simd8scalard    simdscalard;
-typedef simd8scalari    simdscalari;
-typedef simd8vector     simdvector;
-typedef simd8mask       simdmask;
+typedef SIMDImpl::SIMD128Impl::Float   simd4scalar;
+typedef SIMDImpl::SIMD128Impl::Double  simd4scalard;
+typedef SIMDImpl::SIMD128Impl::Integer simd4scalari;
+typedef SIMDImpl::SIMD128Impl::Vec4    simd4vector;
+typedef SIMDImpl::SIMD128Impl::Mask    simd4mask;
+
+typedef SIMDImpl::SIMD256Impl::Float   simd8scalar;
+typedef SIMDImpl::SIMD256Impl::Double  simd8scalard;
+typedef SIMDImpl::SIMD256Impl::Integer simd8scalari;
+typedef SIMDImpl::SIMD256Impl::Vec4    simd8vector;
+typedef SIMDImpl::SIMD256Impl::Mask    simd8mask;
+
+typedef SIMDImpl::SIMD512Impl::Float   simd16scalar;
+typedef SIMDImpl::SIMD512Impl::Double  simd16scalard;
+typedef SIMDImpl::SIMD512Impl::Integer simd16scalari;
+typedef SIMDImpl::SIMD512Impl::Vec4    simd16vector;
+typedef SIMDImpl::SIMD512Impl::Mask    simd16mask;
+
+#if KNOB_SIMD_WIDTH == 8
+typedef simd8scalar  simdscalar;
+typedef simd8scalard simdscalard;
+typedef simd8scalari simdscalari;
+typedef simd8vector  simdvector;
+typedef simd8mask    simdmask;
 #else
 #error Unsupported vector width
 #endif
@@ -68,7 +68,7 @@ UINT pdep_u32(UINT a, UINT mask)
 #else
     UINT result = 0;
 
-    // copied from http://wm.ite.pl/articles/pdep-soft-emu.html 
+    // copied from http://wm.ite.pl/articles/pdep-soft-emu.html
     // using bsf instead of funky loop
     DWORD maskIndex;
     while (_BitScanForward(&maskIndex, mask))
@@ -99,8 +99,8 @@ UINT pext_u32(UINT a, UINT mask)
 #if KNOB_ARCH >= KNOB_ARCH_AVX2
     return _pext_u32(a, mask);
 #else
-    UINT result = 0;
-    DWORD maskIndex;
+    UINT     result = 0;
+    DWORD    maskIndex;
     uint32_t currentBit = 0;
     while (_BitScanForward(&maskIndex, mask))
     {
@@ -117,4 +117,4 @@ UINT pext_u32(UINT a, UINT mask)
 #endif
 }
 
-#endif//__SWR_INTRIN_H__
+#endif //__SWR_INTRIN_H__