Compare commits

...

No commits in common. "devel" and "devel" have entirely different histories.
devel ... devel

30 changed files with 75 additions and 715 deletions

View File

@ -1,82 +0,0 @@
From 917e7e7df07b4523f1160e2a32d5e3ece3d74287 Mon Sep 17 00:00:00 2001
From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Date: Mon, 4 Nov 2024 17:45:45 +1100
Subject: [PATCH] dril: Fixup order of pixel formats in drilConfigs
Having the RGB* formats before the BGR* formats in the table causes
problems where under some circumstances, some applications end up
with the wrong colors.
The repro case for me is: Xvnc + mutter + chromium
There was an existing comment in dri_fill_in_modes() which explained
the problem. This was lost when dril_target.c was created.
Fixes: ec7afd2c24c ("dril: rework config creation")
Fixes: 3de62b2f9a6 ("gallium/dril: Compatibility stub for the legacy DRI loader interface")
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
---
src/gallium/targets/dril/dril_target.c | 36 +++++++++++++++++++-------
1 file changed, 27 insertions(+), 9 deletions(-)
diff --git a/src/gallium/targets/dril/dril_target.c b/src/gallium/targets/dril/dril_target.c
index 672d50a4182..583728e4093 100644
--- a/src/gallium/targets/dril/dril_target.c
+++ b/src/gallium/targets/dril/dril_target.c
@@ -47,25 +47,43 @@
CONFIG_ZS(color, PIPE_FORMAT_Z16_UNORM), \
CONFIG_ZS(color, PIPE_FORMAT_NONE) \
+/*
+ * (copy of a comment in dri_screen.c:dri_fill_in_modes())
+ *
+ * The 32-bit RGBA format must not precede the 32-bit BGRA format.
+ * Likewise for RGBX and BGRX. Otherwise, the GLX client and the GLX
+ * server may disagree on which format the GLXFBConfig represents,
+ * resulting in swapped color channels.
+ *
+ * The problem, as of 2017-05-30:
+ * When matching a GLXFBConfig to a __DRIconfig, GLX ignores the channel
+ * order and chooses the first __DRIconfig with the expected channel
+ * sizes. Specifically, GLX compares the GLXFBConfig's and __DRIconfig's
+ * __DRI_ATTRIB_{CHANNEL}_SIZE but ignores __DRI_ATTRIB_{CHANNEL}_MASK.
+ *
+ * EGL does not suffer from this problem. It correctly compares the
+ * channel masks when matching EGLConfig to __DRIconfig.
+ */
+
static const struct gl_config drilConfigs[] = {
- CONFIG(PIPE_FORMAT_R8G8B8A8_UNORM),
- CONFIG(PIPE_FORMAT_R8G8B8X8_UNORM),
CONFIG(PIPE_FORMAT_B8G8R8A8_UNORM),
CONFIG(PIPE_FORMAT_B8G8R8X8_UNORM),
- CONFIG(PIPE_FORMAT_R10G10B10A2_UNORM),
- CONFIG(PIPE_FORMAT_R10G10B10X2_UNORM),
+ CONFIG(PIPE_FORMAT_R8G8B8A8_UNORM),
+ CONFIG(PIPE_FORMAT_R8G8B8X8_UNORM),
CONFIG(PIPE_FORMAT_B10G10R10A2_UNORM),
CONFIG(PIPE_FORMAT_B10G10R10X2_UNORM),
- CONFIG(PIPE_FORMAT_R5G6B5_UNORM),
- CONFIG(PIPE_FORMAT_R5G5B5A1_UNORM),
- CONFIG(PIPE_FORMAT_R5G5B5X1_UNORM),
- CONFIG(PIPE_FORMAT_R4G4B4A4_UNORM),
- CONFIG(PIPE_FORMAT_R4G4B4X4_UNORM),
+ CONFIG(PIPE_FORMAT_R10G10B10A2_UNORM),
+ CONFIG(PIPE_FORMAT_R10G10B10X2_UNORM),
CONFIG(PIPE_FORMAT_B5G6R5_UNORM),
CONFIG(PIPE_FORMAT_B5G5R5A1_UNORM),
CONFIG(PIPE_FORMAT_B5G5R5X1_UNORM),
CONFIG(PIPE_FORMAT_B4G4R4A4_UNORM),
CONFIG(PIPE_FORMAT_B4G4R4X4_UNORM),
+ CONFIG(PIPE_FORMAT_R5G6B5_UNORM),
+ CONFIG(PIPE_FORMAT_R5G5B5A1_UNORM),
+ CONFIG(PIPE_FORMAT_R5G5B5X1_UNORM),
+ CONFIG(PIPE_FORMAT_R4G4B4A4_UNORM),
+ CONFIG(PIPE_FORMAT_R4G4B4X4_UNORM),
};
#define RGB UTIL_FORMAT_COLORSPACE_RGB
--
2.43.0

View File

@ -1,231 +1,3 @@
-------------------------------------------------------------------
Wed Nov 27 23:10:50 UTC 2024 - Stefan Dirsch <sndirsch@suse.com>
- trying to make buildservice happy by adding both tarballs to
specfile ...
-------------------------------------------------------------------
Tue Nov 26 18:20:06 UTC 2024 - Stefan Dirsch <sndirsch@suse.com>
- on s390x build Mesa 24.1.7 to fix colors with Xvnc (boo#1233167)
- adjusted patches for Mesa 24.1.7:
* python36-buildfix1-s390x.patch
* u_dep_xcb-s390x.patch
* u_mesa-CVE-2023-45913-s390x.patch
-------------------------------------------------------------------
Fri Nov 22 10:35:29 UTC 2024 - Marcus Rueckert <mrueckert@suse.de>
- Update to release 24.3.0
--> https://docs.mesa3d.org/relnotes/24.3.0
-------------------------------------------------------------------
Thu Nov 21 05:09:35 UTC 2024 - Marcus Rueckert <mrueckert@suse.de>
- Update to release 24.3.0~rc2
--> https://www.phoronix.com/news/Mesa-24.3-rc2
- Update to release 24.3.0~rc1
--> https://www.phoronix.com/news/Mesa-24.3-rc1-Released
- refreshed patches:
* n_drirc-disable-rgb10-for-chromium-on-amd.patch
* python36-buildfix1.patch
* python36-buildfix2.patch
* tlsdesc_test.patch
* u_mesa-CVE-2023-45913.patch
* u_mesa-CVE-2023-45919.patch
* u_mesa-CVE-2023-45922.patch
* u_dep_xcb.patch
- drop no longer supported options:
* -Ddri3=enabled
* -Ddri-search-path=%{_libdir}/dri
- new files added in this update currently packaged as part of
Mesa-dri:
* %{_libdir}/gbm/dri_gbm.so
-------------------------------------------------------------------
Tue Nov 19 12:48:59 UTC 2024 - Stefan Dirsch <sndirsch@suse.com>
- Update to release 24.2.7
--> https://docs.mesa3d.org/relnotes/24.2.7
- supersedes 0001-dril-Fixup-order-of-pixel-formats-in-drilConfigs.patch
-------------------------------------------------------------------
Wed Nov 6 17:34:15 UTC 2024 - Stefan Dirsch <sndirsch@suse.com>
- 0001-dril-Fixup-order-of-pixel-formats-in-drilConfigs.patch
* fixes colors for 'swrast' driver (boo#1230637, gitlab issue#11840)
-------------------------------------------------------------------
Thu Oct 31 19:35:20 UTC 2024 - Marcus Rueckert <mrueckert@suse.de>
- Update to release 24.2.6
--> https://docs.mesa3d.org/relnotes/24.2.6
-------------------------------------------------------------------
Thu Oct 31 19:15:10 UTC 2024 - Stefan Dirsch <sndirsch@suse.com>
- added -32bit package for Mesa-libva since it's needed by Steam;
reported on packman ML:
https://lists.links2linux.de/pipermail/packman/2024-October/017985.html
-------------------------------------------------------------------
Fri Oct 18 11:00:17 UTC 2024 - Andreas Färber <afaerber@suse.de>
- Enable intel Vulkan backends on riscv64 (boo#1231756)
- Enable iris Gallium backend on riscv64, Power and on Arm, too
-------------------------------------------------------------------
Thu Oct 17 10:16:01 UTC 2024 - Marcus Rueckert <mrueckert@suse.de>
- Update to release 24.2.5
--> https://docs.mesa3d.org/relnotes/24.2.5
- drop u_fix-llvm19-build.patch
included in upstream
-------------------------------------------------------------------
Thu Oct 3 19:00:29 UTC 2024 - Marcus Rueckert <mrueckert@suse.de>
- Update to release 24.2.4
--> https://docs.mesa3d.org/relnotes/24.2.4
-------------------------------------------------------------------
Tue Oct 1 11:08:36 UTC 2024 - Stefan Dirsch <sndirsch@suse.com>
- u_mesa-CVE-2023-45913.patch
* NULL pointer dereference via dri2GetGlxDrawableFromXDrawableId()
(CVE-2023-45913, bsc#1222040)
- u_mesa-CVE-2023-45919.patch
* buffer over-read in glXQueryServerString()
(CVE-2023-45919, bsc#1222041)
- u_mesa-CVE-2023-45922.patch
* segmentation violation in __glXGetDrawableAttribute()
(CVE-2023-45922, bsc#1222042)
-------------------------------------------------------------------
Mon Sep 23 16:56:40 UTC 2024 - Marcus Rueckert <mrueckert@suse.de>
- libvdpau_gallium was linked directly into libgallium-*.so.*.
Drop the subpackage and provides/obsolete it via Mesa-dri which
ships libgallium-*.so.*.
-------------------------------------------------------------------
Mon Sep 23 16:37:33 UTC 2024 - Marcus Rueckert <mrueckert@suse.de>
- drop u_fix_rust_bindgen.patch
included in update
-------------------------------------------------------------------
Mon Sep 23 16:32:05 UTC 2024 - Marcus Rueckert <mrueckert@suse.de>
- Update to release 24.2.3
--> https://docs.mesa3d.org/relnotes/24.2.3
-------------------------------------------------------------------
Mon Sep 23 10:58:19 UTC 2024 - Stefan Dirsch <sndirsch@suse.com>
- disable build of rusticl on sle15; meson is just too old ...
-------------------------------------------------------------------
Mon Sep 23 10:51:31 UTC 2024 - Stefan Dirsch <sndirsch@suse.com>
- buildrequires: rusticl needs mesa >= 1.4.0
-------------------------------------------------------------------
Mon Sep 23 10:40:35 UTC 2024 - Stefan Dirsch <sndirsch@suse.com>
- tlsdesc_test.patch: disable LTO in tlsdesc_test to suppress TLS
relaxation (patch by Andreas Schwab <schwab@suse.de>); see also
https://gitlab.freedesktop.org/mesa/mesa/-/issues/11929
-------------------------------------------------------------------
Mon Sep 23 10:36:35 UTC 2024 - Stefan Dirsch <sndirsch@suse.com>
- buildrequire llvm19-devel/clang19-devel on sle15-sp7
-------------------------------------------------------------------
Sun Sep 22 12:02:17 UTC 2024 - Aaron Puchert <aaronpuchert@alice-dsl.net>
- Add u_fix-llvm19-build.patch to fix build with LLVM 19 on ARM.
- Update minimum version requirements based on meson.build.
- Fix build on s390x: apparently we don't have libvdpau_gallium.so.
-------------------------------------------------------------------
Fri Sep 13 17:39:59 UTC 2024 - Marcus Rueckert <mrueckert@suse.de>
- drop U_egl-x11-sw-fix-partial-image-uploads.patch:
the code in the function saw further fixes later on in the 24.2
branch.
-------------------------------------------------------------------
Fri Sep 13 15:42:12 UTC 2024 - Stefan Dirsch <sndirsch@suse.com>
- U_egl-x11-sw-fix-partial-image-uploads.patch
* culprit for the regression in 24.1.4; reverse apply this for
now (boo#1228164)
-------------------------------------------------------------------
Tue Sep 10 14:35:00 UTC 2024 - Stefan Dirsch <sndirsch@suse.com>
- integrated changes by Andreas Schwab <schwab@suse.de>
* enable glamor also for driver build
* update rust crates
+ syn 2.0.39
+ proc_macro2 1.0.86
* enable valgrind also on riscv64
* added libvdpau_gallium package for generic VDPAU state tracker
* switch from "swrast" to "softpipe,llvmpipe" drivers
* use "-Dllvm-orcjit=true" for riscv64 build
* added libgallium to Mesa-dri package
-------------------------------------------------------------------
Tue Sep 10 13:38:59 UTC 2024 - Stefan Dirsch <sndirsch@suse.com>
- re-disable llvm for non-driver build by switching from "swrast"
to "softpipe" for gallium drivers in that case
- make previous changelog a bit nicer
-------------------------------------------------------------------
Sun Sep 8 17:39:10 UTC 2024 - Marcus Rueckert <mrueckert@suse.de>
- Update to release 24.2.2
--> https://docs.mesa3d.org/relnotes/24.2.2
--> https://docs.mesa3d.org/relnotes/24.2.1
--> https://docs.mesa3d.org/relnotes/24.2.0
- refreshed the following patches with quilt:
* U_fix-mpeg1_2-decode-mesa-20.2.patch
* n_add-Mesa-headers-again.patch
* n_stop-iris-flicker.patch
* u_dep_xcb.patch
* u_fix_rust_bindgen.patch
- dropped U_radeonsi-vcn-Add-decode-DPB-buffers-as-CS-dependency.patch
- New BuildRequires:
* python3-PyYAML
- enable llvm also for non-driver build to fix:
"llvmpipe requires LLVM and is enabled, but LLVM is disabled".
-------------------------------------------------------------------
Thu Sep 5 19:20:59 UTC 2024 - Bjørn Lie <bjorn.lie@gmail.com>
- Update to bugfix release 24.1.7
--> https://docs.mesa3d.org/relnotes/24.1.7
- Supersedes the following patch:
* U_radeonsi-vcn-Add-decode-DPB-buffers-as-CS-dependency.patch
- Rebase patches with quilt.
-------------------------------------------------------------------
Sun Aug 25 09:04:57 UTC 2024 - Stefan Dirsch <sndirsch@suse.com>
- Fix random GPU crash with AMDGPU (bsc#1229050):
U_radeonsi-vcn-Add-decode-DPB-buffers-as-CS-dependency.patch
(credits go to Takashi Iwai!)
-------------------------------------------------------------------
Wed Aug 21 16:53:28 UTC 2024 - Andreas Stieger <andreas.stieger@gmx.de>
- fix build with current rust-bindgen
* u_fix_rust_bindgen.patch
-------------------------------------------------------------------
Thu Jul 4 12:26:06 UTC 2024 - Stefan Dirsch <sndirsch@suse.com>

121
Mesa.spec
View File

@ -1,5 +1,5 @@
#
# spec file
# spec file for package Mesa
#
# Copyright (c) 2024 SUSE LLC
#
@ -42,11 +42,7 @@
%define glamor 1
%define _name_archive mesa
%ifnarch s390x
%define _version 24.3.0
%else
%define _version 24.1.7
%endif
%define _version 24.1.3
%define with_opencl 0
%define with_rusticl 0
%define with_vulkan 0
@ -96,7 +92,7 @@
%endif
%ifarch riscv64
%define with_vulkan 1
%define vulkan_drivers swrast,amd,intel,intel_hasvk
%define vulkan_drivers swrast,amd
%endif
%endif
@ -111,8 +107,8 @@
%endif
%if "%{flavor}" == "drivers"
%define glamor 1
%if 0%{?suse_version} >= 1550 && 0%{with_opencl}
%define glamor 0
%if ((0%{?suse_version} >= 1550) || (0%{?sle_version} >= 150600)) && 0%{with_opencl}
%define with_rusticl 1
%endif
%else
@ -143,17 +139,13 @@
# NVK aka Vulkan Nouveau dependencies
%global _unicode_ident_crate_ver 1.0.12
%global _syn_crate_ver 2.0.68
%global _syn_crate_ver 2.0.39
%global _quote_crate_ver 1.0.33
%global _proc_macro2_ver 1.0.86
%global _proc_macro2_ver 1.0.70
%global _paste_crate_ver 1.0.14
Name: Mesa%{psuffix}
%ifnarch s390x
Version: 24.3.0
%else
Version: 24.1.7
%endif
Version: 24.1.3
Release: 0
Summary: System for rendering 3-D graphics
License: MIT
@ -181,37 +173,18 @@ Source9: manual-pages.tar.bz2
Source10: Mesa-rpmlintrc
Source11: Mesa.keyring
Source12: README-suse-maintenance.md
Source20: https://archive.mesa3d.org/%{_name_archive}-24.3.0.tar.xz
Source21: https://archive.mesa3d.org/%{_name_archive}-24.3.0.tar.xz.sig
Patch2: n_add-Mesa-headers-again.patch
Patch11: u_0001-intel-genxml-Drop-from-__future__-import-annotations.patch
Patch12: u_0002-intel-genxml-Add-a-untyped-OrderedDict-fallback-for-.patch
%ifnarch s390x
Patch13: python36-buildfix1.patch
%else
Patch13: python36-buildfix1-s390x.patch
%endif
Patch14: python36-buildfix2.patch
Patch17: tlsdesc_test.patch
# never to be upstreamed
Patch54: n_drirc-disable-rgb10-for-chromium-on-amd.patch
Patch58: u_dep_xcb.patch
Patch100: U_fix-mpeg1_2-decode-mesa-20.2.patch
Patch400: n_stop-iris-flicker.patch
%ifnarch s390x
Patch500: u_dep_xcb.patch
%else
Patch500: u_dep_xcb-s390x.patch
%endif
%ifnarch s390x
Patch1222040: u_mesa-CVE-2023-45913.patch
%else
Patch1222040: u_mesa-CVE-2023-45913-s390x.patch
%endif
Patch1222041: u_mesa-CVE-2023-45919.patch
Patch1222042: u_mesa-CVE-2023-45922.patch
%ifarch %{ix86} x86_64
BuildRequires: DirectX-Headers >= 1.613.0
BuildRequires: DirectX-Headers
%endif
BuildRequires: bison
BuildRequires: cmake
@ -226,11 +199,7 @@ BuildRequires: glslang-devel
BuildRequires: imake
BuildRequires: libtool
BuildRequires: memory-constraints
%if 0%{with_rusticl}
BuildRequires: meson >= 1.4.0
%else
BuildRequires: meson >= 1.1.0
%endif
BuildRequires: meson >= 0.60
BuildRequires: pkgconfig
BuildRequires: python3-base
# dataclasses is in standard library of python >= 3.7
@ -238,24 +207,23 @@ BuildRequires: python3-base
BuildRequires: python3-dataclasses
%endif
BuildRequires: python3-Mako
BuildRequires: python3-PyYAML
BuildRequires: python3-xml
BuildRequires: pkgconfig(dri2proto)
BuildRequires: pkgconfig(dri3proto)
BuildRequires: pkgconfig(expat)
BuildRequires: pkgconfig(glproto)
BuildRequires: pkgconfig(libdrm) >= 2.4.109
BuildRequires: pkgconfig(libdrm_amdgpu) >= 2.4.121
BuildRequires: pkgconfig(libdrm) >= 2.4.75
BuildRequires: pkgconfig(libdrm_amdgpu) >= 2.4.95
BuildRequires: pkgconfig(libdrm_nouveau) >= 2.4.66
BuildRequires: pkgconfig(libdrm_radeon) >= 2.4.71
BuildRequires: pkgconfig(libglvnd) >= 1.3.2
%ifarch aarch64 x86_64 ppc64le s390x riscv64
BuildRequires: pkgconfig(libglvnd) >= 0.1.0
%ifarch aarch64 x86_64 ppc64le s390x
BuildRequires: pkgconfig(valgrind)
%endif
BuildRequires: pkgconfig(libva)
BuildRequires: pkgconfig(presentproto)
%if "%{flavor}" == "drivers"
BuildRequires: pkgconfig(vdpau) >= 1.5
BuildRequires: pkgconfig(vdpau) >= 1.1
%ifarch %{ix86} x86_64
BuildRequires: pkgconfig(vulkan)
%endif
@ -297,7 +265,7 @@ BuildRequires: pkgconfig(libdrm_etnaviv) >= 2.4.89
BuildRequires: pkgconfig(libdrm_freedreno) >= 2.4.74
BuildRequires: pkgconfig(libelf)
%endif
%ifarch x86_64 %{ix86} aarch64 %{arm} riscv64
%ifarch x86_64 %{ix86} aarch64 %{arm}
BuildRequires: libelf-devel
BuildRequires: pkgconfig(libdrm_intel) >= 2.4.75
%else
@ -311,10 +279,10 @@ BuildRequires: pkgconfig(wayland-protocols) >= 1.8
BuildRequires: pkgconfig(wayland-server) >= 1.11
%if 0%{with_llvm}
%if 0%{?suse_version} >= 1550
BuildRequires: llvm-devel >= 15
BuildRequires: llvm-devel
%else
%if 0%{?sle_version} >= 150700
BuildRequires: llvm19-devel
%if 0%{?sle_version} >= 150500
BuildRequires: llvm18-devel
%endif
%endif
%endif
@ -323,8 +291,8 @@ BuildRequires: llvm19-devel
%if 0%{?suse_version} >= 1550
BuildRequires: clang-devel
%else
%if 0%{?sle_version} >= 150700
BuildRequires: clang19-devel
%if 0%{?sle_version} >= 150500
BuildRequires: clang18-devel
%endif
%endif
BuildRequires: libclc
@ -583,9 +551,6 @@ Group: System/Libraries
Requires: Mesa = %{version}
Requires: libvulkan1
Supplements: Mesa
# merged into libgallium in 24.2.3
Provides: libvdpau_gallium = %{version}-%{release}
Obsoletes: libvdpau_gallium < %{version}-%{release}
%description -n Mesa-dri
This package contains Mesa DRI drivers for 3D acceleration.
@ -865,17 +830,14 @@ cp %{SOURCE6} subprojects/packagecache/
%if 0%{?suse_version} < 1550
%patch -P 14 -p1
%endif
%patch -P 17 -p1
# no longer needed since gstreamer-plugins-vaapi 1.18.4
%if 0%{?suse_version} < 1550
%patch -P 54 -p1
%endif
%patch -P 58 -p1
%patch -P 100 -p1
%patch -P 400 -p1
%patch -P 500 -p1
%patch -P 1222040 -p1
%patch -P 1222041 -p1
%patch -P 1222042 -p1
# Remove requires to vulkan libs from baselibs.conf on platforms
# where vulkan build is disabled; ugly ...
%if 0%{?with_vulkan} == 0
@ -917,12 +879,13 @@ egl_platforms=x11,wayland
-Dvulkan-drivers= \
%endif
-Dxlib-lease=enabled \
-Dglvnd=enabled \
-Dglvnd=true \
-Dgles1=enabled \
-Dgles2=enabled \
-Degl=enabled \
-Dallow-kcmp=enabled \
-Dplatforms=$egl_platforms \
-Ddri3=enabled \
-Dshared-glapi=enabled \
%if 0%{?with_nine}
-Dgallium-nine=true \
@ -940,6 +903,7 @@ egl_platforms=x11,wayland
-Drust_std=2021 \
%endif
%endif
-Ddri-search-path=%{_libdir}/dri \
%if 0%{with_llvm}
-Dllvm=enabled \
-Dshared-llvm=enabled \
@ -961,31 +925,24 @@ egl_platforms=x11,wayland
-Dvulkan-drivers= \
%endif
%ifarch %{ix86} x86_64
-Dgallium-drivers=r300,r600,radeonsi,nouveau,softpipe,llvmpipe,svga,virgl,iris,crocus,i915,d3d12,zink \
-Dgallium-drivers=r300,r600,radeonsi,nouveau,swrast,svga,virgl,iris,crocus,i915,d3d12,zink \
-Dgallium-d3d12-video=enabled \
-Dgallium-d3d12-graphics=enabled \
%else
%ifarch %{arm} aarch64
-Dgallium-drivers=r300,r600,radeonsi,nouveau,softpipe,llvmpipe,virgl,iris,freedreno,vc4,etnaviv,lima,panfrost,v3d,svga,tegra,zink \
-Dgallium-drivers=r300,r600,radeonsi,nouveau,swrast,virgl,freedreno,vc4,etnaviv,lima,panfrost,v3d,svga,tegra,zink \
%else
%ifarch ppc64 ppc64le riscv64
-Dgallium-drivers=r300,r600,radeonsi,nouveau,softpipe,llvmpipe,virgl,iris,zink \
-Dgallium-drivers=r300,r600,radeonsi,nouveau,swrast,virgl,zink \
%else
-Dgallium-drivers=swrast \
%endif
%endif
%endif
%ifarch riscv64
-Dllvm-orcjit=true \
%endif
%else
%ifnarch s390x
-Dgallium-drivers=softpipe \
%else
-Dgallium-drivers=swrast \
%endif
%endif
%ifarch aarch64 x86_64 ppc64le s390x riscv64
%ifarch aarch64 x86_64 ppc64le s390x
-Dvalgrind=enabled \
%endif
-Db_ndebug=true \
@ -1048,18 +1005,14 @@ rm %{buildroot}/%{_libdir}/pkgconfig/dri.pc
# in KHR-devel
rm -rf %{buildroot}/%{_includedir}/KHR
# in libgbm-devel
rm -f %{buildroot}%{_includedir}/gbm.h
rm -f %{buildroot}%{_libdir}/libgbm.so*
rm -f %{buildroot}%{_libdir}/pkgconfig/gbm.pc
# workaround needed since Mesa 19.0.2
rm -f %{buildroot}/%{_libdir}/vdpau/libvdpau_gallium.so
%else
# package in Mesa-dri
rm -rf %{buildroot}/%{_datadir}/drirc.d
rm -f %{buildroot}/%{_libdir}/dri/*_dri.so
rm -f %{buildroot}%{_libdir}/libgallium-*.so
rm -rf %{buildroot}%{_libdir}/gbm/
rm -f %{buildroot}%{_libdir}/libGLES*
# glvnd needs a default provider for indirect rendering where it cannot
@ -1186,7 +1139,6 @@ echo "The \"Mesa\" package does not have the ability to render, but is supplemen
%{_includedir}/xa_*.h
%{_libdir}/libxatracker.so
%{_libdir}/pkgconfig/xatracker.pc
%endif
%if %{vdpau_nouveau}
@ -1248,11 +1200,6 @@ echo "The \"Mesa\" package does not have the ability to render, but is supplemen
%ifarch %{arm} aarch64
%exclude %{_libdir}/dri/vc4_dri.so
%endif
%ifnarch s390x
%{_libdir}/libgallium-%{_version}.so
%dir %{_libdir}/gbm/
%{_libdir}/gbm/dri_gbm.so
%endif
%if 0%{with_opencl}
# only built with opencl
@ -1332,7 +1279,7 @@ echo "The \"Mesa\" package does not have the ability to render, but is supplemen
%endif
%if 0%{with_vulkan}
%ifarch %{ix86} x86_64 aarch64 %{arm} riscv64
%ifarch %{ix86} x86_64 aarch64 %{arm}
%files -n libvulkan_intel
%dir %{_datadir}/vulkan
%dir %{_datadir}/vulkan/icd.d

View File

@ -1,52 +0,0 @@
From 5903c215ab5b4c5d3bb1c952c0c784b78a0412fc Mon Sep 17 00:00:00 2001
From: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Date: Tue, 13 Feb 2024 13:10:30 -0500
Subject: [PATCH] egl/x11/sw: fix partial image uploads
* swrast allocates images aligned to 64x64 tiles, which results in images
that are larger than the window. PutImage requests must be clamped on
the y-axis to avoid uploading/damaging out-of-bounds regions
* winsys coords are y-inverted
cc: mesa-stable
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29910>
(cherry picked from commit 6088a0bf51dd6bdfe39d9160a748bdde016f2c96)
---
.pick_status.json | 2 +-
src/egl/drivers/dri2/platform_x11.c | 5 +++++
2 files changed, 6 insertions(+), 1 deletion(-)
diff --git a/.pick_status.json b/.pick_status.json
index cc044e5e788..802f9799d23 100644
--- a/.pick_status.json
+++ b/.pick_status.json
@@ -164,7 +164,7 @@
"description": "egl/x11/sw: fix partial image uploads",
"nominated": true,
"nomination_type": 0,
- "resolution": 0,
+ "resolution": 1,
"main_sha": null,
"because_sha": null,
"notes": null
diff --git a/src/egl/drivers/dri2/platform_x11.c b/src/egl/drivers/dri2/platform_x11.c
index 97436a0254b..e0d9ddb343e 100644
--- a/src/egl/drivers/dri2/platform_x11.c
+++ b/src/egl/drivers/dri2/platform_x11.c
@@ -174,6 +174,11 @@ swrastPutImage(__DRIdrawable *draw, int op, int x, int y, int w, int h,
return;
}
+ /* clamp to drawable size */
+ if (y + h > dri2_surf->base.Height)
+ h = dri2_surf->base.Height - y;
+ /* y-invert */
+ y = dri2_surf->base.Height - y - h;
if (size < max_req_len) {
cookie = xcb_put_image(
dri2_dpy->conn, XCB_IMAGE_FORMAT_Z_PIXMAP, dri2_surf->drawable, gc, w,
--
2.43.0

View File

@ -3,11 +3,11 @@
src/gallium/drivers/r600/evergreen_state.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
Index: mesa-24.2.2/src/gallium/drivers/r600/evergreen_state.c
Index: mesa-23.3.0/src/gallium/drivers/r600/evergreen_state.c
===================================================================
--- mesa-24.2.2.orig/src/gallium/drivers/r600/evergreen_state.c
+++ mesa-24.2.2/src/gallium/drivers/r600/evergreen_state.c
@@ -584,7 +584,8 @@ static void *evergreen_create_sampler_st
--- mesa-23.3.0.orig/src/gallium/drivers/r600/evergreen_state.c
+++ mesa-23.3.0/src/gallium/drivers/r600/evergreen_state.c
@@ -598,7 +598,8 @@ static void *evergreen_create_sampler_st
: state->max_anisotropy;
unsigned max_aniso_ratio = r600_tex_aniso_filter(max_aniso);
bool trunc_coord = state->min_img_filter == PIPE_TEX_FILTER_NEAREST &&

View File

@ -1,31 +0,0 @@
From 8b35da91b23afc65256b78a59d116fd09544cd28 Mon Sep 17 00:00:00 2001
From: David Rosca <david.rosca@amd.com>
Date: Mon, 5 Aug 2024 09:14:37 +0200
Subject: [PATCH] radeonsi/vcn: Add decode DPB buffers as CS dependency
This is needed to ensure correct synchronization in kernel eg. when it
moves the buffers between VRAM and GTT.
Reviewed-by: Boyuan Zhang <Boyuan.Zhang@amd.com>
(cherry picked from commit 0c024bbe641b092bbbc751baae54a37642794de0)
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30537>
---
src/gallium/drivers/radeonsi/radeon_vcn_dec.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/src/gallium/drivers/radeonsi/radeon_vcn_dec.c b/src/gallium/drivers/radeonsi/radeon_vcn_dec.c
index ede5f9d7c1a5..9e3d0b88493b 100644
--- a/src/gallium/drivers/radeonsi/radeon_vcn_dec.c
+++ b/src/gallium/drivers/radeonsi/radeon_vcn_dec.c
@@ -1838,6 +1838,7 @@ static unsigned rvcn_dec_dynamic_dpb_t2_message(struct radeon_decoder *dec, rvcn
RVID_ERR("Ref list from application is incorrect, using dummy buffer instead.\n");
addr = dec->ws->buffer_get_virtual_address(dummy->dpb.res->buf);
}
+ dec->ws->cs_add_buffer(&dec->cs, d->dpb.res->buf, RADEON_USAGE_READWRITE | RADEON_USAGE_SYNCHRONIZED, RADEON_DOMAIN_VRAM);
dynamic_dpb_t2->dpbAddrLo[i] = addr;
dynamic_dpb_t2->dpbAddrHi[i] = addr >> 32;
++dynamic_dpb_t2->dpbArraySize;
--
2.43.0

View File

@ -107,4 +107,3 @@ Mesa-dri
supplements "Mesa-<targettype> = <version>"
Mesa-gallium
supplements "Mesa-<targettype> = <version>"
Mesa-libva

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:ecd2e7b1c73998f4103542f39c6b8c968d251637ccc8caa42641aecb86cd2566
size 29206724

Binary file not shown.

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:2b68c4a6f204c1999815a457299f81c41ba7bf48c4674b0b2d1d8864f41f3709
size 29568568

Binary file not shown.

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:a0ce37228679647268a83b3652d859dcf23d6f6430d751489d4464f6de6459fd
size 29589968

Binary file not shown.

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:97813fe65028ef21b4d4e54164563059e8408d8fee3489a2323468d198bf2efc
size 30566304

Binary file not shown.

View File

@ -1,8 +1,8 @@
Index: mesa-24.2.2/include/meson.build
Index: mesa-24.0.3/include/meson.build
===================================================================
--- mesa-24.2.2.orig/include/meson.build
+++ mesa-24.2.2/include/meson.build
@@ -12,7 +12,6 @@ if with_android_stub
--- mesa-24.0.3.orig/include/meson.build
+++ mesa-24.0.3/include/meson.build
@@ -28,7 +28,6 @@ if with_android_stub
inc_include += [include_directories('android_stub')]
endif
@ -10,7 +10,7 @@ Index: mesa-24.2.2/include/meson.build
if with_gles1 or with_gles2 or with_opengl or with_egl
install_headers('KHR/khrplatform.h', subdir : 'KHR')
endif
@@ -68,7 +67,6 @@ if not with_glvnd and host_machine.syste
@@ -84,7 +83,6 @@ if not with_glvnd and host_machine.syste
subdir : 'EGL',
)
endif

View File

@ -1,8 +1,8 @@
Index: mesa-24.3.0-rc1/src/util/00-mesa-defaults.conf
Index: mesa-23.2.0-rc4/src/util/00-mesa-defaults.conf
===================================================================
--- mesa-24.3.0-rc1.orig/src/util/00-mesa-defaults.conf
+++ mesa-24.3.0-rc1/src/util/00-mesa-defaults.conf
@@ -1040,6 +1040,14 @@ TODO: document the other workarounds.
--- mesa-23.2.0-rc4.orig/src/util/00-mesa-defaults.conf
+++ mesa-23.2.0-rc4/src/util/00-mesa-defaults.conf
@@ -956,6 +956,14 @@ TODO: document the other workarounds.
<application name="Rocket League" executable="RocketLeague">
<option name="radeonsi_zerovram" value="true" />
</application>

View File

@ -4,11 +4,11 @@ Date: Tue May 24 14:47:53 2022 -0400
Adjusting 'iris_batch.c' per 'https://gitlab.freedesktop.org/mesa/mesa/-/issues/5731'.
Index: mesa-24.2.2/src/gallium/drivers/iris/i915/iris_kmd_backend.c
Index: mesa-24.1.0/src/gallium/drivers/iris/i915/iris_kmd_backend.c
===================================================================
--- mesa-24.2.2.orig/src/gallium/drivers/iris/i915/iris_kmd_backend.c
+++ mesa-24.2.2/src/gallium/drivers/iris/i915/iris_kmd_backend.c
@@ -318,7 +318,6 @@ i915_batch_submit(struct iris_batch *bat
--- mesa-24.1.0.orig/src/gallium/drivers/iris/i915/iris_kmd_backend.c
+++ mesa-24.1.0/src/gallium/drivers/iris/i915/iris_kmd_backend.c
@@ -317,7 +317,6 @@ i915_batch_submit(struct iris_batch *bat
uint32_t flags = EXEC_OBJECT_SUPPORTS_48B_ADDRESS | EXEC_OBJECT_PINNED;
flags |= bo->real.capture ? EXEC_OBJECT_CAPTURE : 0;
flags |= bo == batch->screen->workaround_bo ? EXEC_OBJECT_ASYNC : 0;

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:5e719e8df665df0d1c8fbfd238015744736151d4445ec0836b8e628aae103b77
size 48958

View File

@ -1,67 +0,0 @@
Index: mesa-24.1.7/src/nouveau/headers/class_parser.py
===================================================================
--- mesa-24.1.7.orig/src/nouveau/headers/class_parser.py
+++ mesa-24.1.7/src/nouveau/headers/class_parser.py
@@ -9,6 +9,16 @@ import sys
from mako.template import Template
+def removeprefix(s, prefix):
+ if s.startswith(prefix):
+ return s[len(prefix):]
+ return s
+
+def removesuffix(s, suffix):
+ if s.endswith(suffix):
+ return s[:-len(suffix)]
+ return s
+
METHOD_ARRAY_SIZES = {
'BIND_GROUP_CONSTANT_BUFFER' : 16,
'CALL_MME_DATA' : 256,
@@ -293,7 +303,7 @@ def parse_header(nvcl, f):
if ":" in list[2]:
state = 1
elif teststr in list[1]:
- curmthd.field_defs[curfield][list[1].removeprefix(teststr)] = list[2]
+ curmthd.field_defs[curfield][removeprefix(list[1], teststr)] = list[2]
else:
state = 1
@@ -303,7 +313,7 @@ def parse_header(nvcl, f):
if ("0x" in list[2]):
state = 1
else:
- field = list[1].removeprefix(teststr)
+ field = removeprefix(list[1], teststr)
bitfield = list[2].split(":")
curmthd.field_name_start[field] = bitfield[1]
curmthd.field_name_end[field] = bitfield[0]
@@ -324,13 +334,13 @@ def parse_header(nvcl, f):
is_array = 0
if (':' in list[2]):
continue
- name = list[1].removeprefix(teststr)
+ name = removeprefix(list[1], teststr)
if name.endswith("(i)"):
is_array = 1
- name = name.removesuffix("(i)")
+ name = removesuffix(name, "(i)")
if name.endswith("(j)"):
is_array = 1
- name = name.removesuffix("(j)")
+ name = removesuffix(name, "(j)")
x = method()
x.name = name
x.addr = list[2]
@@ -357,8 +367,8 @@ def main():
clheader = os.path.basename(args.in_h)
nvcl = clheader
- nvcl = nvcl.removeprefix("cl")
- nvcl = nvcl.removesuffix(".h")
+ nvcl = removeprefix(nvcl, "cl")
+ nvcl = removesuffix(nvcl, ".h")
nvcl = nvcl.upper()
nvcl = "NV" + nvcl

View File

@ -1,8 +1,8 @@
Index: mesa-24.3.0-rc1/src/nouveau/headers/class_parser.py
Index: mesa-24.1.0/src/nouveau/headers/class_parser.py
===================================================================
--- mesa-24.3.0-rc1.orig/src/nouveau/headers/class_parser.py
+++ mesa-24.3.0-rc1/src/nouveau/headers/class_parser.py
@@ -11,6 +11,16 @@ import subprocess
--- mesa-24.1.0.orig/src/nouveau/headers/class_parser.py
+++ mesa-24.1.0/src/nouveau/headers/class_parser.py
@@ -9,6 +9,16 @@ import sys
from mako.template import Template
@ -17,9 +17,9 @@ Index: mesa-24.3.0-rc1/src/nouveau/headers/class_parser.py
+ return s
+
METHOD_ARRAY_SIZES = {
'BIND_GROUP_CONSTANT_BUFFER' : 16,
'CALL_MME_DATA' : 256,
@@ -425,7 +435,7 @@ def parse_header(nvcl, f):
'BIND_GROUP_CONSTANT_BUFFER' : 16,
'CALL_MME_DATA' : 256,
@@ -293,7 +303,7 @@ def parse_header(nvcl, f):
if ":" in list[2]:
state = 1
elif teststr in list[1]:
@ -28,7 +28,7 @@ Index: mesa-24.3.0-rc1/src/nouveau/headers/class_parser.py
else:
state = 1
@@ -435,7 +445,7 @@ def parse_header(nvcl, f):
@@ -303,7 +313,7 @@ def parse_header(nvcl, f):
if ("0x" in list[2]):
state = 1
else:
@ -37,7 +37,7 @@ Index: mesa-24.3.0-rc1/src/nouveau/headers/class_parser.py
bitfield = list[2].split(":")
curmthd.field_name_start[field] = bitfield[1]
curmthd.field_name_end[field] = bitfield[0]
@@ -456,13 +466,13 @@ def parse_header(nvcl, f):
@@ -324,13 +334,13 @@ def parse_header(nvcl, f):
is_array = 0
if (':' in list[2]):
continue
@ -54,7 +54,7 @@ Index: mesa-24.3.0-rc1/src/nouveau/headers/class_parser.py
x = method()
x.name = name
x.addr = list[2]
@@ -552,8 +562,8 @@ def main():
@@ -357,8 +367,8 @@ def main():
clheader = os.path.basename(args.in_h)
nvcl = clheader

View File

@ -1,8 +1,6 @@
Index: mesa-24.3.0-rc1/src/freedreno/registers/gen_header.py
===================================================================
--- mesa-24.3.0-rc1.orig/src/freedreno/registers/gen_header.py
+++ mesa-24.3.0-rc1/src/freedreno/registers/gen_header.py
@@ -957,7 +957,7 @@ def main():
--- mesa-23.3.3/src/freedreno/registers/gen_header.py.orig 2024-01-20 14:01:30.261999839 +0100
+++ mesa-23.3.3/src/freedreno/registers/gen_header.py 2024-01-20 14:01:57.678558692 +0100
@@ -781,7 +781,7 @@ def main():
parser.add_argument('--rnn', type=str, required=True)
parser.add_argument('--xml', type=str, required=True)

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:901fa70d88b9d6c98022e23b4136f9f3e54e4662c3bc1bd1d84a42a9a0f0c1e9
size 265035

View File

@ -1,15 +0,0 @@
LTO defeats the -fpic workaround and enables TLS relaxation anyway
Index: mesa-24.3.0-rc1/meson.build
===================================================================
--- mesa-24.3.0-rc1.orig/meson.build
+++ mesa-24.3.0-rc1/meson.build
@@ -516,7 +516,7 @@ if not have_mtls_dialect
foreach tlsdesc_arg : ['-mtls-dialect=gnu2', '-mtls-dialect=desc']
# -fpic to force dynamic tls, otherwise TLS relaxation defeats check
tlsdesc_test = cc.run('int __thread x; int main() { return x; }',
- args: [tlsdesc_arg, '-fpic'],
+ args: [tlsdesc_arg, '-fpic', '-fno-lto'],
name: tlsdesc_arg)
if tlsdesc_test.returncode() == 0 and (
# check for lld 13 bug: https://gitlab.freedesktop.org/mesa/mesa/-/issues/5665

View File

@ -1,16 +0,0 @@
Index: mesa-24.2.2/meson.build
===================================================================
--- mesa-24.2.2.orig/meson.build
+++ mesa-24.2.2/meson.build
@@ -2145,9 +2145,11 @@ if with_platform_x11
endif
endif
if with_any_vk or with_egl or (with_glx == 'dri' and with_dri_platform == 'drm')
+ dep_x11_xcb = dependency('x11-xcb')
dep_xcb_dri2 = dependency('xcb-dri2', version : '>= 1.8')
if with_dri3
+ dep_xcb = dependency('xcb')
dep_xcb_dri3 = dependency('xcb-dri3')
dep_xcb_present = dependency('xcb-present')
# until xcb-dri3 has been around long enough to make a hard-dependency:

View File

@ -1,15 +1,16 @@
Index: mesa-24.3.0/meson.build
Index: mesa-24.0.3/meson.build
===================================================================
--- mesa-24.3.0.orig/meson.build
+++ mesa-24.3.0/meson.build
@@ -2103,8 +2103,10 @@ if with_platform_x11
--- mesa-24.0.3.orig/meson.build
+++ mesa-24.0.3/meson.build
@@ -2069,9 +2069,11 @@ if with_platform_x11
endif
endif
if with_dri_platform == 'drm'
if with_any_vk or with_egl or (with_glx == 'dri' and with_dri_platform == 'drm')
+ dep_x11_xcb = dependency('x11-xcb')
dep_xcb_dri2 = dependency('xcb-dri2', version : '>= 1.8', required : with_x11_dri2)
dep_xcb_dri2 = dependency('xcb-dri2', version : '>= 1.8')
+ dep_xcb = dependency('xcb')
dep_xcb_dri3 = dependency('xcb-dri3', version : '>= 1.13')
dep_xcb_present = dependency('xcb-present', version : '>= 1.13')
if (dep_xcb_dri3.version().version_compare('>= 1.17') and
if with_dri3
+ dep_xcb = dependency('xcb')
dep_xcb_dri3 = dependency('xcb-dri3')
dep_xcb_present = dependency('xcb-present')
# until xcb-dri3 has been around long enough to make a hard-dependency:

View File

@ -1,13 +0,0 @@
src/glx/dri2_glx.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/src/glx/dri2_glx.c
+++ b/src/glx/dri2_glx.c
@@ -1399,7 +1399,7 @@ dri2GetGlxDrawableFromXDrawableId(Displa
struct dri2_display *pdp = (struct dri2_display *) d->dri2Display;
__GLXDRIdrawable *pdraw;
- if (__glxHashLookup(pdp->dri2Hash, id, (void *) &pdraw) == 0)
+ if (pdp && __glxHashLookup(pdp->dri2Hash, id, (void *) &pdraw) == 0)
return pdraw;
return NULL;

View File

@ -1,15 +0,0 @@
src/glx/dri2_glx.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Index: mesa-24.3.0-rc1/src/glx/dri2_glx.c
===================================================================
--- mesa-24.3.0-rc1.orig/src/glx/dri2_glx.c
+++ mesa-24.3.0-rc1/src/glx/dri2_glx.c
@@ -756,7 +756,7 @@ dri2GetGlxDrawableFromXDrawableId(Displa
struct glx_display *d = __glXInitialize(dpy);
__GLXDRIdrawable *pdraw;
- if (__glxHashLookup(d->dri2Hash, id, (void *) &pdraw) == 0)
+ if (d && __glxHashLookup(d->dri2Hash, id, (void *) &pdraw) == 0)
return pdraw;
return NULL;

View File

@ -1,33 +0,0 @@
src/glx/glx_query.c | 13 +++++++++++++
1 file changed, 13 insertions(+)
Index: mesa-24.3.0-rc1/src/glx/glx_query.c
===================================================================
--- mesa-24.3.0-rc1.orig/src/glx/glx_query.c
+++ mesa-24.3.0-rc1/src/glx/glx_query.c
@@ -56,6 +56,13 @@ __glXQueryServerString(Display * dpy, CA
/* The spec doesn't mention this, but the Xorg server replies with
* a string already terminated with '\0'. */
uint32_t len = xcb_glx_query_server_string_string_length(reply);
+ /* Allow a max of 64kb string length */
+ size_t reply_len = strnlen(xcb_glx_query_server_string_string(reply), 64*1024);
+ if (reply_len + 1 != len)
+ {
+ free(reply);
+ return(NULL);
+ }
char *buf = malloc(len);
memcpy(buf, xcb_glx_query_server_string_string(reply), len);
free(reply);
@@ -83,6 +90,12 @@ __glXGetString(Display * dpy, CARD32 con
/* The spec doesn't mention this, but the Xorg server replies with
* a string already terminated with '\0'. */
uint32_t len = xcb_glx_get_string_string_length(reply);
+ size_t reply_len = strnlen(xcb_glx_get_string_string(reply), 64*1024);
+ if (reply_len + 1 != len)
+ {
+ free(reply);
+ return(NULL);
+ }
char *buf = malloc(len);
memcpy(buf, xcb_glx_get_string_string(reply), len);
free(reply);

View File

@ -1,15 +0,0 @@
src/glx/glx_pbuffer.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Index: mesa-24.3.0-rc1/src/glx/glx_pbuffer.c
===================================================================
--- mesa-24.3.0-rc1.orig/src/glx/glx_pbuffer.c
+++ mesa-24.3.0-rc1/src/glx/glx_pbuffer.c
@@ -338,7 +338,7 @@ __glXGetDrawableAttribute(Display * dpy,
/* Search the set of returned attributes for the attribute requested by
* the caller.
*/
- for (i = 0; i < num_attributes; i++) {
+ for (i = 0; i < num_attributes && i * 2 + 1 < length; i++) {
if (data[i * 2] == attribute) {
found = 1;
*value = data[(i * 2) + 1];