[arch-commits] Commit in lib32-mesa/trunk (3 files)

2020-05-15 Thread Laurent Carlier via arch-commits
Date: Friday, May 15, 2020 @ 17:07:39
  Author: lcarlier
Revision: 628045

upgpkg: lib32-mesa 20.0.7-1: upstream update 20.0.7

Modified:
  lib32-mesa/trunk/PKGBUILD
Deleted:
  lib32-mesa/trunk/0001-egl-allow-INVALID-format-for-linux_dmabuf.patch
  lib32-mesa/trunk/0002-egl-wayland-Fix-zwp_linux_dmabuf-usage.patch

--+
 0001-egl-allow-INVALID-format-for-linux_dmabuf.patch |   84 -
 0002-egl-wayland-Fix-zwp_linux_dmabuf-usage.patch|   71 --
 PKGBUILD |   19 ---
 3 files changed, 3 insertions(+), 171 deletions(-)

Deleted: 0001-egl-allow-INVALID-format-for-linux_dmabuf.patch
===
--- 0001-egl-allow-INVALID-format-for-linux_dmabuf.patch2020-05-15 
16:38:29 UTC (rev 628044)
+++ 0001-egl-allow-INVALID-format-for-linux_dmabuf.patch2020-05-15 
17:07:39 UTC (rev 628045)
@@ -1,84 +0,0 @@
-From c71ea55be7c1dbb58d56df9c6cfa69718fdf5d6a Mon Sep 17 00:00:00 2001
-From: Ivan Molodetskikh 
-Date: Fri, 27 Sep 2019 00:45:39 +0300
-Subject: [PATCH 1/2] egl: allow INVALID format for linux_dmabuf
-
-As per
-https://gitlab.freedesktop.org/wayland/wayland-protocols/commit/fb9b2a87317c77e26283da5f6c9559d709f6fdcd,
-the compositor may advertise DRM_FORMAT_MOD_INVALID as a supported
-modifier. This patch makes mesa recognize this fact and allow
-linux_dmabuf usage with the INVALID modifier in this case.
-
-In case the driver doesn't support modifiers, we can still use
-linux-dmabuf protocol instead of the legacy wl_drm interface to create
-wl_buffers. This will help compositors to handle these buffers better.
-
-In this commit, the INVALID modifier is allowed to be added to the list
-of supported modifiers, and create_wl_buffer will be able to use
-linux_dmabuf with an INVALID modifier if the compositor advertised it as
-supported.
-
-Signed-off-by: Ivan Molodetskikh 
-Tested-by: Marge Bot 

-Part-of: 

- src/egl/drivers/dri2/platform_wayland.c | 29 -
- 1 file changed, 24 insertions(+), 5 deletions(-)
-
-diff --git a/src/egl/drivers/dri2/platform_wayland.c 
b/src/egl/drivers/dri2/platform_wayland.c
-index 71bcb04a77b..324ac2357da 100644
 a/src/egl/drivers/dri2/platform_wayland.c
-+++ b/src/egl/drivers/dri2/platform_wayland.c
-@@ -522,6 +522,13 @@ get_back_bo(struct dri2_egl_surface *dri2_surf)
-modifiers = u_vector_tail(_dpy->wl_modifiers[visual_idx]);
-num_modifiers = u_vector_length(_dpy->wl_modifiers[visual_idx]);
- 
-+   if (num_modifiers == 1 && modifiers[0] == DRM_FORMAT_MOD_INVALID) {
-+  /* For the purposes of this function, an INVALID modifier on its own
-+   * means the modifiers aren't supported.
-+   */
-+  num_modifiers = 0;
-+   }
-+
-/* Substitute dri image format if server does not support original format 
*/
-if (!BITSET_TEST(dri2_dpy->formats, visual_idx))
-   linear_dri_image_format = 
dri2_wl_visuals[visual_idx].alt_dri_image_format;
-@@ -917,7 +924,23 @@ create_wl_buffer(struct dri2_egl_display *dri2_dpy,
-   }
-}
- 
--   if (dri2_dpy->wl_dmabuf && modifier != DRM_FORMAT_MOD_INVALID) {
-+   bool supported_modifier = false;
-+   if (modifier != DRM_FORMAT_MOD_INVALID) {
-+  supported_modifier = true;
-+   } else {
-+  int visual_idx = dri2_wl_visual_idx_from_fourcc(fourcc);
-+  assert(visual_idx != -1);
-+
-+  uint64_t *mod;
-+  u_vector_foreach(mod, _dpy->wl_modifiers[visual_idx]) {
-+ if (*mod == DRM_FORMAT_MOD_INVALID) {
-+supported_modifier = true;
-+break;
-+ }
-+  }
-+   }
-+
-+   if (dri2_dpy->wl_dmabuf && supported_modifier) {
-   struct zwp_linux_buffer_params_v1 *params;
-   int i;
- 
-@@ -1290,10 +1313,6 @@ dmabuf_handle_modifier(void *data, struct 
zwp_linux_dmabuf_v1 *dmabuf,
-if (visual_idx == -1)
-   return;
- 
--   if (modifier_hi == (DRM_FORMAT_MOD_INVALID >> 32) &&
--   modifier_lo == (DRM_FORMAT_MOD_INVALID & 0x))
--  return;
--
-BITSET_SET(dri2_dpy->formats, visual_idx);
- 
-mod = u_vector_add(_dpy->wl_modifiers[visual_idx]);
--- 
-2.26.2
-

Deleted: 0002-egl-wayland-Fix-zwp_linux_dmabuf-usage.patch
===
--- 0002-egl-wayland-Fix-zwp_linux_dmabuf-usage.patch   2020-05-15 16:38:29 UTC 
(rev 628044)
+++ 0002-egl-wayland-Fix-zwp_linux_dmabuf-usage.patch   2020-05-15 17:07:39 UTC 
(rev 628045)
@@ -1,71 +0,0 @@
-From 8aeeb72b5af16e27b152f733da4a7de0ec47f328 Mon Sep 17 00:00:00 2001
-From: Christopher James Halse Rogers 
-Date: Tue, 24 Mar 2020 14:19:51 +1100
-Subject: [PATCH 2/2] egl/wayland: Fix zwp_linux_dmabuf usage
-
-There's no guarantee that the formats advertised by wl_drm and the formats
-advertised by 

[arch-commits] Commit in lib32-mesa/trunk (3 files)

2020-04-29 Thread Laurent Carlier via arch-commits
Date: Thursday, April 30, 2020 @ 05:33:04
  Author: lcarlier
Revision: 622352

upgpkg: lib32-mesa 20.0.6-1: upstream update 20.0.6 - enable LTO

Added:
  lib32-mesa/trunk/0001-egl-allow-INVALID-format-for-linux_dmabuf.patch
  lib32-mesa/trunk/0002-egl-wayland-Fix-zwp_linux_dmabuf-usage.patch
Modified:
  lib32-mesa/trunk/PKGBUILD

--+
 0001-egl-allow-INVALID-format-for-linux_dmabuf.patch |   84 +
 0002-egl-wayland-Fix-zwp_linux_dmabuf-usage.patch|   71 ++
 PKGBUILD |   19 +++
 3 files changed, 171 insertions(+), 3 deletions(-)

Added: 0001-egl-allow-INVALID-format-for-linux_dmabuf.patch
===
--- 0001-egl-allow-INVALID-format-for-linux_dmabuf.patch
(rev 0)
+++ 0001-egl-allow-INVALID-format-for-linux_dmabuf.patch2020-04-30 
05:33:04 UTC (rev 622352)
@@ -0,0 +1,84 @@
+From c71ea55be7c1dbb58d56df9c6cfa69718fdf5d6a Mon Sep 17 00:00:00 2001
+From: Ivan Molodetskikh 
+Date: Fri, 27 Sep 2019 00:45:39 +0300
+Subject: [PATCH 1/2] egl: allow INVALID format for linux_dmabuf
+
+As per
+https://gitlab.freedesktop.org/wayland/wayland-protocols/commit/fb9b2a87317c77e26283da5f6c9559d709f6fdcd,
+the compositor may advertise DRM_FORMAT_MOD_INVALID as a supported
+modifier. This patch makes mesa recognize this fact and allow
+linux_dmabuf usage with the INVALID modifier in this case.
+
+In case the driver doesn't support modifiers, we can still use
+linux-dmabuf protocol instead of the legacy wl_drm interface to create
+wl_buffers. This will help compositors to handle these buffers better.
+
+In this commit, the INVALID modifier is allowed to be added to the list
+of supported modifiers, and create_wl_buffer will be able to use
+linux_dmabuf with an INVALID modifier if the compositor advertised it as
+supported.
+
+Signed-off-by: Ivan Molodetskikh 
+Tested-by: Marge Bot 

+Part-of: 
+---
+ src/egl/drivers/dri2/platform_wayland.c | 29 -
+ 1 file changed, 24 insertions(+), 5 deletions(-)
+
+diff --git a/src/egl/drivers/dri2/platform_wayland.c 
b/src/egl/drivers/dri2/platform_wayland.c
+index 71bcb04a77b..324ac2357da 100644
+--- a/src/egl/drivers/dri2/platform_wayland.c
 b/src/egl/drivers/dri2/platform_wayland.c
+@@ -522,6 +522,13 @@ get_back_bo(struct dri2_egl_surface *dri2_surf)
+modifiers = u_vector_tail(_dpy->wl_modifiers[visual_idx]);
+num_modifiers = u_vector_length(_dpy->wl_modifiers[visual_idx]);
+ 
++   if (num_modifiers == 1 && modifiers[0] == DRM_FORMAT_MOD_INVALID) {
++  /* For the purposes of this function, an INVALID modifier on its own
++   * means the modifiers aren't supported.
++   */
++  num_modifiers = 0;
++   }
++
+/* Substitute dri image format if server does not support original format 
*/
+if (!BITSET_TEST(dri2_dpy->formats, visual_idx))
+   linear_dri_image_format = 
dri2_wl_visuals[visual_idx].alt_dri_image_format;
+@@ -917,7 +924,23 @@ create_wl_buffer(struct dri2_egl_display *dri2_dpy,
+   }
+}
+ 
+-   if (dri2_dpy->wl_dmabuf && modifier != DRM_FORMAT_MOD_INVALID) {
++   bool supported_modifier = false;
++   if (modifier != DRM_FORMAT_MOD_INVALID) {
++  supported_modifier = true;
++   } else {
++  int visual_idx = dri2_wl_visual_idx_from_fourcc(fourcc);
++  assert(visual_idx != -1);
++
++  uint64_t *mod;
++  u_vector_foreach(mod, _dpy->wl_modifiers[visual_idx]) {
++ if (*mod == DRM_FORMAT_MOD_INVALID) {
++supported_modifier = true;
++break;
++ }
++  }
++   }
++
++   if (dri2_dpy->wl_dmabuf && supported_modifier) {
+   struct zwp_linux_buffer_params_v1 *params;
+   int i;
+ 
+@@ -1290,10 +1313,6 @@ dmabuf_handle_modifier(void *data, struct 
zwp_linux_dmabuf_v1 *dmabuf,
+if (visual_idx == -1)
+   return;
+ 
+-   if (modifier_hi == (DRM_FORMAT_MOD_INVALID >> 32) &&
+-   modifier_lo == (DRM_FORMAT_MOD_INVALID & 0x))
+-  return;
+-
+BITSET_SET(dri2_dpy->formats, visual_idx);
+ 
+mod = u_vector_add(_dpy->wl_modifiers[visual_idx]);
+-- 
+2.26.2
+

Added: 0002-egl-wayland-Fix-zwp_linux_dmabuf-usage.patch
===
--- 0002-egl-wayland-Fix-zwp_linux_dmabuf-usage.patch   
(rev 0)
+++ 0002-egl-wayland-Fix-zwp_linux_dmabuf-usage.patch   2020-04-30 05:33:04 UTC 
(rev 622352)
@@ -0,0 +1,71 @@
+From 8aeeb72b5af16e27b152f733da4a7de0ec47f328 Mon Sep 17 00:00:00 2001
+From: Christopher James Halse Rogers 
+Date: Tue, 24 Mar 2020 14:19:51 +1100
+Subject: [PATCH 2/2] egl/wayland: Fix zwp_linux_dmabuf usage
+
+There's no guarantee that the formats advertised by wl_drm and the formats
+advertised by 

[arch-commits] Commit in lib32-mesa/trunk (3 files)

2019-10-09 Thread Laurent Carlier via arch-commits
Date: Wednesday, October 9, 2019 @ 18:15:46
  Author: lcarlier
Revision: 514371

upgpkg: lib32-mesa 19.2.1-1

upstream update 19.2.1

Modified:
  lib32-mesa/trunk/PKGBUILD
Deleted:
  lib32-mesa/trunk/glvnd.patch
  lib32-mesa/trunk/intel-topology-query-fix-old-gens.patch

-+
 PKGBUILD|   23 +---
 glvnd.patch |  148 --
 intel-topology-query-fix-old-gens.patch |   39 ---
 3 files changed, 5 insertions(+), 205 deletions(-)

Modified: PKGBUILD
===
--- PKGBUILD2019-10-09 18:14:20 UTC (rev 514370)
+++ PKGBUILD2019-10-09 18:15:46 UTC (rev 514371)
@@ -4,8 +4,8 @@
 
 pkgbase=lib32-mesa
 pkgname=('lib32-vulkan-intel' 'lib32-vulkan-radeon' 'lib32-libva-mesa-driver' 
'lib32-mesa-vdpau' 'lib32-mesa')
-pkgver=19.2.0
-pkgrel=3
+pkgver=19.2.1
+pkgrel=1
 arch=('x86_64')
 makedepends=('python-mako' 'lib32-libxml2' 'lib32-expat' 'lib32-libx11' 
'glproto' 'lib32-libdrm' 'dri2proto' 'dri3proto' 'presentproto'
  'lib32-libxshmfence' 'lib32-libxxf86vm' 'lib32-libxdamage' 
'gcc-multilib' 'lib32-libelf' 'lib32-llvm' 'lib32-libvdpau'
@@ -13,14 +13,10 @@
 url="http://mesa3d.sourceforge.net;
 license=('custom')
 source=(https://mesa.freedesktop.org/archive/mesa-${pkgver}.tar.xz{,.sig}
-LICENSE
-glvnd.patch
-   intel-topology-query-fix-old-gens.patch)
-sha512sums=('7278bbfba9c29fe91d1959ff1a48422e917db85287460523d12ae8c6d7f49f76e9636bf4c0d8d7d89e5569b3c67135f1b23b8f6c9d52d39413d8ec22e3bb40f0'
+LICENSE)
+sha512sums=('decd74976fe866bf67fac4ae55a62d8e33ad24278dd58effe533e7d258b249f0ead848360e7e71444265184c6d9d9b04361caf0c6df99504e33599e7a0cd6c5d'
 'SKIP'
-
'f9f0d0ccf166fe6cb684478b6f1e1ab1f2850431c06aa041738563eb1808a004e52cdec823c103c9e180f03ffc083e95974d291353f0220fe52ae6d4897fecc7'
-
'3e5746dcd493bff3f04b26de6168b15d0f161de62c1c6657106b61cbb1ad4925cbf3a691d5055491e759f88dbe0362dc909e7d726f87528980662f26ceb6dcbc'
-
'a5e2ccef20edc81859255c66cb838c5244774d9d6c56dcfce2e462b6ddaa66ef7847242b050402305621c9c9e706629af30dd27c8466b6bd32d1be40cb3e53a0')
+
'f9f0d0ccf166fe6cb684478b6f1e1ab1f2850431c06aa041738563eb1808a004e52cdec823c103c9e180f03ffc083e95974d291353f0220fe52ae6d4897fecc7')
 validpgpkeys=('8703B6700E7EE06D7A39B8D6EDAE37B02CEB490D'  # Emil Velikov 

   '946D09B5E4C9845E63075FF1D961C596A7203456'  # Andres Gomez 

   'E3E8F480C52ADD73B278EE78E1ECBE07D7D70895'  # Juan Antonio 
Suárez Romero (Igalia, S.L.) "
@@ -27,15 +23,6 @@
   'A5CC9FEC93F2F837CB044912336909B6B25FADFA'  # Juan A. Suarez 
Romero 
   '71C4B75620BC75708B4BDB254C95FAAB3EB073EC') # Dylan Baker 

   
-prepare() {
-  cd mesa-${pkgver}
-
-  # libglvnd-1.2.0 support
-  patch -Np1 -i ${srcdir}/glvnd.patch
-  # Fix FS#63945
-  patch -Np1 -i ${srcdir}/intel-topology-query-fix-old-gens.patch
-}
-
 build() {
   export CC="gcc -m32"
   export CXX="g++ -m32"

Deleted: glvnd.patch
===
--- glvnd.patch 2019-10-09 18:14:20 UTC (rev 514370)
+++ glvnd.patch 2019-10-09 18:15:46 UTC (rev 514371)
@@ -1,148 +0,0 @@
-From fafd20f67dec9f5891838435ecde1dedb77ab742 Mon Sep 17 00:00:00 2001
-From: Dylan Baker 
-Date: Wed, 25 Sep 2019 23:25:27 +
-Subject: [PATCH] meson: fix logic for generating .pc files with old glvnd
-
-We want to generate PC files for non-glvnd builds and for builds with
-old glvnd, but the current logic doesn't do that, it builds them
-unconditionally, and for GLES it builds the shared libraries, which is
-also not what we want. This does not generate .pc files for gles1 or
-gles2. Which it we weren't doing before either, making this not a
-regression but a return to status-quo.o
-
-Closes: https://gitlab.freedesktop.org/mesa/mesa/issues/1838
-Fixes: 93df862b6affb6b8507e40601212a58012bfa873
-   ("meson: re-add incorrect pkg-config files with GLVND for backward 
compatibility")
-Reviewed-by: Matt Turner 

- meson.build  |  9 +
- src/egl/meson.build  | 30 --
- src/mapi/meson.build |  2 +-
- src/meson.build  |  4 ++--
- 4 files changed, 24 insertions(+), 21 deletions(-)
-
-diff --git a/meson.build b/meson.build
-index 0e46fde5edc..da4a07538df 100644
 a/meson.build
-+++ b/meson.build
-@@ -100,7 +100,7 @@ endif
- 
- # shared-glapi is required if at least two OpenGL APIs are being built
- if not with_shared_glapi
--  if ((with_gles1 == 'true' and with_gles2 == 'true') or 
-+  if ((with_gles1 == 'true' and with_gles2 == 'true') or
-   (with_gles1 == 'true' and with_opengl) or
-   (with_gles2 == 'true' and with_opengl))
- error('shared-glapi required for building two or more of OpenGL, OpenGL 
ES 1.x, OpenGL ES 2.x')
-@@ -397,7 +397,7 @@ endif
- if with_glx != 'disabled'
-   if not (with_platform_x11 

[arch-commits] Commit in lib32-mesa/trunk (3 files)

2018-09-21 Thread Laurent Carlier via arch-commits
Date: Friday, September 21, 2018 @ 18:52:44
  Author: lcarlier
Revision: 383952

upgpkg: lib32-mesa 18.2.1-1

upstream update 18.2.1

Modified:
  lib32-mesa/trunk/PKGBUILD
Deleted:
  lib32-mesa/trunk/0001-glvnd-fix-gl.pc.patch
  
lib32-mesa/trunk/0004-loader_dri3-Variant-2-Wait-for-pending-swaps-to-comp.patch

-+
 0001-glvnd-fix-gl.pc.patch  |   26 ---
 0004-loader_dri3-Variant-2-Wait-for-pending-swaps-to-comp.patch |   74 
--
 PKGBUILD|6 
 3 files changed, 3 insertions(+), 103 deletions(-)

Deleted: 0001-glvnd-fix-gl.pc.patch
===
--- 0001-glvnd-fix-gl.pc.patch  2018-09-21 18:51:46 UTC (rev 383951)
+++ 0001-glvnd-fix-gl.pc.patch  2018-09-21 18:52:44 UTC (rev 383952)
@@ -1,26 +0,0 @@
-From a9554de2a6028540fa12a7ebdab4daf2b46010fa Mon Sep 17 00:00:00 2001
-Message-Id: 

-From: Unknown <>
-Date: Tue, 15 May 2018 20:10:53 +0200
-Subject: [PATCH 1/4] glvnd: fix gl.pc
-

- src/mesa/gl.pc.in | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/src/mesa/gl.pc.in b/src/mesa/gl.pc.in
-index 181724b97b..8c7b7da8d7 100644
 a/src/mesa/gl.pc.in
-+++ b/src/mesa/gl.pc.in
-@@ -7,7 +7,7 @@ Name: gl
- Description: Mesa OpenGL library
- Requires.private: @GL_PC_REQ_PRIV@
- Version: @PACKAGE_VERSION@
--Libs: -L${libdir} -l@GL_LIB@
-+Libs: -L${libdir} -lGL
- Libs.private: @GL_PC_LIB_PRIV@
- Cflags: -I${includedir} @GL_PC_CFLAGS@
- glx_tls: @GLX_TLS@
--- 
-2.17.0
-

Deleted: 0004-loader_dri3-Variant-2-Wait-for-pending-swaps-to-comp.patch
===
--- 0004-loader_dri3-Variant-2-Wait-for-pending-swaps-to-comp.patch 
2018-09-21 18:51:46 UTC (rev 383951)
+++ 0004-loader_dri3-Variant-2-Wait-for-pending-swaps-to-comp.patch 
2018-09-21 18:52:44 UTC (rev 383952)
@@ -1,74 +0,0 @@
-From patchwork Tue May  8 09:42:05 2018
-Content-Type: text/plain; charset="utf-8"
-MIME-Version: 1.0
-Content-Transfer-Encoding: 7bit
-Subject: [Mesa-dev,
- 2/2] loader_dri3: Variant 2: Wait for pending swaps to complete
- before drawable_fini.
-From: =?utf-8?q?Michel_D=C3=A4nzer?= 
-X-Patchwork-Id: 221466
-Message-Id: 
-To: Mario Kleiner ,
- Mike Lothian 
-Cc: ML mesa-dev ,
- ML xorg-devel 
-Date: Tue, 8 May 2018 11:42:05 +0200
-
-On 2018-05-05 06:25 AM, Mario Kleiner wrote:
-> On Sat, May 5, 2018 at 4:08 AM, Mike Lothian  wrote:
->> I definately saw the steam bug with patch 1 but not with plasmashell,
->> I started seeing it with patch 2 but it seemed to fix itself
-> 
-> I had two hangs of kwin_x11 within the last 6 hours when alt-tabbing
-> between windows, where it got stuck in the
-> loader_dri3_swapbuffer_barrier() from patch 1/2. Not sure how that is
-> possible, or if the stacktrace was misleading, because i had to VT
-> switch to a text console to attach the debugger and this might be just
-> a side effect of that. But if it is true, then patch 1/2 would not be
-> it. Also 1/2 has a potential performance impact, whereas 2/2 doesn't.
-> However 2/2 would also need more work, as i can think of more complex
-> scenarios where it would filter the wrong events, although not in the
-> case of plasmashell or steam. Probably we'd need to sacrifice a few
-> sbc bits in the Present events serial field to transport a unique tag
-> for each incarnation of the loader_dri3_drawable, like a mini-hash of
-> the draw->eid. Ugly ugly...
-
-How about the below?
-
-Idle notify events shouldn't need special treatment, since the pixmap
-XIDs of the buffers will be different between loader_dri3_drawable
-incarnations, aren't they?
-
-
-This still leaves the issue that the SBC moves backwards, which could
-theoretically result in hangs with apps using glXWaitForSbcOML. Fixing
-that would probably require changing the loader_dri3_drawable lifetime
-cycle, which would probably be very invasive, if feasible at all. Maybe
-we don't need to care about that for the time being, until there's a
-real world app running into it.
-
-diff --git a/src/loader/loader_dri3_helper.c b/src/loader/loader_dri3_helper.c
-index 6db8303d26d..f0ff2f07bde 100644
 a/src/loader/loader_dri3_helper.c
-+++ b/src/loader/loader_dri3_helper.c
-@@ -370,9 +370,17 @@ dri3_handle_present_event(struct loader_dri3_drawable 
*draw,
-* checking for wrap.
-*/
-   if (ce->kind == XCB_PRESENT_COMPLETE_KIND_PIXMAP) {
-- draw->recv_sbc = (draw->send_sbc & 0xLL) | 
ce->serial;
-- if (draw->recv_sbc > draw->send_sbc)
--draw->recv_sbc -= 0x1;
-+ uint64_t recv_sbc = (draw->send_sbc & 0xLL) | 
ce->serial;
-+
-+ /* Only assume wraparound if that results in exactly the previous
-+  * SBC + 1, otherwise ignore received SBC > sent SBC (those are
-+  * probably from a previous 

[arch-commits] Commit in lib32-mesa/trunk (3 files)

2018-02-15 Thread Laurent Carlier via arch-commits
Date: Thursday, February 15, 2018 @ 14:55:32
  Author: lcarlier
Revision: 294714

upgpkg: lib32-mesa 17.3.4-1

upstream update 17.3.4

Added:
  lib32-mesa/trunk/0001-glvnd-fix-gl-dot-pc.patch
(from rev 294713, lib32-mesa/trunk/0002-glvnd-fix-gl-dot-pc.patch)
Modified:
  lib32-mesa/trunk/PKGBUILD
Deleted:
  lib32-mesa/trunk/0002-glvnd-fix-gl-dot-pc.patch

+
 0001-glvnd-fix-gl-dot-pc.patch |   12 
 0002-glvnd-fix-gl-dot-pc.patch |   12 
 PKGBUILD   |8 
 3 files changed, 16 insertions(+), 16 deletions(-)

Copied: lib32-mesa/trunk/0001-glvnd-fix-gl-dot-pc.patch (from rev 294713, 
lib32-mesa/trunk/0002-glvnd-fix-gl-dot-pc.patch)
===
--- 0001-glvnd-fix-gl-dot-pc.patch  (rev 0)
+++ 0001-glvnd-fix-gl-dot-pc.patch  2018-02-15 14:55:32 UTC (rev 294714)
@@ -0,0 +1,12 @@
+diff -up mesa-12.0.3/src/mesa/gl.pc.in.jx mesa-12.0.3/src/mesa/gl.pc.in
+--- mesa-12.0.3/src/mesa/gl.pc.in.jx   2016-01-18 02:39:26.0 -0500
 mesa-12.0.3/src/mesa/gl.pc.in  2016-10-25 13:06:44.013159358 -0400
+@@ -7,7 +7,7 @@ Name: gl
+ Description: Mesa OpenGL library
+ Requires.private: @GL_PC_REQ_PRIV@
+ Version: @PACKAGE_VERSION@
+-Libs: -L${libdir} -l@GL_LIB@
++Libs: -L${libdir} -lGL
+ Libs.private: @GL_PC_LIB_PRIV@
+ Cflags: -I${includedir} @GL_PC_CFLAGS@
+ glx_tls: @GLX_TLS@

Deleted: 0002-glvnd-fix-gl-dot-pc.patch
===
--- 0002-glvnd-fix-gl-dot-pc.patch  2018-02-15 13:58:17 UTC (rev 294713)
+++ 0002-glvnd-fix-gl-dot-pc.patch  2018-02-15 14:55:32 UTC (rev 294714)
@@ -1,12 +0,0 @@
-diff -up mesa-12.0.3/src/mesa/gl.pc.in.jx mesa-12.0.3/src/mesa/gl.pc.in
 mesa-12.0.3/src/mesa/gl.pc.in.jx   2016-01-18 02:39:26.0 -0500
-+++ mesa-12.0.3/src/mesa/gl.pc.in  2016-10-25 13:06:44.013159358 -0400
-@@ -7,7 +7,7 @@ Name: gl
- Description: Mesa OpenGL library
- Requires.private: @GL_PC_REQ_PRIV@
- Version: @PACKAGE_VERSION@
--Libs: -L${libdir} -l@GL_LIB@
-+Libs: -L${libdir} -lGL
- Libs.private: @GL_PC_LIB_PRIV@
- Cflags: -I${includedir} @GL_PC_CFLAGS@
- glx_tls: @GLX_TLS@

Modified: PKGBUILD
===
--- PKGBUILD2018-02-15 13:58:17 UTC (rev 294713)
+++ PKGBUILD2018-02-15 14:55:32 UTC (rev 294714)
@@ -5,7 +5,7 @@
 
 pkgbase=lib32-mesa
 pkgname=('lib32-vulkan-intel' 'lib32-vulkan-radeon' 'lib32-libva-mesa-driver' 
'lib32-mesa-vdpau' 'lib32-mesa')
-pkgver=17.3.3
+pkgver=17.3.4
 pkgrel=1
 arch=('x86_64')
 makedepends=('python2-mako' 'lib32-libxml2' 'lib32-expat' 'lib32-libx11' 
'glproto' 'lib32-libdrm' 'dri2proto' 'dri3proto' 'presentproto'
@@ -15,8 +15,8 @@
 license=('custom')
 source=(https://mesa.freedesktop.org/archive/mesa-${pkgver}.tar.xz{,.sig}
LICENSE
-0002-glvnd-fix-gl-dot-pc.patch)
-sha256sums=('41bac5de0ef6adc1f41a1ec0f80c19e361298ce02fa81b5f9ba4fdca33a9379b'
+0001-glvnd-fix-gl-dot-pc.patch)
+sha256sums=('71f995e233bc5df1a0dd46c980d1720106e7f82f02d61c1ca50854b5e02590d0'
 'SKIP'
 '7fdc119cf53c8ca65396ea73f6d10af641ba41ea1dd2bd44a824726e01c8b3f2'
 '64a77944a28026b066c1682c7258d02289d257b24b6f173a9f7580c48beed966')
@@ -29,7 +29,7 @@
 
   # glvnd support patches - from Fedora
   # non-upstreamed ones
-  patch -Np1 -i ../0002-glvnd-fix-gl-dot-pc.patch
+  patch -Np1 -i ../0001-glvnd-fix-gl-dot-pc.patch
 
   autoreconf -fiv
 }


[arch-commits] Commit in lib32-mesa/trunk (3 files)

2017-09-20 Thread Laurent Carlier
Date: Wednesday, September 20, 2017 @ 13:44:34
  Author: lcarlier
Revision: 258884

upgpkg: lib32-mesa 17.2.1-2

Add patch to enable swr with llvm-5.0.0

Added:
  
lib32-mesa/trunk/swr-rast-do-not-crash-on-NULL-strings-returned-by-getenv.patch
  lib32-mesa/trunk/swr-rast-remove-llvm-fence-atomics-from-generated-files.patch
Modified:
  lib32-mesa/trunk/PKGBUILD

+
 PKGBUILD   |   16 ++--
 swr-rast-do-not-crash-on-NULL-strings-returned-by-getenv.patch |   14 +++
 swr-rast-remove-llvm-fence-atomics-from-generated-files.patch  |   19 
++
 3 files changed, 45 insertions(+), 4 deletions(-)

Modified: PKGBUILD
===
--- PKGBUILD2017-09-20 13:22:08 UTC (rev 258883)
+++ PKGBUILD2017-09-20 13:44:34 UTC (rev 258884)
@@ -6,7 +6,7 @@
 pkgbase=lib32-mesa
 pkgname=('lib32-vulkan-intel' 'lib32-vulkan-radeon' 'lib32-libva-mesa-driver' 
'lib32-mesa-vdpau' 'lib32-mesa')
 pkgver=17.2.1
-pkgrel=1
+pkgrel=2
 arch=('x86_64')
 makedepends=('python2-mako' 'lib32-libxml2' 'lib32-expat' 'lib32-libx11' 
'glproto' 'lib32-libdrm' 'dri2proto' 'dri3proto' 'presentproto'
  'lib32-libxshmfence' 'lib32-libxxf86vm' 'lib32-libxdamage' 
'gcc-multilib' 'lib32-libelf' 'lib32-llvm' 'lib32-libvdpau'
@@ -15,11 +15,15 @@
 license=('custom')
 source=(https://mesa.freedesktop.org/archive/mesa-${pkgver}.tar.xz{,.sig}
LICENSE
-0002-glvnd-fix-gl-dot-pc.patch)
+0002-glvnd-fix-gl-dot-pc.patch
+swr-rast-do-not-crash-on-NULL-strings-returned-by-getenv.patch
+swr-rast-remove-llvm-fence-atomics-from-generated-files.patch)
 sha256sums=('77385d17827cff24a3bae134342234f2efe7f7f990e778109682571dbbc9ba1e'
 'SKIP'
 '7fdc119cf53c8ca65396ea73f6d10af641ba41ea1dd2bd44a824726e01c8b3f2'
-'64a77944a28026b066c1682c7258d02289d257b24b6f173a9f7580c48beed966')
+'64a77944a28026b066c1682c7258d02289d257b24b6f173a9f7580c48beed966'
+'2dcbd3b311b18e473000fb496a93a4a7a4ae9f9413aace209c0ea4aebbba715b'
+'a747e0046eab7bb9c73444549c9c63d078b11b756d2294ba9c7ee0612caf62db')
 validpgpkeys=('8703B6700E7EE06D7A39B8D6EDAE37B02CEB490D') # Emil Velikov 

 validpgpkeys+=('946D09B5E4C9845E63075FF1D961C596A7203456') # "Andres Gomez 
"
 validpgpkeys+=('E3E8F480C52ADD73B278EE78E1ECBE07D7D70895') # Juan Antonio 
Suárez Romero (Igalia, S.L.) "
@@ -31,6 +35,10 @@
   # non-upstreamed ones
   patch -Np1 -i ../0002-glvnd-fix-gl-dot-pc.patch
 
+  # swr driver
+  patch -Np1 -i 
../swr-rast-do-not-crash-on-NULL-strings-returned-by-getenv.patch
+  patch -Np1 -i 
../swr-rast-remove-llvm-fence-atomics-from-generated-files.patch
+
   autoreconf -fiv
 }
 
@@ -48,7 +56,7 @@
 --prefix=/usr \
 --sysconfdir=/etc \
 --with-dri-driverdir=/usr/lib32/xorg/modules/dri \
---with-gallium-drivers=r300,r600,radeonsi,nouveau,svga,swrast,virgl \
+--with-gallium-drivers=r300,r600,radeonsi,nouveau,svga,swrast,virgl,swr \
 --with-dri-drivers=i915,i965,r200,radeon,nouveau,swrast \
 --with-platforms=x11,drm,wayland \
 --with-vulkan-drivers=intel,radeon \

Added: swr-rast-do-not-crash-on-NULL-strings-returned-by-getenv.patch
===
--- swr-rast-do-not-crash-on-NULL-strings-returned-by-getenv.patch  
(rev 0)
+++ swr-rast-do-not-crash-on-NULL-strings-returned-by-getenv.patch  
2017-09-20 13:44:34 UTC (rev 258884)
@@ -0,0 +1,14 @@
+diff --git a/src/gallium/drivers/swr/rasterizer/core/utils.h 
b/src/gallium/drivers/swr/rasterizer/core/utils.h
+index b096d2120cb..3c849e82d3b 100644
+--- a/src/gallium/drivers/swr/rasterizer/core/utils.h
 b/src/gallium/drivers/swr/rasterizer/core/utils.h
+@@ -365,7 +365,8 @@ static INLINE std::string GetEnv(const std::string& 
variableName)
+ output.resize(valueSize - 1); // valueSize includes null, output.resize() 
does not
+ GetEnvironmentVariableA(variableName.c_str(), [0], valueSize);
+ #else
+-output = getenv(variableName.c_str());
++char *o = getenv(variableName.c_str());
++output = o ? std::string(o) : std::string();
+ #endif
+ 
+ return output;

Added: swr-rast-remove-llvm-fence-atomics-from-generated-files.patch
===
--- swr-rast-remove-llvm-fence-atomics-from-generated-files.patch   
(rev 0)
+++ swr-rast-remove-llvm-fence-atomics-from-generated-files.patch   
2017-09-20 13:44:34 UTC (rev 258884)
@@ -0,0 +1,19 @@
+diff --git a/src/gallium/drivers/swr/rasterizer/codegen/gen_llvm_ir_macros.py 
b/src/gallium/drivers/swr/rasterizer/codegen/gen_llvm_ir_macros.py
+index 025d38a..ce892a9 100644
+--- a/src/gallium/drivers/swr/rasterizer/codegen/gen_llvm_ir_macros.py
 

[arch-commits] Commit in lib32-mesa/trunk (3 files)

2017-09-08 Thread Laurent Carlier
Date: Friday, September 8, 2017 @ 09:28:19
  Author: lcarlier
Revision: 256133

upgpkg: lib32-mesa 17.1.8-2

apply upstream fix for broken video caused by glibc 2.26 dropping xlocale.h; 
FS#55244

Added:
  lib32-mesa/trunk/glibc_dropped_xlocale.h.diff
Modified:
  lib32-mesa/trunk/PKGBUILD
Deleted:
  lib32-mesa/trunk/0001-Fix-linkage-against-shared-glapi.patch

-+
 0001-Fix-linkage-against-shared-glapi.patch |   26 
 PKGBUILD|   12 +-
 glibc_dropped_xlocale.h.diff|  143 ++
 3 files changed, 152 insertions(+), 29 deletions(-)

Deleted: 0001-Fix-linkage-against-shared-glapi.patch
===
--- 0001-Fix-linkage-against-shared-glapi.patch 2017-09-08 07:34:41 UTC (rev 
256132)
+++ 0001-Fix-linkage-against-shared-glapi.patch 2017-09-08 09:28:19 UTC (rev 
256133)
@@ -1,26 +0,0 @@
-From 1b5a187c3c31513ae39cd2a917a3234c2c5f87fc Mon Sep 17 00:00:00 2001
-From: Adam Jackson 
-Date: Wed, 12 Oct 2016 13:41:33 -0400
-Subject: [PATCH] Fix linkage against shared glapi
-
-Signed-off-by: Adam Jackson 

- src/gallium/targets/osmesa/Makefile.am | 2 +-
- 1 files changed, 1 insertions(+), 1 deletions(-)
-
-diff --git a/src/gallium/targets/osmesa/Makefile.am 
b/src/gallium/targets/osmesa/Makefile.am
-index 5d39486..04add87 100644
 a/src/gallium/targets/osmesa/Makefile.am
-+++ b/src/gallium/targets/osmesa/Makefile.am
-@@ -63,7 +63,7 @@ lib@OSMESA_LIB@_la_LIBADD = \
-   $(top_builddir)/src/gallium/drivers/trace/libtrace.la \
-   $(top_builddir)/src/gallium/drivers/softpipe/libsoftpipe.la \
-   $(top_builddir)/src/gallium/state_trackers/osmesa/libosmesa.la \
--  $(top_builddir)/src/mapi/glapi/libglapi.la \
-+  $(top_builddir)/src/mapi/shared-glapi/libglapi.la \
-   $(SHARED_GLAPI_LIB) \
-   $(OSMESA_LIB_DEPS) \
-   $(CLOCK_LIB)
--- 
-2.9.3
-

Modified: PKGBUILD
===
--- PKGBUILD2017-09-08 07:34:41 UTC (rev 256132)
+++ PKGBUILD2017-09-08 09:28:19 UTC (rev 256133)
@@ -6,7 +6,7 @@
 pkgbase=lib32-mesa
 pkgname=('lib32-vulkan-intel' 'lib32-vulkan-radeon' 'lib32-libva-mesa-driver' 
'lib32-mesa-vdpau' 'lib32-mesa')
 pkgver=17.1.8
-pkgrel=1
+pkgrel=2
 arch=('x86_64')
 makedepends=('python2-mako' 'lib32-libxml2' 'lib32-expat' 'lib32-libx11' 
'glproto' 'lib32-libdrm' 'dri2proto' 'dri3proto' 'presentproto'
  'lib32-libxshmfence' 'lib32-libxxf86vm' 'lib32-libxdamage' 
'gcc-multilib' 'lib32-libelf' 'lib32-llvm' 'lib32-libvdpau'
@@ -15,11 +15,13 @@
 license=('custom')
 source=(https://mesa.freedesktop.org/archive/mesa-${pkgver}.tar.xz{,.sig}
LICENSE
-0002-glvnd-fix-gl-dot-pc.patch)
+0002-glvnd-fix-gl-dot-pc.patch
+glibc_dropped_xlocale.h.diff)
 sha256sums=('75ed2eaeae26ddd536150f294386468ae2e1a7717948c41cd14b7875be5269db'
 'SKIP'
 '7fdc119cf53c8ca65396ea73f6d10af641ba41ea1dd2bd44a824726e01c8b3f2'
-'64a77944a28026b066c1682c7258d02289d257b24b6f173a9f7580c48beed966')
+'64a77944a28026b066c1682c7258d02289d257b24b6f173a9f7580c48beed966'
+'6de2adc3dde36d098bfe9977f5052c13e1b2e80a913e4c83d520b2e5349ddbd0')
 validpgpkeys=('8703B6700E7EE06D7A39B8D6EDAE37B02CEB490D') # Emil Velikov 

 validpgpkeys+=('946D09B5E4C9845E63075FF1D961C596A7203456') # "Andres Gomez 
"
 validpgpkeys+=('E3E8F480C52ADD73B278EE78E1ECBE07D7D70895') # Juan Antonio 
Suárez Romero (Igalia, S.L.) "
@@ -31,6 +33,10 @@
   # non-upstreamed ones
   patch -Np1 -i ../0002-glvnd-fix-gl-dot-pc.patch
 
+  # glibc 2.26 dropped xlocale.h leading to corrupted video
+  # https://bugs.archlinux.org/task/55244 / 
https://bugs.freedesktop.org/show_bug.cgi?id=102454
+  patch -Np1 -i ../glibc_dropped_xlocale.h.diff
+
   autoreconf -fiv
 }
 

Added: glibc_dropped_xlocale.h.diff
===
--- glibc_dropped_xlocale.h.diff(rev 0)
+++ glibc_dropped_xlocale.h.diff2017-09-08 09:28:19 UTC (rev 256133)
@@ -0,0 +1,143 @@
+From 49b428470e28ae6ab22083e43fa41abf622f3b0d Mon Sep 17 00:00:00 2001
+From: Eric Engestrom 
+Date: Thu, 31 Aug 2017 16:55:56 +
+Subject: util: improve compiler guard
+
+Glibc 2.26 has dropped xlocale.h, but the functions needed (strtod_l()
+and strdof_l()) can be found in stdlib.h.
+Improve the detection method to allow newer builds to still make use of
+the locale-setting.
+
+Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=102454
+Cc: Laurent Carlier 
+Cc: Emil Velikov 
+Cc: Rob Herring 
+Signed-off-by: Eric Engestrom 
+Reviewed-by: Laurent Carlier 

[arch-commits] Commit in lib32-mesa/trunk (3 files)

2016-10-07 Thread Laurent Carlier
Date: Friday, October 7, 2016 @ 09:35:27
  Author: lcarlier
Revision: 191540

upgpkg: lib32-mesa 12.0.3-3

fix FS#50240 (2nd try)

Added:
  lib32-mesa/trunk/0001-loader-dri3-add-get_dri_screen-to-the-vtable.patch
  
lib32-mesa/trunk/0002-loader-dri3-import-prime-buffers-in-the-currently-bo.patch
Modified:
  lib32-mesa/trunk/PKGBUILD

-+
 0001-loader-dri3-add-get_dri_screen-to-the-vtable.patch |   91 
++
 0002-loader-dri3-import-prime-buffers-in-the-currently-bo.patch |   59 ++
 PKGBUILD|   15 +
 3 files changed, 162 insertions(+), 3 deletions(-)

Added: 0001-loader-dri3-add-get_dri_screen-to-the-vtable.patch
===
--- 0001-loader-dri3-add-get_dri_screen-to-the-vtable.patch 
(rev 0)
+++ 0001-loader-dri3-add-get_dri_screen-to-the-vtable.patch 2016-10-07 
09:35:27 UTC (rev 191540)
@@ -0,0 +1,91 @@
+From 0247e5ee3edd546b8598082d5b45d110f61853d0 Mon Sep 17 00:00:00 2001
+From: Martin Peres 
+Date: Thu, 6 Oct 2016 17:07:22 +0300
+Subject: [PATCH 1/2] loader/dri3: add get_dri_screen() to the vtable
+
+This allows querying the current active screen from the
+loader's common code.
+
+Cc: mesa-sta...@lists.freedesktop.org
+Reviewed-by: Emil Velikov 
+Signed-off-by: Martin Peres 
+---
+ src/egl/drivers/dri2/platform_x11_dri3.c | 12 
+ src/glx/dri3_glx.c   | 11 +++
+ src/loader/loader_dri3_helper.h  |  1 +
+ 3 files changed, 24 insertions(+)
+
+diff --git a/src/egl/drivers/dri2/platform_x11_dri3.c 
b/src/egl/drivers/dri2/platform_x11_dri3.c
+index 31649fe..d93f5bc 100644
+--- a/src/egl/drivers/dri2/platform_x11_dri3.c
 b/src/egl/drivers/dri2/platform_x11_dri3.c
+@@ -103,6 +103,17 @@ egl_dri3_get_dri_context(struct loader_dri3_drawable 
*draw)
+return dri2_ctx->dri_context;
+ }
+ 
++static __DRIscreen *
++egl_dri3_get_dri_screen(struct loader_dri3_drawable *draw)
++{
++   _EGLContext *ctx = _eglGetCurrentContext();
++   struct dri2_egl_context *dri2_ctx;
++   if (!ctx)
++  return NULL;
++   dri2_ctx = dri2_egl_context(ctx);
++   return dri2_egl_display(dri2_ctx->base.Resource.Display)->dri_screen;
++}
++
+ static void
+ egl_dri3_flush_drawable(struct loader_dri3_drawable *draw, unsigned flags)
+ {
+@@ -119,6 +130,7 @@ static struct loader_dri3_vtable egl_dri3_vtable = {
+.set_drawable_size = egl_dri3_set_drawable_size,
+.in_current_context = egl_dri3_in_current_context,
+.get_dri_context = egl_dri3_get_dri_context,
++   .get_dri_screen = egl_dri3_get_dri_screen,
+.flush_drawable = egl_dri3_flush_drawable,
+.show_fps = NULL,
+ };
+diff --git a/src/glx/dri3_glx.c b/src/glx/dri3_glx.c
+index 90d7bba..51b6b1c 100644
+--- a/src/glx/dri3_glx.c
 b/src/glx/dri3_glx.c
+@@ -132,6 +132,16 @@ glx_dri3_get_dri_context(struct loader_dri3_drawable 
*draw)
+return (gc != ) ? dri3Ctx->driContext : NULL;
+ }
+ 
++static __DRIscreen *
++glx_dri3_get_dri_screen(struct loader_dri3_drawable *draw)
++{
++   struct glx_context *gc = __glXGetCurrentContext();
++   struct dri3_context *pcp = (struct dri3_context *) gc;
++   struct dri3_screen *psc = (struct dri3_screen *) pcp->base.psc;
++
++   return (gc !=  && psc) ? psc->driScreen : NULL;
++}
++
+ static void
+ glx_dri3_flush_drawable(struct loader_dri3_drawable *draw, unsigned flags)
+ {
+@@ -169,6 +179,7 @@ static struct loader_dri3_vtable glx_dri3_vtable = {
+.set_drawable_size = glx_dri3_set_drawable_size,
+.in_current_context = glx_dri3_in_current_context,
+.get_dri_context = glx_dri3_get_dri_context,
++   .get_dri_screen = glx_dri3_get_dri_screen,
+.flush_drawable = glx_dri3_flush_drawable,
+.show_fps = glx_dri3_show_fps,
+ };
+diff --git a/src/loader/loader_dri3_helper.h b/src/loader/loader_dri3_helper.h
+index 5b8fd1d..658e190 100644
+--- a/src/loader/loader_dri3_helper.h
 b/src/loader/loader_dri3_helper.h
+@@ -103,6 +103,7 @@ struct loader_dri3_vtable {
+void (*set_drawable_size)(struct loader_dri3_drawable *, int, int);
+bool (*in_current_context)(struct loader_dri3_drawable *);
+__DRIcontext *(*get_dri_context)(struct loader_dri3_drawable *);
++   __DRIscreen *(*get_dri_screen)(struct loader_dri3_drawable *);
+void (*flush_drawable)(struct loader_dri3_drawable *, unsigned);
+void (*show_fps)(struct loader_dri3_drawable *, uint64_t);
+ };
+-- 
+2.10.0
+

Added: 0002-loader-dri3-import-prime-buffers-in-the-currently-bo.patch
===
--- 0002-loader-dri3-import-prime-buffers-in-the-currently-bo.patch 
(rev 0)
+++ 0002-loader-dri3-import-prime-buffers-in-the-currently-bo.patch 
2016-10-07 09:35:27 UTC (rev 191540)
@@ -0,0 +1,59 @@
+From 

[arch-commits] Commit in lib32-mesa/trunk (3 files)

2016-07-24 Thread Laurent Carlier
Date: Sunday, July 24, 2016 @ 07:34:02
  Author: lcarlier
Revision: 183898

upgpkg: lib32-mesa 12.0.1-2

fix memory leak (FS#50131)

Added:
  lib32-mesa/trunk/0001-st-mesa-fix-reference-counting-bug-in-st_vdpau.patch
  lib32-mesa/trunk/0002-vl-dri3-fix-a-memory-leak-from-front-buffer.patch
Modified:
  lib32-mesa/trunk/PKGBUILD

---+
 0001-st-mesa-fix-reference-counting-bug-in-st_vdpau.patch |   76 
 0002-vl-dri3-fix-a-memory-leak-from-front-buffer.patch|   38 ++
 PKGBUILD  |   14 +-
 3 files changed, 125 insertions(+), 3 deletions(-)

Added: 0001-st-mesa-fix-reference-counting-bug-in-st_vdpau.patch
===
--- 0001-st-mesa-fix-reference-counting-bug-in-st_vdpau.patch   
(rev 0)
+++ 0001-st-mesa-fix-reference-counting-bug-in-st_vdpau.patch   2016-07-24 
07:34:02 UTC (rev 183898)
@@ -0,0 +1,76 @@
+From 9ce52baf7f479d506bcea17a371dcf2fad92f139 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Christian=20K=C3=B6nig?= 
+Date: Wed, 13 Jul 2016 14:54:31 +0200
+Subject: [PATCH] st/mesa: fix reference counting bug in st_vdpau
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Otherwise we leak the resources created for the DMA-buf descriptors.
+
+Signed-off-by: Christian König 
+Cc: 12.0 
+Tested-and-Reviewed by: Leo Liu 
+Ack-by: Tom St Denis 
+---
+ src/mesa/state_tracker/st_vdpau.c | 10 --
+ 1 file changed, 8 insertions(+), 2 deletions(-)
+
+diff --git a/src/mesa/state_tracker/st_vdpau.c 
b/src/mesa/state_tracker/st_vdpau.c
+index dffa52f..4f599dd 100644
+--- a/src/mesa/state_tracker/st_vdpau.c
 b/src/mesa/state_tracker/st_vdpau.c
+@@ -65,6 +65,7 @@ st_vdpau_video_surface_gallium(struct gl_context *ctx, const 
void *vdpSurface,
+ 
+struct pipe_video_buffer *buffer;
+struct pipe_sampler_view **samplers;
++   struct pipe_resource *res = NULL;
+ 
+getProcAddr = (void *)ctx->vdpGetProcAddress;
+if (getProcAddr(device, VDP_FUNC_ID_VIDEO_SURFACE_GALLIUM, (void**)))
+@@ -82,7 +83,8 @@ st_vdpau_video_surface_gallium(struct gl_context *ctx, const 
void *vdpSurface,
+if (!sv)
+   return NULL;
+ 
+-   return sv->texture;
++   pipe_resource_reference(, sv->texture);
++   return res;
+ }
+ 
+ static struct pipe_resource *
+@@ -90,13 +92,15 @@ st_vdpau_output_surface_gallium(struct gl_context *ctx, 
const void *vdpSurface)
+ {
+int (*getProcAddr)(uint32_t device, uint32_t id, void **ptr);
+uint32_t device = (uintptr_t)ctx->vdpDevice;
++   struct pipe_resource *res = NULL;
+VdpOutputSurfaceGallium *f;
+ 
+getProcAddr = (void *)ctx->vdpGetProcAddress;
+if (getProcAddr(device, VDP_FUNC_ID_OUTPUT_SURFACE_GALLIUM, (void**)))
+   return NULL;
+ 
+-   return f((uintptr_t)vdpSurface);
++   pipe_resource_reference(, f((uintptr_t)vdpSurface));
++   return res;
+ }
+ 
+ static struct pipe_resource *
+@@ -208,6 +212,7 @@ st_vdpau_map_surface(struct gl_context *ctx, GLenum 
target, GLenum access,
+/* do we have different screen objects ? */
+if (res->screen != st->pipe->screen) {
+   _mesa_error(ctx, GL_INVALID_OPERATION, "VDPAUMapSurfacesNV");
++  pipe_resource_reference(, NULL);
+   return;
+}
+ 
+@@ -241,6 +246,7 @@ st_vdpau_map_surface(struct gl_context *ctx, GLenum 
target, GLenum access,
+stObj->surface_format = res->format;
+ 
+_mesa_dirty_texobj(ctx, texObj);
++   pipe_resource_reference(, NULL);
+ }
+ 
+ static void
+-- 
+2.9.0
+

Added: 0002-vl-dri3-fix-a-memory-leak-from-front-buffer.patch
===
--- 0002-vl-dri3-fix-a-memory-leak-from-front-buffer.patch  
(rev 0)
+++ 0002-vl-dri3-fix-a-memory-leak-from-front-buffer.patch  2016-07-24 
07:34:02 UTC (rev 183898)
@@ -0,0 +1,38 @@
+From 134d6e4e4f980d738361bfcae1daedb8cc58b5df Mon Sep 17 00:00:00 2001
+From: Leo Liu 
+Date: Thu, 14 Jul 2016 09:19:59 -0400
+Subject: [PATCH] vl/dri3: fix a memory leak from front buffer
+
+Inspired by fix for mem leak of vdpau interop, resource_from_handle
+set texture reference count, that need to be decreased and released,
+recall there is a similar case for DRI3, that is with VA-API glx
+extension, there is temporary TFP(texture from pixmap), we target it
+through dma-buf. leak happens when without count down the reference.
+
+Checked and found with mpv vo=opengl case, there only one static TFP,
+the leak happens once, but for totem player using gstreamer VA-API glx,
+the dynamic TFP for each frame, so leak quite a bit.
+
+This fixes mem leak for mpv and totem.
+
+Signed-off-by: Leo Liu 
+Cc: "12.0" 
+---
+ 

[arch-commits] Commit in lib32-mesa/trunk (3 files)

2013-07-01 Thread Laurent Carlier
Date: Tuesday, July 2, 2013 @ 01:11:26
  Author: lcarlier
Revision: 93325

upgpkg: lib32-mesa 9.1.4-1

Sync with extra

Modified:
  lib32-mesa/trunk/PKGBUILD
Deleted:
  lib32-mesa/trunk/CVE-2013-1993.patch
  lib32-mesa/trunk/git-fixes.patch

-+
 CVE-2013-1993.patch |   82 --
 PKGBUILD|   17 ++
 git-fixes.patch |   52 ---
 3 files changed, 4 insertions(+), 147 deletions(-)

Deleted: CVE-2013-1993.patch
===
--- CVE-2013-1993.patch 2013-07-01 22:56:17 UTC (rev 93324)
+++ CVE-2013-1993.patch 2013-07-01 23:11:26 UTC (rev 93325)
@@ -1,82 +0,0 @@
-From 80ac3b279e776b3d9f45a209e52c5bd34ba7e7df Mon Sep 17 00:00:00 2001
-From: Alan Coopersmith alan.coopersm...@oracle.com
-Date: Fri, 26 Apr 2013 23:31:58 +
-Subject: integer overflow in XF86DRIOpenConnection() [CVE-2013-1993 1/2]
-
-busIdStringLength is a CARD32 and needs to be bounds checked before adding
-one to it to come up with the total size to allocate, to avoid integer
-overflow leading to underallocation and writing data from the network past
-the end of the allocated buffer.
-
-NOTE: This is a candidate for stable release branches.
-
-Reported-by: Ilja Van Sprundel ivansprun...@ioactive.com
-Signed-off-by: Alan Coopersmith alan.coopersm...@oracle.com
-Reviewed-by: Brian Paul bri...@vmware.com
-(cherry picked from commit 2e5a268f18be30df15aed0b44b01a18a37fb5df4)

-diff --git a/src/glx/XF86dri.c b/src/glx/XF86dri.c
-index b1cdc9b..8f53bd7 100644
 a/src/glx/XF86dri.c
-+++ b/src/glx/XF86dri.c
-@@ -43,6 +43,7 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- #include X11/extensions/Xext.h
- #include X11/extensions/extutil.h
- #include xf86dristr.h
-+#include limits.h
- 
- static XExtensionInfo _xf86dri_info_data;
- static XExtensionInfo *xf86dri_info = _xf86dri_info_data;
-@@ -201,7 +202,11 @@ XF86DRIOpenConnection(Display * dpy, int screen, 
drm_handle_t * hSAREA,
-}
- 
-if (rep.length) {
--  if (!(*busIdString = calloc(rep.busIdStringLength + 1, 1))) {
-+  if (rep.busIdStringLength  INT_MAX)
-+ *busIdString = calloc(rep.busIdStringLength + 1, 1);
-+  else
-+ *busIdString = NULL;
-+  if (*busIdString == NULL) {
-  _XEatData(dpy, ((rep.busIdStringLength + 3)  ~3));
-  UnlockDisplay(dpy);
-  SyncHandle();
---
-cgit v0.9.0.2-2-gbebe
-From 6de60ddf9ccac6f185d8f4e88ddfc63a94bd670f Mon Sep 17 00:00:00 2001
-From: Alan Coopersmith alan.coopersm...@oracle.com
-Date: Fri, 26 Apr 2013 23:33:03 +
-Subject: integer overflow in XF86DRIGetClientDriverName() [CVE-2013-1993 2/2]
-
-clientDriverNameLength is a CARD32 and needs to be bounds checked before
-adding one to it to come up with the total size to allocate, to avoid
-integer overflow leading to underallocation and writing data from the
-network past the end of the allocated buffer.
-
-NOTE: This is a candidate for stable release branches.
-
-Reported-by: Ilja Van Sprundel ivansprun...@ioactive.com
-Signed-off-by: Alan Coopersmith alan.coopersm...@oracle.com
-Reviewed-by: Brian Paul bri...@vmware.com
-(cherry picked from commit 306f630e676eb901789dd09a0f30d7e7fa941ebe)

-diff --git a/src/glx/XF86dri.c b/src/glx/XF86dri.c
-index 8f53bd7..56e3557 100644
 a/src/glx/XF86dri.c
-+++ b/src/glx/XF86dri.c
-@@ -305,9 +305,11 @@ XF86DRIGetClientDriverName(Display * dpy, int screen,
-*ddxDriverPatchVersion = rep.ddxDriverPatchVersion;
- 
-if (rep.length) {
--  if (!
--  (*clientDriverName =
--   calloc(rep.clientDriverNameLength + 1, 1))) {
-+  if (rep.clientDriverNameLength  INT_MAX)
-+ *clientDriverName = calloc(rep.clientDriverNameLength + 1, 1);
-+  else
-+ *clientDriverName = NULL;
-+  if (*clientDriverName == NULL) {
-  _XEatData(dpy, ((rep.clientDriverNameLength + 3)  ~3));
-  UnlockDisplay(dpy);
-  SyncHandle();
---
-cgit v0.9.0.2-2-gbebe

Modified: PKGBUILD
===
--- PKGBUILD2013-07-01 22:56:17 UTC (rev 93324)
+++ PKGBUILD2013-07-01 23:11:26 UTC (rev 93325)
@@ -4,26 +4,17 @@
 
 pkgbase=lib32-mesa
 pkgname=('lib32-ati-dri' 'lib32-intel-dri' 'lib32-nouveau-dri' 'lib32-mesa' 
'lib32-mesa-libgl')
-pkgver=9.1.3
-pkgrel=3
+pkgver=9.1.4
+pkgrel=1
 arch=('x86_64')
 makedepends=('python2' 'lib32-libxml2' 'lib32-expat' 'lib32-libx11' 'glproto' 
'lib32-libdrm' 'dri2proto' 'lib32-libxxf86vm' 'lib32-libxdamage'
  'gcc-multilib' 'lib32-llvm-amdgpu-snapshot' 'lib32-systemd')
 url=http://mesa3d.sourceforge.net;
 license=('custom')
 options=('!libtool')
-source=(ftp://ftp.freedesktop.org/pub/mesa/${pkgver}/MesaLib-${pkgver}.tar.bz2
-CVE-2013-1993.patch)
-md5sums=('952ccd03547ed72333b64e1746cf8ada'
- 'dc8dad7c9bc6a92bd9c33b27b9da825e')