From d9207073025259e2a2f9ee462c081e2149a2e7fbfb1172e5ce1b22e1a559640b Mon Sep 17 00:00:00 2001 From: Stefan Dirsch Date: Tue, 20 Feb 2018 13:56:56 +0000 Subject: [PATCH 1/7] Accepting request 578358 from home:Andreas_Schwab:Factory - Mesa-gallium only exists if %{with_opencl} - Add support for riscv64 OBS-URL: https://build.opensuse.org/request/show/578358 OBS-URL: https://build.opensuse.org/package/show/X11:XOrg/Mesa?expand=0&rev=705 --- Mesa-drivers.changes | 6 ++++++ Mesa-drivers.spec | 16 ++++++++++++---- Mesa.changes | 6 ++++++ Mesa.spec | 16 ++++++++++++---- 4 files changed, 36 insertions(+), 8 deletions(-) diff --git a/Mesa-drivers.changes b/Mesa-drivers.changes index 3389b60..6d6c767 100644 --- a/Mesa-drivers.changes +++ b/Mesa-drivers.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Mon Feb 19 23:24:22 UTC 2018 - schwab@suse.de + +- Mesa-gallium only exists if %{with_opencl} +- Add support for riscv64 + ------------------------------------------------------------------- Fri Feb 16 14:59:04 UTC 2018 - mstaudt@suse.com diff --git a/Mesa-drivers.spec b/Mesa-drivers.spec index a6ed15c..f041d3f 100644 --- a/Mesa-drivers.spec +++ b/Mesa-drivers.spec @@ -82,6 +82,12 @@ %define with_llvm 1 %endif +%if 0%{with_opencl} +%define have_gallium 1 +%else +%define have_gallium 0 +%endif + %if %{drivers} %define glamor 0 %else @@ -241,7 +247,9 @@ Requires: libglvnd >= 0.1.0 # do not install recommends on their system still get working Mesa. It is # ignored in obs when Mesa is installed as build dependency. Requires: Mesa-dri = %{version} +%if 0%{have_gallium} Requires: Mesa-gallium = %{version} +%endif %description Mesa is a 3-D graphics library with an API which is very similar to @@ -465,8 +473,8 @@ applications using the OpenGL|ES 3.x APIs. %package -n libOSMesa8 Summary: Mesa Off-screen rendering extension -# Wrongly named package shipped .so.8 Group: System/Libraries +# Wrongly named package shipped .so.8 Obsoletes: libOSMesa9 < %{version} Provides: libOSMesa9 = %{version} @@ -600,9 +608,9 @@ implementation of Mesa. %package -n Mesa-libd3d Summary: Mesa Direct3D9 state tracker -# Manually provide d3d library (bnc#918294) Group: System/Libraries -%ifarch x86_64 s390x ppc64le aarch64 +# Manually provide d3d library (bnc#918294) +%ifarch x86_64 s390x ppc64le aarch64 riscv64 Provides: d3dadapter9.so.1()(64bit) %else Provides: d3dadapter9.so.1 @@ -845,7 +853,7 @@ export PYTHON2=/usr/bin/python3 --with-dri-drivers=nouveau \ --with-gallium-drivers=r300,r600,nouveau,swrast \ %endif - %ifarch ia64 ppc hppa s390 s390x + %ifarch ia64 ppc hppa s390 s390x riscv64 --with-dri-drivers=swrast \ --with-gallium-drivers=swrast \ %endif diff --git a/Mesa.changes b/Mesa.changes index 3389b60..6d6c767 100644 --- a/Mesa.changes +++ b/Mesa.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Mon Feb 19 23:24:22 UTC 2018 - schwab@suse.de + +- Mesa-gallium only exists if %{with_opencl} +- Add support for riscv64 + ------------------------------------------------------------------- Fri Feb 16 14:59:04 UTC 2018 - mstaudt@suse.com diff --git a/Mesa.spec b/Mesa.spec index 5341f9e..4d9a5df 100644 --- a/Mesa.spec +++ b/Mesa.spec @@ -81,6 +81,12 @@ %define with_llvm 1 %endif +%if 0%{with_opencl} +%define have_gallium 1 +%else +%define have_gallium 0 +%endif + %if %{drivers} %define glamor 0 %else @@ -240,7 +246,9 @@ Requires: libglvnd >= 0.1.0 # do not install recommends on their system still get working Mesa. It is # ignored in obs when Mesa is installed as build dependency. Requires: Mesa-dri = %{version} +%if 0%{have_gallium} Requires: Mesa-gallium = %{version} +%endif %description Mesa is a 3-D graphics library with an API which is very similar to @@ -464,8 +472,8 @@ applications using the OpenGL|ES 3.x APIs. %package -n libOSMesa8 Summary: Mesa Off-screen rendering extension -# Wrongly named package shipped .so.8 Group: System/Libraries +# Wrongly named package shipped .so.8 Obsoletes: libOSMesa9 < %{version} Provides: libOSMesa9 = %{version} @@ -599,9 +607,9 @@ implementation of Mesa. %package -n Mesa-libd3d Summary: Mesa Direct3D9 state tracker -# Manually provide d3d library (bnc#918294) Group: System/Libraries -%ifarch x86_64 s390x ppc64le aarch64 +# Manually provide d3d library (bnc#918294) +%ifarch x86_64 s390x ppc64le aarch64 riscv64 Provides: d3dadapter9.so.1()(64bit) %else Provides: d3dadapter9.so.1 @@ -844,7 +852,7 @@ export PYTHON2=/usr/bin/python3 --with-dri-drivers=nouveau \ --with-gallium-drivers=r300,r600,nouveau,swrast \ %endif - %ifarch ia64 ppc hppa s390 s390x + %ifarch ia64 ppc hppa s390 s390x riscv64 --with-dri-drivers=swrast \ --with-gallium-drivers=swrast \ %endif From 5d5a71476331a8d4e68c1070470b36f9548121e13693393de1fffd8f27a9f5f1 Mon Sep 17 00:00:00 2001 From: Stefan Dirsch Date: Fri, 23 Feb 2018 11:12:25 +0000 Subject: [PATCH 2/7] - removed n_Define-GLAPIVAR-separate-from-GLAPI.patch * bits moved to libGLw's n_Use-newly-introduced-GLAPIVAR-for-variables.patch (boo#1082297) OBS-URL: https://build.opensuse.org/package/show/X11:XOrg/Mesa?expand=0&rev=706 --- Mesa-drivers.changes | 7 ++++ Mesa-drivers.spec | 7 ++-- Mesa.changes | 7 ++++ Mesa.spec | 7 ++-- n_Define-GLAPIVAR-separate-from-GLAPI.patch | 40 --------------------- 5 files changed, 18 insertions(+), 50 deletions(-) delete mode 100644 n_Define-GLAPIVAR-separate-from-GLAPI.patch diff --git a/Mesa-drivers.changes b/Mesa-drivers.changes index 6d6c767..8839f8a 100644 --- a/Mesa-drivers.changes +++ b/Mesa-drivers.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Fri Feb 23 10:51:04 UTC 2018 - sndirsch@suse.com + +- removed n_Define-GLAPIVAR-separate-from-GLAPI.patch + * bits moved to libGLw's n_Use-newly-introduced-GLAPIVAR-for-variables.patch + (boo#1082297) + ------------------------------------------------------------------- Mon Feb 19 23:24:22 UTC 2018 - schwab@suse.de diff --git a/Mesa-drivers.spec b/Mesa-drivers.spec index f041d3f..472c564 100644 --- a/Mesa-drivers.spec +++ b/Mesa-drivers.spec @@ -140,8 +140,6 @@ Patch13: u_mesa-8.0.1-fix-16bpp.patch Patch15: u_mesa-8.0-llvmpipe-shmget.patch # never to be upstreamed Patch18: n_VDPAU-XVMC-libs-Replace-hardlinks-with-copies.patch -# never to be upstreamed -Patch21: n_Define-GLAPIVAR-separate-from-GLAPI.patch # currently needed for libglvnd support Patch31: archlinux_0001-Fix-linkage-against-shared-glapi.patch Patch32: archlinux_glvnd-fix-gl-dot-pc.patch @@ -473,8 +471,8 @@ applications using the OpenGL|ES 3.x APIs. %package -n libOSMesa8 Summary: Mesa Off-screen rendering extension -Group: System/Libraries # Wrongly named package shipped .so.8 +Group: System/Libraries Obsoletes: libOSMesa9 < %{version} Provides: libOSMesa9 = %{version} @@ -608,8 +606,8 @@ implementation of Mesa. %package -n Mesa-libd3d Summary: Mesa Direct3D9 state tracker -Group: System/Libraries # Manually provide d3d library (bnc#918294) +Group: System/Libraries %ifarch x86_64 s390x ppc64le aarch64 riscv64 Provides: d3dadapter9.so.1()(64bit) %else @@ -760,7 +758,6 @@ rm -rf docs/README.{VMS,WIN32,OS2} #%patch13 -p1 %patch12 -p1 %patch18 -p1 -%patch21 -p1 %if 0%{?libglvnd} %patch31 -p1 diff --git a/Mesa.changes b/Mesa.changes index 6d6c767..8839f8a 100644 --- a/Mesa.changes +++ b/Mesa.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Fri Feb 23 10:51:04 UTC 2018 - sndirsch@suse.com + +- removed n_Define-GLAPIVAR-separate-from-GLAPI.patch + * bits moved to libGLw's n_Use-newly-introduced-GLAPIVAR-for-variables.patch + (boo#1082297) + ------------------------------------------------------------------- Mon Feb 19 23:24:22 UTC 2018 - schwab@suse.de diff --git a/Mesa.spec b/Mesa.spec index 4d9a5df..31b0c99 100644 --- a/Mesa.spec +++ b/Mesa.spec @@ -139,8 +139,6 @@ Patch13: u_mesa-8.0.1-fix-16bpp.patch Patch15: u_mesa-8.0-llvmpipe-shmget.patch # never to be upstreamed Patch18: n_VDPAU-XVMC-libs-Replace-hardlinks-with-copies.patch -# never to be upstreamed -Patch21: n_Define-GLAPIVAR-separate-from-GLAPI.patch # currently needed for libglvnd support Patch31: archlinux_0001-Fix-linkage-against-shared-glapi.patch Patch32: archlinux_glvnd-fix-gl-dot-pc.patch @@ -472,8 +470,8 @@ applications using the OpenGL|ES 3.x APIs. %package -n libOSMesa8 Summary: Mesa Off-screen rendering extension -Group: System/Libraries # Wrongly named package shipped .so.8 +Group: System/Libraries Obsoletes: libOSMesa9 < %{version} Provides: libOSMesa9 = %{version} @@ -607,8 +605,8 @@ implementation of Mesa. %package -n Mesa-libd3d Summary: Mesa Direct3D9 state tracker -Group: System/Libraries # Manually provide d3d library (bnc#918294) +Group: System/Libraries %ifarch x86_64 s390x ppc64le aarch64 riscv64 Provides: d3dadapter9.so.1()(64bit) %else @@ -759,7 +757,6 @@ rm -rf docs/README.{VMS,WIN32,OS2} #%patch13 -p1 %patch12 -p1 %patch18 -p1 -%patch21 -p1 %if 0%{?libglvnd} %patch31 -p1 diff --git a/n_Define-GLAPIVAR-separate-from-GLAPI.patch b/n_Define-GLAPIVAR-separate-from-GLAPI.patch deleted file mode 100644 index aadf0e8..0000000 --- a/n_Define-GLAPIVAR-separate-from-GLAPI.patch +++ /dev/null @@ -1,40 +0,0 @@ -From: Egbert Eich -Date: Fri Mar 11 13:29:43 2016 +0100 -Subject: [PATCH]Define GLAPIVAR separate from GLAPI -Patch-mainline: never -Git-commit: 88dda160564c8c23cb533b0eb258404f1687a2e8 - -References: bsc# -Signed-off-by: Egbert Eich - -GLAPI doesn't contain 'extern' in some environments. -This is needed for variables (GLw). - -Signed-off-by: Egbert Eich ---- - Mesa-10.0.3/include/GL/gl.h | 5 +++++ - 1 file changed, 5 insertions(+) - -diff --git a/include/GL/gl.h b/Mesa-10.0.3/include/GL/gl.h -index b484b96..5189008 100644 ---- a/include/GL/gl.h -+++ b/include/GL/gl.h -@@ -59,6 +59,7 @@ - #elif (defined(__GNUC__) && __GNUC__ >= 4) || (defined(__SUNPRO_C) && (__SUNPRO_C >= 0x590)) - # define GLAPI __attribute__((visibility("default"))) - # define GLAPIENTRY -+# define GLAPIVAR extern GLAPI - #endif /* WIN32 && !CYGWIN */ - - /* -@@ -80,6 +81,10 @@ - #define GLAPI extern - #endif - -+#ifndef GLAPIVAR -+#define GLAPIVAR extern -+#endif -+ - #ifndef GLAPIENTRY - #define GLAPIENTRY - #endif From f4c3419d2a5714dc3b01d0c3ef2822ba0a82854263de56de073df7c9b7c7cff0 Mon Sep 17 00:00:00 2001 From: Stefan Dirsch Date: Fri, 23 Feb 2018 12:59:05 +0000 Subject: [PATCH 3/7] - recreated u_mesa-python3-only.patch and renamed to u_r600-egd_tables.py-added-support-for-python-3.patch; also removed first hunk (boo#1082303) OBS-URL: https://build.opensuse.org/package/show/X11:XOrg/Mesa?expand=0&rev=707 --- Mesa-drivers.changes | 7 ++++++ Mesa-drivers.spec | 2 +- Mesa.changes | 7 ++++++ Mesa.spec | 2 +- ...tables.py-added-support-for-python-3.patch | 25 +++++++++++++------ 5 files changed, 34 insertions(+), 9 deletions(-) rename u_mesa-python3-only.patch => u_r600-egd_tables.py-added-support-for-python-3.patch (85%) diff --git a/Mesa-drivers.changes b/Mesa-drivers.changes index 8839f8a..702dc79 100644 --- a/Mesa-drivers.changes +++ b/Mesa-drivers.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Fri Feb 23 12:01:29 UTC 2018 - sndirsch@suse.com + +- recreated u_mesa-python3-only.patch and renamed to + u_r600-egd_tables.py-added-support-for-python-3.patch; also + removed first hunk (boo#1082303) + ------------------------------------------------------------------- Fri Feb 23 10:51:04 UTC 2018 - sndirsch@suse.com diff --git a/Mesa-drivers.spec b/Mesa-drivers.spec index 472c564..7f19fd0 100644 --- a/Mesa-drivers.spec +++ b/Mesa-drivers.spec @@ -144,7 +144,7 @@ Patch18: n_VDPAU-XVMC-libs-Replace-hardlinks-with-copies.patch Patch31: archlinux_0001-Fix-linkage-against-shared-glapi.patch Patch32: archlinux_glvnd-fix-gl-dot-pc.patch # Upstream -Patch43: u_mesa-python3-only.patch +Patch43: u_r600-egd_tables.py-added-support-for-python-3.patch Patch45: n_Disable-AMDGPU-GFX9-Vega-on-LLVM-lessthan-6.0.0.patch Patch46: u_glsl-linker-error.patch diff --git a/Mesa.changes b/Mesa.changes index 8839f8a..702dc79 100644 --- a/Mesa.changes +++ b/Mesa.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Fri Feb 23 12:01:29 UTC 2018 - sndirsch@suse.com + +- recreated u_mesa-python3-only.patch and renamed to + u_r600-egd_tables.py-added-support-for-python-3.patch; also + removed first hunk (boo#1082303) + ------------------------------------------------------------------- Fri Feb 23 10:51:04 UTC 2018 - sndirsch@suse.com diff --git a/Mesa.spec b/Mesa.spec index 31b0c99..68bbcc2 100644 --- a/Mesa.spec +++ b/Mesa.spec @@ -143,7 +143,7 @@ Patch18: n_VDPAU-XVMC-libs-Replace-hardlinks-with-copies.patch Patch31: archlinux_0001-Fix-linkage-against-shared-glapi.patch Patch32: archlinux_glvnd-fix-gl-dot-pc.patch # Upstream -Patch43: u_mesa-python3-only.patch +Patch43: u_r600-egd_tables.py-added-support-for-python-3.patch Patch45: n_Disable-AMDGPU-GFX9-Vega-on-LLVM-lessthan-6.0.0.patch Patch46: u_glsl-linker-error.patch diff --git a/u_mesa-python3-only.patch b/u_r600-egd_tables.py-added-support-for-python-3.patch similarity index 85% rename from u_mesa-python3-only.patch rename to u_r600-egd_tables.py-added-support-for-python-3.patch index a6a96f8..3a514c1 100644 --- a/u_mesa-python3-only.patch +++ b/u_r600-egd_tables.py-added-support-for-python-3.patch @@ -1,13 +1,21 @@ +From c1714e8bf49fc0034c91ffed4adfbb067dbdf856 Mon Sep 17 00:00:00 2001 +From: Stefan Dirsch +Date: Fri, 23 Feb 2018 12:46:18 +0100 +Subject: [PATCH] r600/egd_tables.py: added support for python 3 + +Patch by "Tomas Chvatal" with modifications +by "Michal Srb" to not break python 2. +https://bugzilla.suse.com/show_bug.cgi?id=1082303 + +Signed-off-by: Stefan Dirsch +--- + src/gallium/drivers/r600/egd_tables.py | 52 +++++++++++++++++----------------- + 1 file changed, 26 insertions(+), 26 deletions(-) + diff --git a/src/gallium/drivers/r600/egd_tables.py b/src/gallium/drivers/r600/egd_tables.py -index d7b78c7fb1..7bda44ce83 100644 +index d7b78c7fb1..b3b8b50292 100644 --- a/src/gallium/drivers/r600/egd_tables.py +++ b/src/gallium/drivers/r600/egd_tables.py -@@ -1,4 +1,4 @@ -- -+#!/usr/bin/python3 - CopyRight = ''' - /* - * Copyright 2015 Advanced Micro Devices, Inc. @@ -60,7 +60,7 @@ class StringTable: """ fragments = [ @@ -109,3 +117,6 @@ index d7b78c7fb1..7bda44ce83 100644 def main(): +-- +2.13.6 + From cb8b1070ee33b7f982d9f66ba7718d49d15d19dbee0d7dcee682ecd5250dfa49 Mon Sep 17 00:00:00 2001 From: Stefan Dirsch Date: Fri, 23 Feb 2018 13:05:50 +0000 Subject: [PATCH 4/7] - removed u_mesa-8.0.1-fix-16bpp.patch and u_mesa-8.0-llvmpipe-shmget.patch, which we no longer apply since about 5 years (boo#1082305) OBS-URL: https://build.opensuse.org/package/show/X11:XOrg/Mesa?expand=0&rev=708 --- Mesa-drivers.changes | 7 +++++++ Mesa-drivers.spec | 6 ------ Mesa.changes | 7 +++++++ Mesa.spec | 6 ------ 4 files changed, 14 insertions(+), 12 deletions(-) diff --git a/Mesa-drivers.changes b/Mesa-drivers.changes index 702dc79..7de2e51 100644 --- a/Mesa-drivers.changes +++ b/Mesa-drivers.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Fri Feb 23 13:03:51 UTC 2018 - sndirsch@suse.com + +- removed u_mesa-8.0.1-fix-16bpp.patch and + u_mesa-8.0-llvmpipe-shmget.patch, which we no longer apply since + about 5 years (boo#1082305) + ------------------------------------------------------------------- Fri Feb 23 12:01:29 UTC 2018 - sndirsch@suse.com diff --git a/Mesa-drivers.spec b/Mesa-drivers.spec index 7f19fd0..e5922b1 100644 --- a/Mesa-drivers.spec +++ b/Mesa-drivers.spec @@ -134,10 +134,6 @@ Source7: Mesa.keyring # to be upstreamed Patch11: u_Fix-crash-in-swrast-when-setting-a-texture-for-a-pix.patch Patch12: u_add_llvm_codegen_dependencies.patch -# Patch from Fedora, fix 16bpp in llvmpipe -Patch13: u_mesa-8.0.1-fix-16bpp.patch -# Patch from Fedora, use shmget when available, under llvmpipe -Patch15: u_mesa-8.0-llvmpipe-shmget.patch # never to be upstreamed Patch18: n_VDPAU-XVMC-libs-Replace-hardlinks-with-copies.patch # currently needed for libglvnd support @@ -754,8 +750,6 @@ rm -rf docs/README.{VMS,WIN32,OS2} ### order to figure out whether the issue is still reproducable and ### hence a fix is required #%patch11 -p1 -#%patch15 -p1 -#%patch13 -p1 %patch12 -p1 %patch18 -p1 diff --git a/Mesa.changes b/Mesa.changes index 702dc79..7de2e51 100644 --- a/Mesa.changes +++ b/Mesa.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Fri Feb 23 13:03:51 UTC 2018 - sndirsch@suse.com + +- removed u_mesa-8.0.1-fix-16bpp.patch and + u_mesa-8.0-llvmpipe-shmget.patch, which we no longer apply since + about 5 years (boo#1082305) + ------------------------------------------------------------------- Fri Feb 23 12:01:29 UTC 2018 - sndirsch@suse.com diff --git a/Mesa.spec b/Mesa.spec index 68bbcc2..3c1116f 100644 --- a/Mesa.spec +++ b/Mesa.spec @@ -133,10 +133,6 @@ Source7: Mesa.keyring # to be upstreamed Patch11: u_Fix-crash-in-swrast-when-setting-a-texture-for-a-pix.patch Patch12: u_add_llvm_codegen_dependencies.patch -# Patch from Fedora, fix 16bpp in llvmpipe -Patch13: u_mesa-8.0.1-fix-16bpp.patch -# Patch from Fedora, use shmget when available, under llvmpipe -Patch15: u_mesa-8.0-llvmpipe-shmget.patch # never to be upstreamed Patch18: n_VDPAU-XVMC-libs-Replace-hardlinks-with-copies.patch # currently needed for libglvnd support @@ -753,8 +749,6 @@ rm -rf docs/README.{VMS,WIN32,OS2} ### order to figure out whether the issue is still reproducable and ### hence a fix is required #%patch11 -p1 -#%patch15 -p1 -#%patch13 -p1 %patch12 -p1 %patch18 -p1 From f35534c2f7b0f4ee029fd4b141e2f3bc4ca87ef2a4f0d2428e6e787a2859f256 Mon Sep 17 00:00:00 2001 From: Stefan Dirsch Date: Fri, 23 Feb 2018 13:24:29 +0000 Subject: [PATCH 5/7] - redone u_add_llvm_codegen_dependencies.patch and renamed to u_configure.ac-Link-to-libLLVMCodegen-to-fix-cyclic-li.patch (boo#1082307) OBS-URL: https://build.opensuse.org/package/show/X11:XOrg/Mesa?expand=0&rev=709 --- Mesa-drivers.changes | 7 +++++ Mesa-drivers.spec | 2 +- Mesa.changes | 7 +++++ Mesa.spec | 2 +- u_add_llvm_codegen_dependencies.patch | 12 --------- ...k-to-libLLVMCodegen-to-fix-cyclic-li.patch | 27 +++++++++++++++++++ 6 files changed, 43 insertions(+), 14 deletions(-) delete mode 100644 u_add_llvm_codegen_dependencies.patch create mode 100644 u_configure.ac-Link-to-libLLVMCodegen-to-fix-cyclic-li.patch diff --git a/Mesa-drivers.changes b/Mesa-drivers.changes index 7de2e51..1f26210 100644 --- a/Mesa-drivers.changes +++ b/Mesa-drivers.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Fri Feb 23 13:19:41 UTC 2018 - sndirsch@suse.com + +- redone u_add_llvm_codegen_dependencies.patch and renamed to + u_configure.ac-Link-to-libLLVMCodegen-to-fix-cyclic-li.patch + (boo#1082307) + ------------------------------------------------------------------- Fri Feb 23 13:03:51 UTC 2018 - sndirsch@suse.com diff --git a/Mesa-drivers.spec b/Mesa-drivers.spec index e5922b1..96b5c6b 100644 --- a/Mesa-drivers.spec +++ b/Mesa-drivers.spec @@ -133,7 +133,7 @@ Source6: %{name}-rpmlintrc Source7: Mesa.keyring # to be upstreamed Patch11: u_Fix-crash-in-swrast-when-setting-a-texture-for-a-pix.patch -Patch12: u_add_llvm_codegen_dependencies.patch +Patch12: u_configure.ac-Link-to-libLLVMCodegen-to-fix-cyclic-li.patch # never to be upstreamed Patch18: n_VDPAU-XVMC-libs-Replace-hardlinks-with-copies.patch # currently needed for libglvnd support diff --git a/Mesa.changes b/Mesa.changes index 7de2e51..1f26210 100644 --- a/Mesa.changes +++ b/Mesa.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Fri Feb 23 13:19:41 UTC 2018 - sndirsch@suse.com + +- redone u_add_llvm_codegen_dependencies.patch and renamed to + u_configure.ac-Link-to-libLLVMCodegen-to-fix-cyclic-li.patch + (boo#1082307) + ------------------------------------------------------------------- Fri Feb 23 13:03:51 UTC 2018 - sndirsch@suse.com diff --git a/Mesa.spec b/Mesa.spec index 3c1116f..0315b58 100644 --- a/Mesa.spec +++ b/Mesa.spec @@ -132,7 +132,7 @@ Source6: %{name}-rpmlintrc Source7: Mesa.keyring # to be upstreamed Patch11: u_Fix-crash-in-swrast-when-setting-a-texture-for-a-pix.patch -Patch12: u_add_llvm_codegen_dependencies.patch +Patch12: u_configure.ac-Link-to-libLLVMCodegen-to-fix-cyclic-li.patch # never to be upstreamed Patch18: n_VDPAU-XVMC-libs-Replace-hardlinks-with-copies.patch # currently needed for libglvnd support diff --git a/u_add_llvm_codegen_dependencies.patch b/u_add_llvm_codegen_dependencies.patch deleted file mode 100644 index 1123b79..0000000 --- a/u_add_llvm_codegen_dependencies.patch +++ /dev/null @@ -1,12 +0,0 @@ -Index: mesa-17.0.4/configure.ac -=================================================================== ---- mesa-17.0.4.orig/configure.ac -+++ mesa-17.0.4/configure.ac -@@ -918,6 +918,7 @@ llvm_add_default_components() { - - # Required default components - llvm_add_component "bitwriter" $driver_name -+ llvm_add_component "codegen" $driver_name - llvm_add_component "engine" $driver_name - llvm_add_component "mcdisassembler" $driver_name - llvm_add_component "mcjit" $driver_name diff --git a/u_configure.ac-Link-to-libLLVMCodegen-to-fix-cyclic-li.patch b/u_configure.ac-Link-to-libLLVMCodegen-to-fix-cyclic-li.patch new file mode 100644 index 0000000..fed6afb --- /dev/null +++ b/u_configure.ac-Link-to-libLLVMCodegen-to-fix-cyclic-li.patch @@ -0,0 +1,27 @@ +From 1431fecda9cd4c38eecb6bdc172a7af9ff72c056 Mon Sep 17 00:00:00 2001 +From: Stefan Dirsch +Date: Fri, 23 Feb 2018 14:15:19 +0100 +Subject: [PATCH] configure.ac: Link to libLLVMCodegen to fix cyclic linking + problems + +Patch by "Ismail Doenmez" +https://bugzilla.suse.com/show_bug.cgi?id=1082307 +--- + configure.ac | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/configure.ac b/configure.ac +index 8a9172690a..a23eb844d4 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -1032,6 +1032,7 @@ llvm_add_default_components() { + + # Required default components + llvm_add_component "bitwriter" $driver_name ++ llvm_add_component "codegen" $driver_name + llvm_add_component "engine" $driver_name + llvm_add_component "mcdisassembler" $driver_name + llvm_add_component "mcjit" $driver_name +-- +2.13.6 + From 42d3a9c4eddcd1670d98307c579aba6fee8154edd9a8a2cad4bb2b785d018c01 Mon Sep 17 00:00:00 2001 From: Stefan Dirsch Date: Fri, 23 Feb 2018 13:27:08 +0000 Subject: [PATCH 6/7] - removed no longer needed ncurses-devel BuildRequires (boo#1082315) OBS-URL: https://build.opensuse.org/package/show/X11:XOrg/Mesa?expand=0&rev=710 --- Mesa-drivers.changes | 5 +++++ Mesa-drivers.spec | 3 --- Mesa.changes | 5 +++++ Mesa.spec | 3 --- 4 files changed, 10 insertions(+), 6 deletions(-) diff --git a/Mesa-drivers.changes b/Mesa-drivers.changes index 1f26210..e53eda2 100644 --- a/Mesa-drivers.changes +++ b/Mesa-drivers.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Fri Feb 23 13:25:16 UTC 2018 - sndirsch@suse.com + +- removed no longer needed ncurses-devel BuildRequires (boo#1082315) + ------------------------------------------------------------------- Fri Feb 23 13:19:41 UTC 2018 - sndirsch@suse.com diff --git a/Mesa-drivers.spec b/Mesa-drivers.spec index 96b5c6b..16c94d5 100644 --- a/Mesa-drivers.spec +++ b/Mesa-drivers.spec @@ -222,9 +222,6 @@ BuildRequires: pkgconfig(wayland-server) >= 1.11 %if 0%{with_llvm} BuildRequires: llvm-devel >= 3.9.0 %endif -%ifarch aarch64 %arm ppc64 ppc64le s390x %ix86 x86_64 -BuildRequires: ncurses-devel -%endif %if 0%{with_opencl} BuildRequires: clang-devel diff --git a/Mesa.changes b/Mesa.changes index 1f26210..e53eda2 100644 --- a/Mesa.changes +++ b/Mesa.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Fri Feb 23 13:25:16 UTC 2018 - sndirsch@suse.com + +- removed no longer needed ncurses-devel BuildRequires (boo#1082315) + ------------------------------------------------------------------- Fri Feb 23 13:19:41 UTC 2018 - sndirsch@suse.com diff --git a/Mesa.spec b/Mesa.spec index 0315b58..c882f19 100644 --- a/Mesa.spec +++ b/Mesa.spec @@ -221,9 +221,6 @@ BuildRequires: pkgconfig(wayland-server) >= 1.11 %if 0%{with_llvm} BuildRequires: llvm-devel >= 3.9.0 %endif -%ifarch aarch64 %arm ppc64 ppc64le s390x %ix86 x86_64 -BuildRequires: ncurses-devel -%endif %if 0%{with_opencl} BuildRequires: clang-devel From c4e366ec4eb6b4125aa7d957bda8dc2bc7438642ed3c545c3ad47b9a4cb5aaae Mon Sep 17 00:00:00 2001 From: Stefan Dirsch Date: Fri, 23 Feb 2018 14:07:05 +0000 Subject: [PATCH 7/7] removed u_mesa-8.0-llvmpipe-shmget.patch, u_mesa-8.0.1-fix-16bpp.patch from sources OBS-URL: https://build.opensuse.org/package/show/X11:XOrg/Mesa?expand=0&rev=711 --- u_mesa-8.0-llvmpipe-shmget.patch | 217 ------------------------------- u_mesa-8.0.1-fix-16bpp.patch | 69 ---------- 2 files changed, 286 deletions(-) delete mode 100644 u_mesa-8.0-llvmpipe-shmget.patch delete mode 100644 u_mesa-8.0.1-fix-16bpp.patch diff --git a/u_mesa-8.0-llvmpipe-shmget.patch b/u_mesa-8.0-llvmpipe-shmget.patch deleted file mode 100644 index 270a46e..0000000 --- a/u_mesa-8.0-llvmpipe-shmget.patch +++ /dev/null @@ -1,217 +0,0 @@ -From c617fb498b2315efdccd799b8efb7a18a758fb36 Mon Sep 17 00:00:00 2001 -From: Adam Jackson -Date: Thu, 22 Mar 2012 09:29:19 +0000 -Subject: [PATCHv4] glx: Use ShmGetImage if possible. - -v2: Adam Jackson -Fix image pitch bug. - -v3: Adam Jackson -Rediff for 8.1 - -v4: Stefan BrĂ¼ns -The patch handles failing XShmAttach with a special error handler, but in case -of an error it called XShmDetach unconditionally and unprotected. As there is -no XSync it failed later on the first call to a function causing a XSync. -Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=917687 -Bugzilla: https://bugzilla.novell.com/show_bug.cgi?id=807205 ---- - -NOTE: -v3 has not been applied on Fedora for a while (since 9.0): -http://pkgs.fedoraproject.org/cgit/mesa.git/commit/?h=f18&id=9058f5a -# this fastpath is: -# - broken with swrast classic -# - broken on 24bpp -# - not a huge win anyway -# - ABI-broken wrt upstream -# - eventually obsoleted by vgem -# -# dear ajax: fix this one way or the other -#patch9 -p1 -b .shmget -#patch12 -p1 -b .16bpp - -v4 solves an issue on openSUSE:12.2. - ---- - src/gallium/state_trackers/dri/sw/drisw.c | 11 --- - src/glx/drisw_glx.c | 114 +++++++++++++++++++++++++++++- - 2 files changed, 113 insertions(+), 12 deletions(-) - -diff --git a/src/gallium/state_trackers/dri/sw/drisw.c b/src/gallium/state_trackers/dri/sw/drisw.c -index 41f66d5..28beb80 100644 ---- a/src/gallium/state_trackers/dri/sw/drisw.c -+++ b/src/gallium/state_trackers/dri/sw/drisw.c -@@ -252,8 +252,6 @@ drisw_update_tex_buffer(struct dri_drawable *drawable, - struct pipe_transfer *transfer; - char *map; - int x, y, w, h; -- int ximage_stride, line; -- int cpp = util_format_get_blocksize(res->format); - - get_drawable_info(dPriv, &x, &y, &w, &h); - -@@ -265,15 +263,6 @@ drisw_update_tex_buffer(struct dri_drawable *drawable, - /* Copy the Drawable content to the mapped texture buffer */ - get_image(dPriv, x, y, w, h, map); - -- /* The pipe transfer has a pitch rounded up to the nearest 64 pixels. -- get_image() has a pitch rounded up to 4 bytes. */ -- ximage_stride = ((w * cpp) + 3) & -4; -- for (line = h-1; line; --line) { -- memmove(&map[line * transfer->stride], -- &map[line * ximage_stride], -- ximage_stride); -- } -- - pipe_transfer_unmap(pipe, transfer); - } - -diff --git a/src/glx/drisw_glx.c b/src/glx/drisw_glx.c -index 0583cd1..5643f15 100644 ---- a/src/glx/drisw_glx.c -+++ b/src/glx/drisw_glx.c -@@ -24,6 +24,9 @@ - #if defined(GLX_DIRECT_RENDERING) && !defined(GLX_USE_APPLEGL) - - #include -+#include -+#include -+#include - #include "glxclient.h" - #include - #include "dri_common.h" -@@ -206,6 +209,96 @@ swrastPutImage(__DRIdrawable * draw, int op, - ximage->data = NULL; - } - -+static int shm_error = 0; -+ -+static int -+shm_handler(Display *d, XErrorEvent *e) -+{ -+ shm_error = 1; -+ return 0; -+} -+ -+static int -+align(int value, int alignment) -+{ -+ return (value + alignment - 1) & ~(alignment - 1); -+} -+ -+/* -+ * Slight fast path. Short of changing how texture memory is allocated, we -+ * have two options for getting the pixels out. GetImage is clamped by the -+ * server's write buffer size, so you end up doing lots of relatively small -+ * requests (128k each or so), with two memcpys: down into the kernel, and -+ * then back up. ShmGetImage is one big blit into the shm segment (which -+ * could be GPU DMA, in principle) and then another one here. -+ */ -+static Bool -+swrastShmGetImage(__DRIdrawable *read, char *data, struct drisw_drawable *prp) -+{ -+ __GLXDRIdrawable *pread = &(prp->base); -+ Display *dpy = pread->psc->dpy; -+ XImage *ximage = prp->ximage; -+ unsigned long image_size = ximage->height * ximage->bytes_per_line; -+ Bool ret = 0; -+ XShmSegmentInfo seg = { 0, -1, (void *)-1, 0 }; -+ int (*old_handler)(Display *, XErrorEvent *); -+ -+ if (shm_error || !XShmQueryExtension(dpy)) -+ goto out; -+ -+ /* image setup */ -+ seg.shmid = shmget(IPC_PRIVATE, image_size, IPC_CREAT | 0777); -+ if (seg.shmid < 0) -+ goto out; -+ -+ seg.shmaddr = shmat(seg.shmid, NULL, 0); -+ if (seg.shmaddr == (void *)-1) -+ goto out; -+ -+ XSync(dpy, 0); -+ old_handler = XSetErrorHandler(shm_handler); -+ XShmAttach(dpy, &seg); -+ XSync(dpy, 0); -+ XSetErrorHandler(old_handler); -+ if (shm_error) -+ goto out; -+ -+ ximage->data = seg.shmaddr; -+ ximage->obdata = &seg; -+ if (!XShmGetImage(dpy, pread->xDrawable, ximage, 0, 0, -1)) -+ goto out; -+ -+ /* -+ * ShmGetImage doesn't actually pay attention to ->bytes_per_line. -+ * We have to compensate for this somewhere since llvmpipe's natural -+ * tile width is 64. Do it here so we don't have to undo it with a -+ * bunch of memmove in the driver. -+ */ -+ do { -+ int i; -+ char *src = ximage->data; -+ int dst_width = align(ximage->width * ximage->bits_per_pixel / 8, 256); -+ -+ for (i = 0; i < ximage->height; i++) { -+ memcpy(data, src, ximage->bytes_per_line); -+ data += dst_width; -+ src += ximage->bytes_per_line; -+ } -+ } while (0); -+ ret = 1; -+ -+out: -+ ximage->obdata = NULL; -+ ximage->data = NULL; -+ if (shm_error == 0) -+ XShmDetach(dpy, &seg); -+ if (seg.shmaddr != (void *)-1) -+ shmdt(seg.shmaddr); -+ if (seg.shmid > -1) -+ shmctl(seg.shmid, IPC_RMID, NULL); -+ return ret; -+} -+ - static void - swrastGetImage(__DRIdrawable * read, - int x, int y, int w, int h, -@@ -220,13 +313,32 @@ swrastGetImage(__DRIdrawable * read, - readable = pread->xDrawable; - - ximage = prp->ximage; -- ximage->data = data; - ximage->width = w; - ximage->height = h; - ximage->bytes_per_line = bytes_per_line(w * ximage->bits_per_pixel, 32); - -+ /* XXX check dimensions, if any caller ever sub-images */ -+ if (swrastShmGetImage(read, data, prp)) -+ return; -+ -+ /* shm failed, fall back to protocol */ -+ ximage->data = data; -+ - XGetSubImage(dpy, readable, x, y, w, h, ~0L, ZPixmap, ximage, 0, 0); - -+ do { -+ int dst_width = align(ximage->width * ximage->bits_per_pixel / 8, 256); -+ int line; -+ -+ if (dst_width != ximage->bytes_per_line) { -+ for (line = ximage->height-1; line; line--) { -+ memmove(&data[dst_width * line], -+ &data[ximage->bytes_per_line * line], -+ dst_width); -+ } -+ } -+ } while (0); -+ - ximage->data = NULL; - } - --- -1.8.1.4 - diff --git a/u_mesa-8.0.1-fix-16bpp.patch b/u_mesa-8.0.1-fix-16bpp.patch deleted file mode 100644 index ee20999..0000000 --- a/u_mesa-8.0.1-fix-16bpp.patch +++ /dev/null @@ -1,69 +0,0 @@ -From 60fe1551667dba2cb9afa085fdff0cbc351a3e73 Mon Sep 17 00:00:00 2001 -From: Adam Jackson -Date: Mon, 2 Apr 2012 16:27:19 +0000 -Subject: [PATCH 2/2] glx: Fix 16bpp in llvmpipe. - -v2: Richard Hughes -Rebuild with new git snapshot -- Remove upstreamed patches - -v3: Johannes Obermayr -Revert changes made in v2. ---- - -v2 has not been applied on Fedora for a while (since 9.0): -http://pkgs.fedoraproject.org/cgit/mesa.git/commit/?h=f18&id=9058f5a -# this fastpath is: -# - broken with swrast classic -# - broken on 24bpp -# - not a huge win anyway -# - ABI-broken wrt upstream -# - eventually obsoleted by vgem -# -# dear ajax: fix this one way or the other -#patch9 -p1 -b .shmget -#patch12 -p1 -b .16bpp - -This "broken on 24bpp" could be because v2 removed changes which depend on -XShmGetImage patch. I assume Richard didn't notice this dependency and thought -changes were upstreamed: -http://pkgs.fedoraproject.org/cgit/mesa.git/commit/?id=43e76b8 -So revert v2 and apply XShmGetImage patch before. - ---- - src/glx/drisw_glx.c | 4 +++- - src/mesa/state_tracker/st_manager.c | 3 +++ - 2 files changed, 6 insertions(+), 1 deletion(-) - -diff --git a/src/glx/drisw_glx.c b/src/glx/drisw_glx.c -index 08fa1d9..f94fa4b 100644 ---- a/src/glx/drisw_glx.c -+++ b/src/glx/drisw_glx.c -@@ -277,7 +277,9 @@ swrastShmGetImage(__DRIdrawable *read, char *data, struct drisw_drawable *prp) - do { - int i; - char *src = ximage->data; -- int dst_width = align(ximage->width * ximage->bits_per_pixel / 8, 256); -+ int bytes_per_pixel = ((ximage->bits_per_pixel + 7) / 8); -+ int dst_width = align(ximage->width * bytes_per_pixel, -+ 64 * bytes_per_pixel); - - for (i = 0; i < ximage->height; i++) { - memcpy(data, src, ximage->bytes_per_line); -diff --git a/src/mesa/state_tracker/st_manager.c b/src/mesa/state_tracker/st_manager.c -index 9c2b4d2..c6a3189 100644 ---- a/src/mesa/state_tracker/st_manager.c -+++ b/src/mesa/state_tracker/st_manager.c -@@ -512,6 +512,9 @@ st_context_teximage(struct st_context_iface *stctxi, - - if (util_format_has_alpha(tex->format)) - internalFormat = GL_RGBA; -+ else if (util_format_get_component_bits(pipe_format, -+ UTIL_FORMAT_COLORSPACE_RGB, 0) == 5) -+ internalFormat = GL_RGB5; - else - internalFormat = GL_RGB; - --- -1.8.1.4 -