mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-08 13:28:06 +02:00
i965/tiled_memcpy: avoid creating bswap32 if it exists as a macro (e.g. on FreeBSD)
Reviewed-by: Eric Engestrom <eric.engestrom@intel.com>
This commit is contained in:
parent
7b520dc74f
commit
c00ee00031
1 changed files with 3 additions and 0 deletions
|
|
@ -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.
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue