diff --git a/Mesa-drivers.changes b/Mesa-drivers.changes index 3389b60..e53eda2 100644 --- a/Mesa-drivers.changes +++ b/Mesa-drivers.changes @@ -1,3 +1,42 @@ +------------------------------------------------------------------- +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 + +- 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 + +- 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 + +- 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 + +- 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 + +- 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..16c94d5 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 @@ -127,20 +133,14 @@ 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 -# 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 +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 -# 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 # 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 @@ -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 @@ -241,7 +238,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 @@ -602,7 +601,7 @@ implementation of Mesa. Summary: Mesa Direct3D9 state tracker # Manually provide d3d library (bnc#918294) Group: System/Libraries -%ifarch x86_64 s390x ppc64le aarch64 +%ifarch x86_64 s390x ppc64le aarch64 riscv64 Provides: d3dadapter9.so.1()(64bit) %else Provides: d3dadapter9.so.1 @@ -748,11 +747,8 @@ 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 -%patch21 -p1 %if 0%{?libglvnd} %patch31 -p1 @@ -845,7 +841,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..e53eda2 100644 --- a/Mesa.changes +++ b/Mesa.changes @@ -1,3 +1,42 @@ +------------------------------------------------------------------- +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 + +- 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 + +- 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 + +- 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 + +- 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 + +- 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..c882f19 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 @@ -126,20 +132,14 @@ 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 -# 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 +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 -# 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 # 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 @@ -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 @@ -240,7 +237,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 @@ -601,7 +600,7 @@ implementation of Mesa. Summary: Mesa Direct3D9 state tracker # Manually provide d3d library (bnc#918294) Group: System/Libraries -%ifarch x86_64 s390x ppc64le aarch64 +%ifarch x86_64 s390x ppc64le aarch64 riscv64 Provides: d3dadapter9.so.1()(64bit) %else Provides: d3dadapter9.so.1 @@ -747,11 +746,8 @@ 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 -%patch21 -p1 %if 0%{?libglvnd} %patch31 -p1 @@ -844,7 +840,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/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 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 + 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 - 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 +