summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichał Górny <mgorny@gentoo.org>2016-11-13 11:08:11 +0100
committerMichał Górny <mgorny@gentoo.org>2016-11-15 15:31:53 +0100
commit266fbd96dfbed56ec1737de331a33fccfe4ad030 (patch)
tree26d6d6b34839a2a81cdcdaf5cf7e142ebc2dcd2c /media-libs/mesa/files
parentmedia-libs/mesa: Clean unused files (diff)
downloadgentoo-266fbd96dfbed56ec1737de331a33fccfe4ad030.tar.gz
gentoo-266fbd96dfbed56ec1737de331a33fccfe4ad030.tar.bz2
gentoo-266fbd96dfbed56ec1737de331a33fccfe4ad030.zip
media-libs/mesa: Drop old
Diffstat (limited to 'media-libs/mesa/files')
-rw-r--r--media-libs/mesa/files/glx_ro_text_segm.patch28
-rw-r--r--media-libs/mesa/files/mesa-10.2-dont-require-llvm-for-r300.patch11
-rw-r--r--media-libs/mesa/files/mesa-10.3.7-dont-use-clrsb.patch36
-rw-r--r--media-libs/mesa/files/mesa-10.3.7-format_utils.c.patch1089
-rw-r--r--media-libs/mesa/files/mesa-10.5.1-fstat-include.patch37
5 files changed, 0 insertions, 1201 deletions
diff --git a/media-libs/mesa/files/glx_ro_text_segm.patch b/media-libs/mesa/files/glx_ro_text_segm.patch
deleted file mode 100644
index 495b7dc4ac56..000000000000
--- a/media-libs/mesa/files/glx_ro_text_segm.patch
+++ /dev/null
@@ -1,28 +0,0 @@
-2011-02-09 Jeremy Huddleston <jeremyhu@freedesktop.org
-
- #240956
- * configure.ac add support to enable readonly test segment on x86
-
---- configure.ac.orig 2008-11-17 23:19:38.000000000 +0100
-+++ configure.ac 2008-11-17 23:20:17.000000000 +0100
-@@ -499,6 +499,20 @@
- enable_xcb=no
- fi
-
-+
-+dnl readonly text segment on x86 hardened platforms
-+AC_ARG_ENABLE([glx_rts],
-+ [AS_HELP_STRING([--enable-glx-rts],
-+ [on x86, use a readonly text segment for libGL @<:@default=disabled@:>@])],
-+ [enable_glx_rts="$enableval"],
-+ [enable_glx_rts=no])
-+if test "x$enable_glx_rts" = xyes; then
-+ DEFINES="$DEFINES -DGLX_X86_READONLY_TEXT"
-+else
-+ enable_glx_rts=no
-+fi
-+
-+
- dnl
- dnl libGL configuration per driver
- dnl
diff --git a/media-libs/mesa/files/mesa-10.2-dont-require-llvm-for-r300.patch b/media-libs/mesa/files/mesa-10.2-dont-require-llvm-for-r300.patch
deleted file mode 100644
index a85a3c10f19d..000000000000
--- a/media-libs/mesa/files/mesa-10.2-dont-require-llvm-for-r300.patch
+++ /dev/null
@@ -1,11 +0,0 @@
-diff -Naur a/configure.ac b/configure.ac
---- a/configure.ac 2014-03-03 04:05:33.110522943 +0100
-+++ b/configure.ac 2014-03-03 04:06:44.165518094 +0100
-@@ -1774,7 +1774,6 @@
- HAVE_GALLIUM_R300=yes
- PKG_CHECK_MODULES([RADEON], [libdrm_radeon >= $LIBDRM_RADEON_REQUIRED])
- gallium_require_drm_loader
-- gallium_require_llvm "Gallium R300"
- GALLIUM_DRIVERS_DIRS="$GALLIUM_DRIVERS_DIRS r300"
- gallium_check_st "radeon/drm" "r300/dri" "" "" ""
- DRICOMMON_NEED_LIBDRM=yes
diff --git a/media-libs/mesa/files/mesa-10.3.7-dont-use-clrsb.patch b/media-libs/mesa/files/mesa-10.3.7-dont-use-clrsb.patch
deleted file mode 100644
index c38757dca42a..000000000000
--- a/media-libs/mesa/files/mesa-10.3.7-dont-use-clrsb.patch
+++ /dev/null
@@ -1,36 +0,0 @@
-From 32e98e8ef06f0bb6ad55f9fb5858be77c03367b0 Mon Sep 17 00:00:00 2001
-From: Matt Turner <mattst88@gmail.com>
-Date: Mon, 2 Feb 2015 17:26:49 -0800
-Subject: [PATCH] gallium/util: Don't use __builtin_clrsb in util_last_bit().
-
-Unclear circumstances lead to undefined symbols on x86.
-
-Bugzilla: https://bugs.gentoo.org/show_bug.cgi?id=536916
-Cc: mesa-stable@lists.freedesktop.org
-Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
----
- src/gallium/auxiliary/util/u_math.h | 4 ----
- 1 file changed, 4 deletions(-)
-
-diff --git a/src/gallium/auxiliary/util/u_math.h b/src/gallium/auxiliary/util/u_math.h
-index 19c7343..ca6d0f1 100644
---- a/src/gallium/auxiliary/util/u_math.h
-+++ b/src/gallium/auxiliary/util/u_math.h
-@@ -561,14 +561,10 @@ util_last_bit(unsigned u)
- static INLINE unsigned
- util_last_bit_signed(int i)
- {
--#if defined(__GNUC__) && ((__GNUC__ * 100 + __GNUC_MINOR__) >= 407) && !defined(__INTEL_COMPILER)
-- return 31 - __builtin_clrsb(i);
--#else
- if (i >= 0)
- return util_last_bit(i);
- else
- return util_last_bit(~(unsigned)i);
--#endif
- }
-
- /* Destructively loop over all of the bits in a mask as in:
---
-2.0.4
-
diff --git a/media-libs/mesa/files/mesa-10.3.7-format_utils.c.patch b/media-libs/mesa/files/mesa-10.3.7-format_utils.c.patch
deleted file mode 100644
index e1fba03432f3..000000000000
--- a/media-libs/mesa/files/mesa-10.3.7-format_utils.c.patch
+++ /dev/null
@@ -1,1089 +0,0 @@
-From cfeb394224f2daeb2139cf4ec489a4dd8297a44d Mon Sep 17 00:00:00 2001
-From: Brian Paul <brianp@vmware.com>
-Date: Fri, 12 Sep 2014 08:31:15 -0600
-Subject: [PATCH] mesa: break up _mesa_swizzle_and_convert() to reduce compile
- time
-
-This reduces gcc -O3 compile time to 1/4 of what it was on my system.
-Reduces MSVC release build time too.
-
-Reviewed-by: Jason Ekstrand <jason.ekstrand@intel.com>
----
- src/mesa/main/format_utils.c | 1030 ++++++++++++++++++++++--------------------
- 1 file changed, 550 insertions(+), 480 deletions(-)
-
-diff --git a/src/mesa/main/format_utils.c b/src/mesa/main/format_utils.c
-index 240e3bc..29d779a 100644
---- a/src/mesa/main/format_utils.c
-+++ b/src/mesa/main/format_utils.c
-@@ -352,9 +352,14 @@ swizzle_convert_try_memcpy(void *dst, GLenum dst_type, int num_dst_channels,
- */
- #define SWIZZLE_CONVERT(DST_TYPE, SRC_TYPE, CONV) \
- do { \
-+ const uint8_t swizzle_x = swizzle[0]; \
-+ const uint8_t swizzle_y = swizzle[1]; \
-+ const uint8_t swizzle_z = swizzle[2]; \
-+ const uint8_t swizzle_w = swizzle[3]; \
- const SRC_TYPE *typed_src = void_src; \
- DST_TYPE *typed_dst = void_dst; \
- DST_TYPE tmp[7]; \
-+ int s, j; \
- tmp[4] = 0; \
- tmp[5] = one; \
- switch (num_dst_channels) { \
-@@ -423,7 +428,527 @@ swizzle_convert_try_memcpy(void *dst, GLenum dst_type, int num_dst_channels,
- } \
- break; \
- } \
-- } while (0);
-+ } while (0)
-+
-+
-+static void
-+convert_float(void *void_dst, int num_dst_channels,
-+ const void *void_src, GLenum src_type, int num_src_channels,
-+ const uint8_t swizzle[4], bool normalized, int count)
-+{
-+ const float one = 1.0f;
-+
-+ switch (src_type) {
-+ case GL_FLOAT:
-+ SWIZZLE_CONVERT(float, float, src);
-+ break;
-+ case GL_HALF_FLOAT:
-+ SWIZZLE_CONVERT(float, uint16_t, _mesa_half_to_float(src));
-+ break;
-+ case GL_UNSIGNED_BYTE:
-+ if (normalized) {
-+ SWIZZLE_CONVERT(float, uint8_t, unorm_to_float(src, 8));
-+ } else {
-+ SWIZZLE_CONVERT(float, uint8_t, src);
-+ }
-+ break;
-+ case GL_BYTE:
-+ if (normalized) {
-+ SWIZZLE_CONVERT(float, int8_t, snorm_to_float(src, 8));
-+ } else {
-+ SWIZZLE_CONVERT(float, int8_t, src);
-+ }
-+ break;
-+ case GL_UNSIGNED_SHORT:
-+ if (normalized) {
-+ SWIZZLE_CONVERT(float, uint16_t, unorm_to_float(src, 16));
-+ } else {
-+ SWIZZLE_CONVERT(float, uint16_t, src);
-+ }
-+ break;
-+ case GL_SHORT:
-+ if (normalized) {
-+ SWIZZLE_CONVERT(float, int16_t, snorm_to_float(src, 16));
-+ } else {
-+ SWIZZLE_CONVERT(float, int16_t, src);
-+ }
-+ break;
-+ case GL_UNSIGNED_INT:
-+ if (normalized) {
-+ SWIZZLE_CONVERT(float, uint32_t, unorm_to_float(src, 32));
-+ } else {
-+ SWIZZLE_CONVERT(float, uint32_t, src);
-+ }
-+ break;
-+ case GL_INT:
-+ if (normalized) {
-+ SWIZZLE_CONVERT(float, int32_t, snorm_to_float(src, 32));
-+ } else {
-+ SWIZZLE_CONVERT(float, int32_t, src);
-+ }
-+ break;
-+ default:
-+ assert(!"Invalid channel type combination");
-+ }
-+}
-+
-+
-+static void
-+convert_half_float(void *void_dst, int num_dst_channels,
-+ const void *void_src, GLenum src_type, int num_src_channels,
-+ const uint8_t swizzle[4], bool normalized, int count)
-+{
-+ const uint16_t one = _mesa_float_to_half(1.0f);
-+
-+ switch (src_type) {
-+ case GL_FLOAT:
-+ SWIZZLE_CONVERT(uint16_t, float, _mesa_float_to_half(src));
-+ break;
-+ case GL_HALF_FLOAT:
-+ SWIZZLE_CONVERT(uint16_t, uint16_t, src);
-+ break;
-+ case GL_UNSIGNED_BYTE:
-+ if (normalized) {
-+ SWIZZLE_CONVERT(uint16_t, uint8_t, unorm_to_half(src, 8));
-+ } else {
-+ SWIZZLE_CONVERT(uint16_t, uint8_t, _mesa_float_to_half(src));
-+ }
-+ break;
-+ case GL_BYTE:
-+ if (normalized) {
-+ SWIZZLE_CONVERT(uint16_t, int8_t, snorm_to_half(src, 8));
-+ } else {
-+ SWIZZLE_CONVERT(uint16_t, int8_t, _mesa_float_to_half(src));
-+ }
-+ break;
-+ case GL_UNSIGNED_SHORT:
-+ if (normalized) {
-+ SWIZZLE_CONVERT(uint16_t, uint16_t, unorm_to_half(src, 16));
-+ } else {
-+ SWIZZLE_CONVERT(uint16_t, uint16_t, _mesa_float_to_half(src));
-+ }
-+ break;
-+ case GL_SHORT:
-+ if (normalized) {
-+ SWIZZLE_CONVERT(uint16_t, int16_t, snorm_to_half(src, 16));
-+ } else {
-+ SWIZZLE_CONVERT(uint16_t, int16_t, _mesa_float_to_half(src));
-+ }
-+ break;
-+ case GL_UNSIGNED_INT:
-+ if (normalized) {
-+ SWIZZLE_CONVERT(uint16_t, uint32_t, unorm_to_half(src, 32));
-+ } else {
-+ SWIZZLE_CONVERT(uint16_t, uint32_t, _mesa_float_to_half(src));
-+ }
-+ break;
-+ case GL_INT:
-+ if (normalized) {
-+ SWIZZLE_CONVERT(uint16_t, int32_t, snorm_to_half(src, 32));
-+ } else {
-+ SWIZZLE_CONVERT(uint16_t, int32_t, _mesa_float_to_half(src));
-+ }
-+ break;
-+ default:
-+ assert(!"Invalid channel type combination");
-+ }
-+}
-+
-+
-+static void
-+convert_ubyte(void *void_dst, int num_dst_channels,
-+ const void *void_src, GLenum src_type, int num_src_channels,
-+ const uint8_t swizzle[4], bool normalized, int count)
-+{
-+ const uint8_t one = normalized ? UINT8_MAX : 1;
-+
-+ switch (src_type) {
-+ case GL_FLOAT:
-+ if (normalized) {
-+ SWIZZLE_CONVERT(uint8_t, float, float_to_unorm(src, 8));
-+ } else {
-+ SWIZZLE_CONVERT(uint8_t, float, (src < 0) ? 0 : src);
-+ }
-+ break;
-+ case GL_HALF_FLOAT:
-+ if (normalized) {
-+ SWIZZLE_CONVERT(uint8_t, uint16_t, half_to_unorm(src, 8));
-+ } else {
-+ SWIZZLE_CONVERT(uint8_t, uint16_t, half_to_uint(src));
-+ }
-+ break;
-+ case GL_UNSIGNED_BYTE:
-+ SWIZZLE_CONVERT(uint8_t, uint8_t, src);
-+ break;
-+ case GL_BYTE:
-+ if (normalized) {
-+ SWIZZLE_CONVERT(uint8_t, int8_t, snorm_to_unorm(src, 8, 8));
-+ } else {
-+ SWIZZLE_CONVERT(uint8_t, int8_t, (src < 0) ? 0 : src);
-+ }
-+ break;
-+ case GL_UNSIGNED_SHORT:
-+ if (normalized) {
-+ SWIZZLE_CONVERT(uint8_t, uint16_t, unorm_to_unorm(src, 16, 8));
-+ } else {
-+ SWIZZLE_CONVERT(uint8_t, uint16_t, src);
-+ }
-+ break;
-+ case GL_SHORT:
-+ if (normalized) {
-+ SWIZZLE_CONVERT(uint8_t, int16_t, snorm_to_unorm(src, 16, 8));
-+ } else {
-+ SWIZZLE_CONVERT(uint8_t, int16_t, (src < 0) ? 0 : src);
-+ }
-+ break;
-+ case GL_UNSIGNED_INT:
-+ if (normalized) {
-+ SWIZZLE_CONVERT(uint8_t, uint32_t, unorm_to_unorm(src, 32, 8));
-+ } else {
-+ SWIZZLE_CONVERT(uint8_t, uint32_t, src);
-+ }
-+ break;
-+ case GL_INT:
-+ if (normalized) {
-+ SWIZZLE_CONVERT(uint8_t, int32_t, snorm_to_unorm(src, 32, 8));
-+ } else {
-+ SWIZZLE_CONVERT(uint8_t, int32_t, (src < 0) ? 0 : src);
-+ }
-+ break;
-+ default:
-+ assert(!"Invalid channel type combination");
-+ }
-+}
-+
-+
-+static void
-+convert_byte(void *void_dst, int num_dst_channels,
-+ const void *void_src, GLenum src_type, int num_src_channels,
-+ const uint8_t swizzle[4], bool normalized, int count)
-+{
-+ const int8_t one = normalized ? INT8_MAX : 1;
-+
-+ switch (src_type) {
-+ case GL_FLOAT:
-+ if (normalized) {
-+ SWIZZLE_CONVERT(uint8_t, float, float_to_snorm(src, 8));
-+ } else {
-+ SWIZZLE_CONVERT(uint8_t, float, src);
-+ }
-+ break;
-+ case GL_HALF_FLOAT:
-+ if (normalized) {
-+ SWIZZLE_CONVERT(uint8_t, uint16_t, half_to_snorm(src, 8));
-+ } else {
-+ SWIZZLE_CONVERT(uint8_t, uint16_t, _mesa_half_to_float(src));
-+ }
-+ break;
-+ case GL_UNSIGNED_BYTE:
-+ if (normalized) {
-+ SWIZZLE_CONVERT(int8_t, uint8_t, unorm_to_snorm(src, 8, 8));
-+ } else {
-+ SWIZZLE_CONVERT(int8_t, uint8_t, src);
-+ }
-+ break;
-+ case GL_BYTE:
-+ SWIZZLE_CONVERT(int8_t, int8_t, src);
-+ break;
-+ case GL_UNSIGNED_SHORT:
-+ if (normalized) {
-+ SWIZZLE_CONVERT(int8_t, uint16_t, unorm_to_snorm(src, 16, 8));
-+ } else {
-+ SWIZZLE_CONVERT(int8_t, uint16_t, src);
-+ }
-+ break;
-+ case GL_SHORT:
-+ if (normalized) {
-+ SWIZZLE_CONVERT(int8_t, int16_t, snorm_to_snorm(src, 16, 8));
-+ } else {
-+ SWIZZLE_CONVERT(int8_t, int16_t, src);
-+ }
-+ break;
-+ case GL_UNSIGNED_INT:
-+ if (normalized) {
-+ SWIZZLE_CONVERT(int8_t, uint32_t, unorm_to_snorm(src, 32, 8));
-+ } else {
-+ SWIZZLE_CONVERT(int8_t, uint32_t, src);
-+ }
-+ break;
-+ case GL_INT:
-+ if (normalized) {
-+ SWIZZLE_CONVERT(int8_t, int32_t, snorm_to_snorm(src, 32, 8));
-+ } else {
-+ SWIZZLE_CONVERT(int8_t, int32_t, src);
-+ }
-+ break;
-+ default:
-+ assert(!"Invalid channel type combination");
-+ }
-+}
-+
-+
-+static void
-+convert_ushort(void *void_dst, int num_dst_channels,
-+ const void *void_src, GLenum src_type, int num_src_channels,
-+ const uint8_t swizzle[4], bool normalized, int count)
-+{
-+ const uint16_t one = normalized ? UINT16_MAX : 1;
-+
-+ switch (src_type) {
-+ case GL_FLOAT:
-+ if (normalized) {
-+ SWIZZLE_CONVERT(uint16_t, float, float_to_unorm(src, 16));
-+ } else {
-+ SWIZZLE_CONVERT(uint16_t, float, (src < 0) ? 0 : src);
-+ }
-+ break;
-+ case GL_HALF_FLOAT:
-+ if (normalized) {
-+ SWIZZLE_CONVERT(uint16_t, uint16_t, half_to_unorm(src, 16));
-+ } else {
-+ SWIZZLE_CONVERT(uint16_t, uint16_t, half_to_uint(src));
-+ }
-+ break;
-+ case GL_UNSIGNED_BYTE:
-+ if (normalized) {
-+ SWIZZLE_CONVERT(uint16_t, uint8_t, unorm_to_unorm(src, 8, 16));
-+ } else {
-+ SWIZZLE_CONVERT(uint16_t, uint8_t, src);
-+ }
-+ break;
-+ case GL_BYTE:
-+ if (normalized) {
-+ SWIZZLE_CONVERT(uint16_t, int8_t, snorm_to_unorm(src, 8, 16));
-+ } else {
-+ SWIZZLE_CONVERT(uint16_t, int8_t, (src < 0) ? 0 : src);
-+ }
-+ break;
-+ case GL_UNSIGNED_SHORT:
-+ SWIZZLE_CONVERT(uint16_t, uint16_t, src);
-+ break;
-+ case GL_SHORT:
-+ if (normalized) {
-+ SWIZZLE_CONVERT(uint16_t, int16_t, snorm_to_unorm(src, 16, 16));
-+ } else {
-+ SWIZZLE_CONVERT(uint16_t, int16_t, (src < 0) ? 0 : src);
-+ }
-+ break;
-+ case GL_UNSIGNED_INT:
-+ if (normalized) {
-+ SWIZZLE_CONVERT(uint16_t, uint32_t, unorm_to_unorm(src, 32, 16));
-+ } else {
-+ SWIZZLE_CONVERT(uint16_t, uint32_t, src);
-+ }
-+ break;
-+ case GL_INT:
-+ if (normalized) {
-+ SWIZZLE_CONVERT(uint16_t, int32_t, snorm_to_unorm(src, 32, 16));
-+ } else {
-+ SWIZZLE_CONVERT(uint16_t, int32_t, (src < 0) ? 0 : src);
-+ }
-+ break;
-+ default:
-+ assert(!"Invalid channel type combination");
-+ }
-+}
-+
-+
-+static void
-+convert_short(void *void_dst, int num_dst_channels,
-+ const void *void_src, GLenum src_type, int num_src_channels,
-+ const uint8_t swizzle[4], bool normalized, int count)
-+{
-+ const int16_t one = normalized ? INT16_MAX : 1;
-+
-+ switch (src_type) {
-+ case GL_FLOAT:
-+ if (normalized) {
-+ SWIZZLE_CONVERT(uint16_t, float, float_to_snorm(src, 16));
-+ } else {
-+ SWIZZLE_CONVERT(uint16_t, float, src);
-+ }
-+ break;
-+ case GL_HALF_FLOAT:
-+ if (normalized) {
-+ SWIZZLE_CONVERT(uint16_t, uint16_t, half_to_snorm(src, 16));
-+ } else {
-+ SWIZZLE_CONVERT(uint16_t, uint16_t, _mesa_half_to_float(src));
-+ }
-+ break;
-+ case GL_UNSIGNED_BYTE:
-+ if (normalized) {
-+ SWIZZLE_CONVERT(int16_t, uint8_t, unorm_to_snorm(src, 8, 16));
-+ } else {
-+ SWIZZLE_CONVERT(int16_t, uint8_t, src);
-+ }
-+ break;
-+ case GL_BYTE:
-+ if (normalized) {
-+ SWIZZLE_CONVERT(int16_t, int8_t, snorm_to_snorm(src, 8, 16));
-+ } else {
-+ SWIZZLE_CONVERT(int16_t, int8_t, src);
-+ }
-+ break;
-+ case GL_UNSIGNED_SHORT:
-+ if (normalized) {
-+ SWIZZLE_CONVERT(int16_t, uint16_t, unorm_to_snorm(src, 16, 16));
-+ } else {
-+ SWIZZLE_CONVERT(int16_t, uint16_t, src);
-+ }
-+ break;
-+ case GL_SHORT:
-+ SWIZZLE_CONVERT(int16_t, int16_t, src);
-+ break;
-+ case GL_UNSIGNED_INT:
-+ if (normalized) {
-+ SWIZZLE_CONVERT(int16_t, uint32_t, unorm_to_snorm(src, 32, 16));
-+ } else {
-+ SWIZZLE_CONVERT(int16_t, uint32_t, src);
-+ }
-+ break;
-+ case GL_INT:
-+ if (normalized) {
-+ SWIZZLE_CONVERT(int16_t, int32_t, snorm_to_snorm(src, 32, 16));
-+ } else {
-+ SWIZZLE_CONVERT(int16_t, int32_t, src);
-+ }
-+ break;
-+ default:
-+ assert(!"Invalid channel type combination");
-+ }
-+}
-+
-+static void
-+convert_uint(void *void_dst, int num_dst_channels,
-+ const void *void_src, GLenum src_type, int num_src_channels,
-+ const uint8_t swizzle[4], bool normalized, int count)
-+{
-+ const uint32_t one = normalized ? UINT32_MAX : 1;
-+
-+ switch (src_type) {
-+ case GL_FLOAT:
-+ if (normalized) {
-+ SWIZZLE_CONVERT(uint32_t, float, float_to_unorm(src, 32));
-+ } else {
-+ SWIZZLE_CONVERT(uint32_t, float, (src < 0) ? 0 : src);
-+ }
-+ break;
-+ case GL_HALF_FLOAT:
-+ if (normalized) {
-+ SWIZZLE_CONVERT(uint32_t, uint16_t, half_to_unorm(src, 32));
-+ } else {
-+ SWIZZLE_CONVERT(uint32_t, uint16_t, half_to_uint(src));
-+ }
-+ break;
-+ case GL_UNSIGNED_BYTE:
-+ if (normalized) {
-+ SWIZZLE_CONVERT(uint32_t, uint8_t, unorm_to_unorm(src, 8, 32));
-+ } else {
-+ SWIZZLE_CONVERT(uint32_t, uint8_t, src);
-+ }
-+ break;
-+ case GL_BYTE:
-+ if (normalized) {
-+ SWIZZLE_CONVERT(uint32_t, int8_t, snorm_to_unorm(src, 8, 32));
-+ } else {
-+ SWIZZLE_CONVERT(uint32_t, int8_t, (src < 0) ? 0 : src);
-+ }
-+ break;
-+ case GL_UNSIGNED_SHORT:
-+ if (normalized) {
-+ SWIZZLE_CONVERT(uint32_t, uint16_t, unorm_to_unorm(src, 16, 32));
-+ } else {
-+ SWIZZLE_CONVERT(uint32_t, uint16_t, src);
-+ }
-+ break;
-+ case GL_SHORT:
-+ if (normalized) {
-+ SWIZZLE_CONVERT(uint32_t, int16_t, snorm_to_unorm(src, 16, 32));
-+ } else {
-+ SWIZZLE_CONVERT(uint32_t, int16_t, (src < 0) ? 0 : src);
-+ }
-+ break;
-+ case GL_UNSIGNED_INT:
-+ SWIZZLE_CONVERT(uint32_t, uint32_t, src);
-+ break;
-+ case GL_INT:
-+ if (normalized) {
-+ SWIZZLE_CONVERT(uint32_t, int32_t, snorm_to_unorm(src, 32, 32));
-+ } else {
-+ SWIZZLE_CONVERT(uint32_t, int32_t, (src < 0) ? 0 : src);
-+ }
-+ break;
-+ default:
-+ assert(!"Invalid channel type combination");
-+ }
-+}
-+
-+
-+static void
-+convert_int(void *void_dst, int num_dst_channels,
-+ const void *void_src, GLenum src_type, int num_src_channels,
-+ const uint8_t swizzle[4], bool normalized, int count)
-+{
-+ const int32_t one = normalized ? INT32_MAX : 12;
-+
-+ switch (src_type) {
-+ case GL_FLOAT:
-+ if (normalized) {
-+ SWIZZLE_CONVERT(uint32_t, float, float_to_snorm(src, 32));
-+ } else {
-+ SWIZZLE_CONVERT(uint32_t, float, src);
-+ }
-+ break;
-+ case GL_HALF_FLOAT:
-+ if (normalized) {
-+ SWIZZLE_CONVERT(uint32_t, uint16_t, half_to_snorm(src, 32));
-+ } else {
-+ SWIZZLE_CONVERT(uint32_t, uint16_t, _mesa_half_to_float(src));
-+ }
-+ break;
-+ case GL_UNSIGNED_BYTE:
-+ if (normalized) {
-+ SWIZZLE_CONVERT(int32_t, uint8_t, unorm_to_snorm(src, 8, 32));
-+ } else {
-+ SWIZZLE_CONVERT(int32_t, uint8_t, src);
-+ }
-+ break;
-+ case GL_BYTE:
-+ if (normalized) {
-+ SWIZZLE_CONVERT(int32_t, int8_t, snorm_to_snorm(src, 8, 32));
-+ } else {
-+ SWIZZLE_CONVERT(int32_t, int8_t, src);
-+ }
-+ break;
-+ case GL_UNSIGNED_SHORT:
-+ if (normalized) {
-+ SWIZZLE_CONVERT(int32_t, uint16_t, unorm_to_snorm(src, 16, 32));
-+ } else {
-+ SWIZZLE_CONVERT(int32_t, uint16_t, src);
-+ }
-+ break;
-+ case GL_SHORT:
-+ if (normalized) {
-+ SWIZZLE_CONVERT(int32_t, int16_t, snorm_to_snorm(src, 16, 32));
-+ } else {
-+ SWIZZLE_CONVERT(int32_t, int16_t, src);
-+ }
-+ break;
-+ case GL_UNSIGNED_INT:
-+ if (normalized) {
-+ SWIZZLE_CONVERT(int32_t, uint32_t, unorm_to_snorm(src, 32, 32));
-+ } else {
-+ SWIZZLE_CONVERT(int32_t, uint32_t, src);
-+ }
-+ break;
-+ case GL_INT:
-+ SWIZZLE_CONVERT(int32_t, int32_t, src);
-+ break;
-+ default:
-+ assert(!"Invalid channel type combination");
-+ }
-+}
-+
-
- /**
- * Convert between array-based color formats.
-@@ -478,499 +1003,44 @@ _mesa_swizzle_and_convert(void *void_dst, GLenum dst_type, int num_dst_channels,
- const void *void_src, GLenum src_type, int num_src_channels,
- const uint8_t swizzle[4], bool normalized, int count)
- {
-- int s, j;
-- register uint8_t swizzle_x, swizzle_y, swizzle_z, swizzle_w;
--
- if (swizzle_convert_try_memcpy(void_dst, dst_type, num_dst_channels,
- void_src, src_type, num_src_channels,
- swizzle, normalized, count))
- return;
-
-- swizzle_x = swizzle[0];
-- swizzle_y = swizzle[1];
-- swizzle_z = swizzle[2];
-- swizzle_w = swizzle[3];
--
- switch (dst_type) {
- case GL_FLOAT:
-- {
-- const float one = 1.0f;
-- switch (src_type) {
-- case GL_FLOAT:
-- SWIZZLE_CONVERT(float, float, src)
-- break;
-- case GL_HALF_FLOAT:
-- SWIZZLE_CONVERT(float, uint16_t, _mesa_half_to_float(src))
-- break;
-- case GL_UNSIGNED_BYTE:
-- if (normalized) {
-- SWIZZLE_CONVERT(float, uint8_t, unorm_to_float(src, 8))
-- } else {
-- SWIZZLE_CONVERT(float, uint8_t, src)
-- }
-- break;
-- case GL_BYTE:
-- if (normalized) {
-- SWIZZLE_CONVERT(float, int8_t, snorm_to_float(src, 8))
-- } else {
-- SWIZZLE_CONVERT(float, int8_t, src)
-- }
-- break;
-- case GL_UNSIGNED_SHORT:
-- if (normalized) {
-- SWIZZLE_CONVERT(float, uint16_t, unorm_to_float(src, 16))
-- } else {
-- SWIZZLE_CONVERT(float, uint16_t, src)
-- }
-- break;
-- case GL_SHORT:
-- if (normalized) {
-- SWIZZLE_CONVERT(float, int16_t, snorm_to_float(src, 16))
-- } else {
-- SWIZZLE_CONVERT(float, int16_t, src)
-- }
-- break;
-- case GL_UNSIGNED_INT:
-- if (normalized) {
-- SWIZZLE_CONVERT(float, uint32_t, unorm_to_float(src, 32))
-- } else {
-- SWIZZLE_CONVERT(float, uint32_t, src)
-- }
-- break;
-- case GL_INT:
-- if (normalized) {
-- SWIZZLE_CONVERT(float, int32_t, snorm_to_float(src, 32))
-- } else {
-- SWIZZLE_CONVERT(float, int32_t, src)
-- }
-- break;
-- default:
-- assert(!"Invalid channel type combination");
-- }
-- }
-- break;
-+ convert_float(void_dst, num_dst_channels, void_src, src_type,
-+ num_src_channels, swizzle, normalized, count);
-+ break;
- case GL_HALF_FLOAT:
-- {
-- const uint16_t one = _mesa_float_to_half(1.0f);
-- switch (src_type) {
-- case GL_FLOAT:
-- SWIZZLE_CONVERT(uint16_t, float, _mesa_float_to_half(src))
-- break;
-- case GL_HALF_FLOAT:
-- SWIZZLE_CONVERT(uint16_t, uint16_t, src)
-- break;
-- case GL_UNSIGNED_BYTE:
-- if (normalized) {
-- SWIZZLE_CONVERT(uint16_t, uint8_t, unorm_to_half(src, 8))
-- } else {
-- SWIZZLE_CONVERT(uint16_t, uint8_t, _mesa_float_to_half(src))
-- }
-- break;
-- case GL_BYTE:
-- if (normalized) {
-- SWIZZLE_CONVERT(uint16_t, int8_t, snorm_to_half(src, 8))
-- } else {
-- SWIZZLE_CONVERT(uint16_t, int8_t, _mesa_float_to_half(src))
-- }
-- break;
-- case GL_UNSIGNED_SHORT:
-- if (normalized) {
-- SWIZZLE_CONVERT(uint16_t, uint16_t, unorm_to_half(src, 16))
-- } else {
-- SWIZZLE_CONVERT(uint16_t, uint16_t, _mesa_float_to_half(src))
-- }
-- break;
-- case GL_SHORT:
-- if (normalized) {
-- SWIZZLE_CONVERT(uint16_t, int16_t, snorm_to_half(src, 16))
-- } else {
-- SWIZZLE_CONVERT(uint16_t, int16_t, _mesa_float_to_half(src))
-- }
-- break;
-- case GL_UNSIGNED_INT:
-- if (normalized) {
-- SWIZZLE_CONVERT(uint16_t, uint32_t, unorm_to_half(src, 32))
-- } else {
-- SWIZZLE_CONVERT(uint16_t, uint32_t, _mesa_float_to_half(src))
-- }
-- break;
-- case GL_INT:
-- if (normalized) {
-- SWIZZLE_CONVERT(uint16_t, int32_t, snorm_to_half(src, 32))
-- } else {
-- SWIZZLE_CONVERT(uint16_t, int32_t, _mesa_float_to_half(src))
-- }
-- break;
-- default:
-- assert(!"Invalid channel type combination");
-- }
-- }
-- break;
-+ convert_half_float(void_dst, num_dst_channels, void_src, src_type,
-+ num_src_channels, swizzle, normalized, count);
-+ break;
- case GL_UNSIGNED_BYTE:
-- {
-- const uint8_t one = normalized ? UINT8_MAX : 1;
-- switch (src_type) {
-- case GL_FLOAT:
-- if (normalized) {
-- SWIZZLE_CONVERT(uint8_t, float, float_to_unorm(src, 8))
-- } else {
-- SWIZZLE_CONVERT(uint8_t, float, (src < 0) ? 0 : src)
-- }
-- break;
-- case GL_HALF_FLOAT:
-- if (normalized) {
-- SWIZZLE_CONVERT(uint8_t, uint16_t, half_to_unorm(src, 8))
-- } else {
-- SWIZZLE_CONVERT(uint8_t, uint16_t, half_to_uint(src))
-- }
-- break;
-- case GL_UNSIGNED_BYTE:
-- SWIZZLE_CONVERT(uint8_t, uint8_t, src)
-- break;
-- case GL_BYTE:
-- if (normalized) {
-- SWIZZLE_CONVERT(uint8_t, int8_t, snorm_to_unorm(src, 8, 8))
-- } else {
-- SWIZZLE_CONVERT(uint8_t, int8_t, (src < 0) ? 0 : src)
-- }
-- break;
-- case GL_UNSIGNED_SHORT:
-- if (normalized) {
-- SWIZZLE_CONVERT(uint8_t, uint16_t, unorm_to_unorm(src, 16, 8))
-- } else {
-- SWIZZLE_CONVERT(uint8_t, uint16_t, src)
-- }
-- break;
-- case GL_SHORT:
-- if (normalized) {
-- SWIZZLE_CONVERT(uint8_t, int16_t, snorm_to_unorm(src, 16, 8))
-- } else {
-- SWIZZLE_CONVERT(uint8_t, int16_t, (src < 0) ? 0 : src)
-- }
-- break;
-- case GL_UNSIGNED_INT:
-- if (normalized) {
-- SWIZZLE_CONVERT(uint8_t, uint32_t, unorm_to_unorm(src, 32, 8))
-- } else {
-- SWIZZLE_CONVERT(uint8_t, uint32_t, src)
-- }
-- break;
-- case GL_INT:
-- if (normalized) {
-- SWIZZLE_CONVERT(uint8_t, int32_t, snorm_to_unorm(src, 32, 8))
-- } else {
-- SWIZZLE_CONVERT(uint8_t, int32_t, (src < 0) ? 0 : src)
-- }
-- break;
-- default:
-- assert(!"Invalid channel type combination");
-- }
-- }
-- break;
-+ convert_ubyte(void_dst, num_dst_channels, void_src, src_type,
-+ num_src_channels, swizzle, normalized, count);
-+ break;
- case GL_BYTE:
-- {
-- const int8_t one = normalized ? INT8_MAX : 1;
-- switch (src_type) {
-- case GL_FLOAT:
-- if (normalized) {
-- SWIZZLE_CONVERT(uint8_t, float, float_to_snorm(src, 8))
-- } else {
-- SWIZZLE_CONVERT(uint8_t, float, src)
-- }
-- break;
-- case GL_HALF_FLOAT:
-- if (normalized) {
-- SWIZZLE_CONVERT(uint8_t, uint16_t, half_to_snorm(src, 8))
-- } else {
-- SWIZZLE_CONVERT(uint8_t, uint16_t, _mesa_half_to_float(src))
-- }
-- break;
-- case GL_UNSIGNED_BYTE:
-- if (normalized) {
-- SWIZZLE_CONVERT(int8_t, uint8_t, unorm_to_snorm(src, 8, 8))
-- } else {
-- SWIZZLE_CONVERT(int8_t, uint8_t, src)
-- }
-- break;
-- case GL_BYTE:
-- SWIZZLE_CONVERT(int8_t, int8_t, src)
-- break;
-- case GL_UNSIGNED_SHORT:
-- if (normalized) {
-- SWIZZLE_CONVERT(int8_t, uint16_t, unorm_to_snorm(src, 16, 8))
-- } else {
-- SWIZZLE_CONVERT(int8_t, uint16_t, src)
-- }
-- break;
-- case GL_SHORT:
-- if (normalized) {
-- SWIZZLE_CONVERT(int8_t, int16_t, snorm_to_snorm(src, 16, 8))
-- } else {
-- SWIZZLE_CONVERT(int8_t, int16_t, src)
-- }
-- break;
-- case GL_UNSIGNED_INT:
-- if (normalized) {
-- SWIZZLE_CONVERT(int8_t, uint32_t, unorm_to_snorm(src, 32, 8))
-- } else {
-- SWIZZLE_CONVERT(int8_t, uint32_t, src)
-- }
-- break;
-- case GL_INT:
-- if (normalized) {
-- SWIZZLE_CONVERT(int8_t, int32_t, snorm_to_snorm(src, 32, 8))
-- } else {
-- SWIZZLE_CONVERT(int8_t, int32_t, src)
-- }
-- break;
-- default:
-- assert(!"Invalid channel type combination");
-- }
-- }
-- break;
-+ convert_byte(void_dst, num_dst_channels, void_src, src_type,
-+ num_src_channels, swizzle, normalized, count);
-+ break;
- case GL_UNSIGNED_SHORT:
-- {
-- const uint16_t one = normalized ? UINT16_MAX : 1;
-- switch (src_type) {
-- case GL_FLOAT:
-- if (normalized) {
-- SWIZZLE_CONVERT(uint16_t, float, float_to_unorm(src, 16))
-- } else {
-- SWIZZLE_CONVERT(uint16_t, float, (src < 0) ? 0 : src)
-- }
-- break;
-- case GL_HALF_FLOAT:
-- if (normalized) {
-- SWIZZLE_CONVERT(uint16_t, uint16_t, half_to_unorm(src, 16))
-- } else {
-- SWIZZLE_CONVERT(uint16_t, uint16_t, half_to_uint(src))
-- }
-- break;
-- case GL_UNSIGNED_BYTE:
-- if (normalized) {
-- SWIZZLE_CONVERT(uint16_t, uint8_t, unorm_to_unorm(src, 8, 16))
-- } else {
-- SWIZZLE_CONVERT(uint16_t, uint8_t, src)
-- }
-- break;
-- case GL_BYTE:
-- if (normalized) {
-- SWIZZLE_CONVERT(uint16_t, int8_t, snorm_to_unorm(src, 8, 16))
-- } else {
-- SWIZZLE_CONVERT(uint16_t, int8_t, (src < 0) ? 0 : src)
-- }
-- break;
-- case GL_UNSIGNED_SHORT:
-- SWIZZLE_CONVERT(uint16_t, uint16_t, src)
-- break;
-- case GL_SHORT:
-- if (normalized) {
-- SWIZZLE_CONVERT(uint16_t, int16_t, snorm_to_unorm(src, 16, 16))
-- } else {
-- SWIZZLE_CONVERT(uint16_t, int16_t, (src < 0) ? 0 : src)
-- }
-- break;
-- case GL_UNSIGNED_INT:
-- if (normalized) {
-- SWIZZLE_CONVERT(uint16_t, uint32_t, unorm_to_unorm(src, 32, 16))
-- } else {
-- SWIZZLE_CONVERT(uint16_t, uint32_t, src)
-- }
-- break;
-- case GL_INT:
-- if (normalized) {
-- SWIZZLE_CONVERT(uint16_t, int32_t, snorm_to_unorm(src, 32, 16))
-- } else {
-- SWIZZLE_CONVERT(uint16_t, int32_t, (src < 0) ? 0 : src)
-- }
-- break;
-- default:
-- assert(!"Invalid channel type combination");
-- }
-- }
-- break;
-+ convert_ushort(void_dst, num_dst_channels, void_src, src_type,
-+ num_src_channels, swizzle, normalized, count);
-+ break;
- case GL_SHORT:
-- {
-- const int16_t one = normalized ? INT16_MAX : 1;
-- switch (src_type) {
-- case GL_FLOAT:
-- if (normalized) {
-- SWIZZLE_CONVERT(uint16_t, float, float_to_snorm(src, 16))
-- } else {
-- SWIZZLE_CONVERT(uint16_t, float, src)
-- }
-- break;
-- case GL_HALF_FLOAT:
-- if (normalized) {
-- SWIZZLE_CONVERT(uint16_t, uint16_t, half_to_snorm(src, 16))
-- } else {
-- SWIZZLE_CONVERT(uint16_t, uint16_t, _mesa_half_to_float(src))
-- }
-- break;
-- case GL_UNSIGNED_BYTE:
-- if (normalized) {
-- SWIZZLE_CONVERT(int16_t, uint8_t, unorm_to_snorm(src, 8, 16))
-- } else {
-- SWIZZLE_CONVERT(int16_t, uint8_t, src)
-- }
-- break;
-- case GL_BYTE:
-- if (normalized) {
-- SWIZZLE_CONVERT(int16_t, int8_t, snorm_to_snorm(src, 8, 16))
-- } else {
-- SWIZZLE_CONVERT(int16_t, int8_t, src)
-- }
-- break;
-- case GL_UNSIGNED_SHORT:
-- if (normalized) {
-- SWIZZLE_CONVERT(int16_t, uint16_t, unorm_to_snorm(src, 16, 16))
-- } else {
-- SWIZZLE_CONVERT(int16_t, uint16_t, src)
-- }
-- break;
-- case GL_SHORT:
-- SWIZZLE_CONVERT(int16_t, int16_t, src)
-- break;
-- case GL_UNSIGNED_INT:
-- if (normalized) {
-- SWIZZLE_CONVERT(int16_t, uint32_t, unorm_to_snorm(src, 32, 16))
-- } else {
-- SWIZZLE_CONVERT(int16_t, uint32_t, src)
-- }
-- break;
-- case GL_INT:
-- if (normalized) {
-- SWIZZLE_CONVERT(int16_t, int32_t, snorm_to_snorm(src, 32, 16))
-- } else {
-- SWIZZLE_CONVERT(int16_t, int32_t, src)
-- }
-- break;
-- default:
-- assert(!"Invalid channel type combination");
-- }
-- }
-- break;
-+ convert_short(void_dst, num_dst_channels, void_src, src_type,
-+ num_src_channels, swizzle, normalized, count);
-+ break;
- case GL_UNSIGNED_INT:
-- {
-- const uint32_t one = normalized ? UINT32_MAX : 1;
-- switch (src_type) { case GL_FLOAT:
-- if (normalized) {
-- SWIZZLE_CONVERT(uint32_t, float, float_to_unorm(src, 32))
-- } else {
-- SWIZZLE_CONVERT(uint32_t, float, (src < 0) ? 0 : src)
-- }
-- break;
-- case GL_HALF_FLOAT:
-- if (normalized) {
-- SWIZZLE_CONVERT(uint32_t, uint16_t, half_to_unorm(src, 32))
-- } else {
-- SWIZZLE_CONVERT(uint32_t, uint16_t, half_to_uint(src))
-- }
-- break;
-- case GL_UNSIGNED_BYTE:
-- if (normalized) {
-- SWIZZLE_CONVERT(uint32_t, uint8_t, unorm_to_unorm(src, 8, 32))
-- } else {
-- SWIZZLE_CONVERT(uint32_t, uint8_t, src)
-- }
-- break;
-- case GL_BYTE:
-- if (normalized) {
-- SWIZZLE_CONVERT(uint32_t, int8_t, snorm_to_unorm(src, 8, 32))
-- } else {
-- SWIZZLE_CONVERT(uint32_t, int8_t, (src < 0) ? 0 : src)
-- }
-- break;
-- case GL_UNSIGNED_SHORT:
-- if (normalized) {
-- SWIZZLE_CONVERT(uint32_t, uint16_t, unorm_to_unorm(src, 16, 32))
-- } else {
-- SWIZZLE_CONVERT(uint32_t, uint16_t, src)
-- }
-- break;
-- case GL_SHORT:
-- if (normalized) {
-- SWIZZLE_CONVERT(uint32_t, int16_t, snorm_to_unorm(src, 16, 32))
-- } else {
-- SWIZZLE_CONVERT(uint32_t, int16_t, (src < 0) ? 0 : src)
-- }
-- break;
-- case GL_UNSIGNED_INT:
-- SWIZZLE_CONVERT(uint32_t, uint32_t, src)
-- break;
-- case GL_INT:
-- if (normalized) {
-- SWIZZLE_CONVERT(uint32_t, int32_t, snorm_to_unorm(src, 32, 32))
-- } else {
-- SWIZZLE_CONVERT(uint32_t, int32_t, (src < 0) ? 0 : src)
-- }
-- break;
-- default:
-- assert(!"Invalid channel type combination");
-- }
-- }
-- break;
-+ convert_uint(void_dst, num_dst_channels, void_src, src_type,
-+ num_src_channels, swizzle, normalized, count);
-+ break;
- case GL_INT:
-- {
-- const int32_t one = normalized ? INT32_MAX : 1;
-- switch (src_type) {
-- case GL_FLOAT:
-- if (normalized) {
-- SWIZZLE_CONVERT(uint32_t, float, float_to_snorm(src, 32))
-- } else {
-- SWIZZLE_CONVERT(uint32_t, float, src)
-- }
-- break;
-- case GL_HALF_FLOAT:
-- if (normalized) {
-- SWIZZLE_CONVERT(uint32_t, uint16_t, half_to_snorm(src, 32))
-- } else {
-- SWIZZLE_CONVERT(uint32_t, uint16_t, _mesa_half_to_float(src))
-- }
-- break;
-- case GL_UNSIGNED_BYTE:
-- if (normalized) {
-- SWIZZLE_CONVERT(int32_t, uint8_t, unorm_to_snorm(src, 8, 32))
-- } else {
-- SWIZZLE_CONVERT(int32_t, uint8_t, src)
-- }
-- break;
-- case GL_BYTE:
-- if (normalized) {
-- SWIZZLE_CONVERT(int32_t, int8_t, snorm_to_snorm(src, 8, 32))
-- } else {
-- SWIZZLE_CONVERT(int32_t, int8_t, src)
-- }
-- break;
-- case GL_UNSIGNED_SHORT:
-- if (normalized) {
-- SWIZZLE_CONVERT(int32_t, uint16_t, unorm_to_snorm(src, 16, 32))
-- } else {
-- SWIZZLE_CONVERT(int32_t, uint16_t, src)
-- }
-- break;
-- case GL_SHORT:
-- if (normalized) {
-- SWIZZLE_CONVERT(int32_t, int16_t, snorm_to_snorm(src, 16, 32))
-- } else {
-- SWIZZLE_CONVERT(int32_t, int16_t, src)
-- }
-- break;
-- case GL_UNSIGNED_INT:
-- if (normalized) {
-- SWIZZLE_CONVERT(int32_t, uint32_t, unorm_to_snorm(src, 32, 32))
-- } else {
-- SWIZZLE_CONVERT(int32_t, uint32_t, src)
-- }
-- break;
-- case GL_INT:
-- SWIZZLE_CONVERT(int32_t, int32_t, src)
-- break;
-- default:
-- assert(!"Invalid channel type combination");
-- }
-- }
-- break;
-+ convert_int(void_dst, num_dst_channels, void_src, src_type,
-+ num_src_channels, swizzle, normalized, count);
-+ break;
- default:
- assert(!"Invalid channel type");
- }
---
-2.0.5
-
diff --git a/media-libs/mesa/files/mesa-10.5.1-fstat-include.patch b/media-libs/mesa/files/mesa-10.5.1-fstat-include.patch
deleted file mode 100644
index 212d00db87cc..000000000000
--- a/media-libs/mesa/files/mesa-10.5.1-fstat-include.patch
+++ /dev/null
@@ -1,37 +0,0 @@
-From 771cd266b9d00bdcf2cf7acaa3c8363c358d7478 Mon Sep 17 00:00:00 2001
-From: Emil Velikov <emil.l.velikov@gmail.com>
-Date: Wed, 11 Mar 2015 19:12:35 +0000
-Subject: loader: include <sys/stat.h> for non-sysfs builds
-
-Required by fstat(), otherwise we'll error out due to implicit function
-declaration.
-
-Cc: "10.4 10.5" <mesa-stable@lists.freedesktop.org>
-Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=89530
-Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
-Reported-by: Vadim Rutkovsky <vrutkovs@redhat.com>
-Tested-by: Vadim Rutkovsky <vrutkovs@redhat.com>
-
-diff --git a/src/loader/loader.c b/src/loader/loader.c
-index 9ff5115..17bf133 100644
---- a/src/loader/loader.c
-+++ b/src/loader/loader.c
-@@ -64,6 +64,7 @@
- * Rob Clark <robclark@freedesktop.org>
- */
-
-+#include <sys/stat.h>
- #include <stdarg.h>
- #include <stdio.h>
- #include <string.h>
-@@ -80,7 +81,6 @@
- #endif
- #endif
- #ifdef HAVE_SYSFS
--#include <sys/stat.h>
- #include <sys/types.h>
- #endif
- #include "loader.h"
---
-cgit v0.10.2
-