swr/rastr: Don't assume non-WIN is always 64 bit, instead use the x86_64 define

Submitted by Gert Wollny on May 26, 2018, 9:20 p.m.

Details

Message ID 20180526212046.1650-1-gw.fossdev@gmail.com
State New
Headers show
Series "swr/rastr: Don't assume non-WIN is always 64 bit, instead use the x86_64 define" ( rev: 1 ) in Mesa

Not browsing as part of any series.

Commit Message

Gert Wollny May 26, 2018, 9:20 p.m.
One must not assume that compiling swr on non-Windows platforms is always
done for 64 bit archs. For instance in an Gentoo multiarch installation if
swr is enabled, it will be build for all archs.

Fixes: fa4ab7910e3492b09b40e00c0b82a7bb1bae03d0
   swr/rast: Add some SIMD_T utility functors

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=106401
Signed-off-by: Gert Wollny <gw.fossdev@gmail.com>
---
 src/gallium/drivers/swr/rasterizer/common/simdlib.hpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Patch hide | download patch | download mbox

diff --git a/src/gallium/drivers/swr/rasterizer/common/simdlib.hpp b/src/gallium/drivers/swr/rasterizer/common/simdlib.hpp
index 24cf27d4db..a418c2cd6a 100644
--- a/src/gallium/drivers/swr/rasterizer/common/simdlib.hpp
+++ b/src/gallium/drivers/swr/rasterizer/common/simdlib.hpp
@@ -606,7 +606,7 @@  struct SIMDVecHash
 {
     INLINE uint32_t operator ()(Integer<SIMD_T> val) const
     {
-#if defined(_WIN64) || !defined(_WIN32) // assume non-Windows is always 64-bit
+#if defined(_WIN64) || defined(__x86_64__)
         static_assert(sizeof(void*) == 8, "This path only meant for 64-bit code");
 
         uint64_t crc32 = 0;

Comments

Ping 
Am Samstag, den 26.05.2018, 23:20 +0200 schrieb Gert Wollny:
> One must not assume that compiling swr on non-Windows platforms is
> always
> done for 64 bit archs. For instance in an Gentoo multiarch
> installation if
> swr is enabled, it will be build for all archs.
> 
> Fixes: fa4ab7910e3492b09b40e00c0b82a7bb1bae03d0
>    swr/rast: Add some SIMD_T utility functors
> 
> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=106401
> Signed-off-by: Gert Wollny <gw.fossdev@gmail.com>
> ---
>  src/gallium/drivers/swr/rasterizer/common/simdlib.hpp | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/src/gallium/drivers/swr/rasterizer/common/simdlib.hpp
> b/src/gallium/drivers/swr/rasterizer/common/simdlib.hpp
> index 24cf27d4db..a418c2cd6a 100644
> --- a/src/gallium/drivers/swr/rasterizer/common/simdlib.hpp
> +++ b/src/gallium/drivers/swr/rasterizer/common/simdlib.hpp
> @@ -606,7 +606,7 @@ struct SIMDVecHash
>  {
>      INLINE uint32_t operator ()(Integer<SIMD_T> val) const
>      {
> -#if defined(_WIN64) || !defined(_WIN32) // assume non-Windows is
> always 64-bit
> +#if defined(_WIN64) || defined(__x86_64__)
>          static_assert(sizeof(void*) == 8, "This path only meant for
> 64-bit code");
>  
>          uint64_t crc32 = 0;