svn commit: r552871 - head/graphics/mesa-devel/files
Piotr Kubaj
pkubaj at FreeBSD.org
Wed Oct 21 17:01:48 UTC 2020
Author: pkubaj
Date: Wed Oct 21 17:01:47 2020
New Revision: 552871
URL: https://svnweb.freebsd.org/changeset/ports/552871
Log:
graphics/mesa-devel: fix build on big-endian architectures
byteswap.h and bswap_32() don't exist on FreeBSD.
Added:
head/graphics/mesa-devel/files/patch-src_compiler_spirv_spirv__to__nir.c (contents, props changed)
Added: head/graphics/mesa-devel/files/patch-src_compiler_spirv_spirv__to__nir.c
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/graphics/mesa-devel/files/patch-src_compiler_spirv_spirv__to__nir.c Wed Oct 21 17:01:47 2020 (r552871)
@@ -0,0 +1,24 @@
+--- src/compiler/spirv/spirv_to_nir.c.orig 2020-10-21 16:03:29.994285000 +0200
++++ src/compiler/spirv/spirv_to_nir.c 2020-10-21 18:45:12.746719000 +0200
+@@ -37,8 +37,12 @@
+
+ #include <stdio.h>
+ #if UTIL_ARCH_BIG_ENDIAN
++#ifdef __linux__
+ #include <byteswap.h>
++#elif defined(__FreeBSD__)
++#include <sys/endian.h>
+ #endif
++#endif
+
+ void
+ vtn_log(struct vtn_builder *b, enum nir_spirv_debug_level level,
+@@ -415,7 +419,7 @@
+ {
+ uint32_t *copy = ralloc_array(b, uint32_t, word_count);
+ for (unsigned i = 0; i < word_count; i++)
+- copy[i] = bswap_32(words[i]);
++ copy[i] = bswap32(words[i]);
+ words = copy;
+ }
+ #endif
More information about the svn-ports-all
mailing list