aboutsummaryrefslogtreecommitdiffstats
path: root/src/intel/isl/isl_tiled_memcpy.c
diff options
context:
space:
mode:
authorGreg V <[email protected]>2018-05-27 00:36:30 +0300
committerEric Engestrom <[email protected]>2019-08-08 21:44:33 +0100
commitc00ee00031dd38a3c12d6661eba5f43d8a422e02 (patch)
treec777188fcbf917b2c19506775427058ed172bb82 /src/intel/isl/isl_tiled_memcpy.c
parent7b520dc74f5daf9a404bf85f6480a05b3d6c8c73 (diff)
i965/tiled_memcpy: avoid creating bswap32 if it exists as a macro (e.g. on FreeBSD)
Reviewed-by: Eric Engestrom <[email protected]>
Diffstat (limited to 'src/intel/isl/isl_tiled_memcpy.c')
-rw-r--r--src/intel/isl/isl_tiled_memcpy.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/intel/isl/isl_tiled_memcpy.c b/src/intel/isl/isl_tiled_memcpy.c
index 7df7835f9ab..8771533dbab 100644
--- a/src/intel/isl/isl_tiled_memcpy.c
+++ b/src/intel/isl/isl_tiled_memcpy.c
@@ -64,6 +64,8 @@ ror(uint32_t n, uint32_t d)
return (n >> d) | (n << (32 - d));
}
+// bswap32 already exists as a macro on some platforms (FreeBSD)
+#ifndef bswap32
static inline uint32_t
bswap32(uint32_t n)
{
@@ -76,6 +78,7 @@ bswap32(uint32_t n)
(n << 24);
#endif
}
+#endif
/**
* Copy RGBA to BGRA - swap R and B.