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

2020-04-28 Thread Jan Steffens via arch-commits
Date: Tuesday, April 28, 2020 @ 16:51:26
  Author: heftig
Revision: 381793

20.0.5-2

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

--+
 0001-egl-allow-INVALID-format-for-linux_dmabuf.patch |   84 +
 0002-egl-wayland-Fix-zwp_linux_dmabuf-usage.patch|   71 ++
 PKGBUILD |   15 ++-
 3 files changed, 169 insertions(+), 1 deletion(-)

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-28 
16:51:26 UTC (rev 381793)
@@ -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-28 16:51:26 UTC 
(rev 381793)
@@ -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 zwp_linux_dmabuf_v1 are the same.
+
+get_back_bo() handles this by falling back from 

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

2019-10-09 Thread Laurent Carlier via arch-commits
Date: Wednesday, October 9, 2019 @ 17:48:17
  Author: lcarlier
Revision: 364275

upgpkg: mesa 19.2.0-4

upstream update 19.2.1

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

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

Modified: PKGBUILD
===
--- PKGBUILD2019-10-09 17:48:13 UTC (rev 364274)
+++ PKGBUILD2019-10-09 17:48:17 UTC (rev 364275)
@@ -5,7 +5,7 @@
 pkgname=('vulkan-mesa-layer' 'opencl-mesa' 'vulkan-intel' 'vulkan-radeon' 
'libva-mesa-driver' 'mesa-vdpau' 'mesa')
 pkgdesc="An open-source implementation of the OpenGL specification"
 pkgver=19.2.0
-pkgrel=3
+pkgrel=4
 arch=('x86_64')
 makedepends=('python-mako' 'libxml2' 'libx11' 'glproto' 'libdrm' 'dri2proto' 
'dri3proto' 'presentproto' 
  'libxshmfence' 'libxxf86vm' 'libxdamage' 'libvdpau' 'libva' 
'wayland' 'wayland-protocols'
@@ -14,14 +14,10 @@
 url="https://www.mesa3d.org/;
 license=('custom')
 source=(https://mesa.freedesktop.org/archive/mesa-${pkgver}.tar.xz{,.sig}
-LICENSE
-glvnd.patch
-   intel-topology-query-fix-old-gens.patch)
+LICENSE)
 
sha512sums=('7278bbfba9c29fe91d1959ff1a48422e917db85287460523d12ae8c6d7f49f76e9636bf4c0d8d7d89e5569b3c67135f1b23b8f6c9d52d39413d8ec22e3bb40f0'
 'SKIP'
-
'f9f0d0ccf166fe6cb684478b6f1e1ab1f2850431c06aa041738563eb1808a004e52cdec823c103c9e180f03ffc083e95974d291353f0220fe52ae6d4897fecc7'
-
'3e5746dcd493bff3f04b26de6168b15d0f161de62c1c6657106b61cbb1ad4925cbf3a691d5055491e759f88dbe0362dc909e7d726f87528980662f26ceb6dcbc'
-
'a5e2ccef20edc81859255c66cb838c5244774d9d6c56dcfce2e462b6ddaa66ef7847242b050402305621c9c9e706629af30dd27c8466b6bd32d1be40cb3e53a0')
+
'f9f0d0ccf166fe6cb684478b6f1e1ab1f2850431c06aa041738563eb1808a004e52cdec823c103c9e180f03ffc083e95974d291353f0220fe52ae6d4897fecc7')
 validpgpkeys=('8703B6700E7EE06D7A39B8D6EDAE37B02CEB490D'  # Emil Velikov 

   '946D09B5E4C9845E63075FF1D961C596A7203456'  # Andres Gomez 

   'E3E8F480C52ADD73B278EE78E1ECBE07D7D70895'  # Juan Antonio 
Suárez Romero (Igalia, S.L.) 
@@ -28,15 +24,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() {
   arch-meson mesa-$pkgver build \
 -D b_lto=false \

Deleted: glvnd.patch
===
--- glvnd.patch 2019-10-09 17:48:13 UTC (rev 364274)
+++ glvnd.patch 2019-10-09 17:48:17 UTC (rev 364275)
@@ -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 and with_any_opengl)
- error('Cannot build GLX support without X11 platform support and at least 
one OpenGL API')
--  elif with_glx == 'gallium-xlib' 
-+  elif with_glx == 'gallium-xlib'
-   

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

2018-09-21 Thread Laurent Carlier via arch-commits
Date: Friday, September 21, 2018 @ 18:42:22
  Author: lcarlier
Revision: 335194

upgpkg: mesa 18.2.1-1

upstream update 18.2.1

Modified:
  mesa/trunk/PKGBUILD
Deleted:
  mesa/trunk/0001-glvnd-fix-gl.pc.patch
  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|9 -
 3 files changed, 3 insertions(+), 106 deletions(-)

Deleted: 0001-glvnd-fix-gl.pc.patch
===
--- 0001-glvnd-fix-gl.pc.patch  2018-09-21 18:38:17 UTC (rev 335193)
+++ 0001-glvnd-fix-gl.pc.patch  2018-09-21 18:42:22 UTC (rev 335194)
@@ -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:38:17 UTC (rev 335193)
+++ 0004-loader_dri3-Variant-2-Wait-for-pending-swaps-to-comp.patch 
2018-09-21 18:42:22 UTC (rev 335194)
@@ -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 loader_dri3_drawable instance) 

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

2018-04-18 Thread Evangelos Foutras via arch-commits
Date: Wednesday, April 18, 2018 @ 17:07:07
  Author: foutrelis
Revision: 322189

upgpkg: mesa 18.0.1-1

New upstream release.

Modified:
  mesa/trunk/PKGBUILD
Deleted:
  mesa/trunk/0001-meson-fix-megadriver-symlinking.patch
  mesa/trunk/0002-meson-Set-.so-version-for-xa-like-autotools-does.patch

-+
 0001-meson-fix-megadriver-symlinking.patch  |   34 -
 0002-meson-Set-.so-version-for-xa-like-autotools-does.patch |   59 --
 PKGBUILD|   12 --
 3 files changed, 3 insertions(+), 102 deletions(-)

Deleted: 0001-meson-fix-megadriver-symlinking.patch
===
--- 0001-meson-fix-megadriver-symlinking.patch  2018-04-18 14:58:52 UTC (rev 
322188)
+++ 0001-meson-fix-megadriver-symlinking.patch  2018-04-18 17:07:07 UTC (rev 
322189)
@@ -1,34 +0,0 @@
-From ac8faf2b14ed1c9ce518eddfc9c5098b6f9c74dd Mon Sep 17 00:00:00 2001
-Message-Id: 

-From: Dylan Baker 
-Date: Wed, 4 Apr 2018 10:23:02 -0700
-Subject: [PATCH 1/5] meson: fix megadriver symlinking
-
-Which should be relative instead of absolute.
-
-Fixes: f7f1b30f81e842db6057591470ce3cb6d4fb2795
-   ("meson: extend install_megadrivers script to handle symmlinking")
-Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=105567
-Signed-off-by: Dylan Baker 
-Reviewed-and-Tested-by: Eric Engestrom 
-Reviewed-by: Emil Velikov 

- bin/install_megadrivers.py | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/bin/install_megadrivers.py b/bin/install_megadrivers.py
-index 86bfa35918..7931a544bd 100755
 a/bin/install_megadrivers.py
-+++ b/bin/install_megadrivers.py
-@@ -58,7 +58,7 @@ def main():
- while ext != '.so':
- if os.path.exists(name):
- os.unlink(name)
--os.symlink(driver, name)
-+os.symlink(each, name)
- name, ext = os.path.splitext(name)
- finally:
- os.chdir(ret)
--- 
-2.16.2
-

Deleted: 0002-meson-Set-.so-version-for-xa-like-autotools-does.patch
===
--- 0002-meson-Set-.so-version-for-xa-like-autotools-does.patch 2018-04-18 
14:58:52 UTC (rev 322188)
+++ 0002-meson-Set-.so-version-for-xa-like-autotools-does.patch 2018-04-18 
17:07:07 UTC (rev 322189)
@@ -1,59 +0,0 @@
-From bc13bd64008dc32586a0b4d41189b74a2ab27265 Mon Sep 17 00:00:00 2001
-Message-Id: 

-In-Reply-To: 

-References: 

-From: Dylan Baker 
-Date: Wed, 4 Apr 2018 10:53:16 -0700
-Subject: [PATCH 2/5] meson: Set .so version for xa like autotools does
-
-Fixes: 0ba909f0f111824223bc38563d1a6bc73e69c2cc
-   ("meson: build gallium xa state tracker")
-Signed-off-by: Dylan Baker 
-Reviewed-by: Eric Engestrom 
-Reviewed-by: Emil Velikov 

- src/gallium/targets/xa/meson.build | 4 +++-
- 1 file changed, 3 insertions(+), 1 deletion(-)
-
-diff --git a/src/gallium/targets/xa/meson.build 
b/src/gallium/targets/xa/meson.build
-index ea6e1296da..733ef54ff8 100644
 a/src/gallium/targets/xa/meson.build
-+++ b/src/gallium/targets/xa/meson.build
-@@ -30,31 +30,33 @@ if with_ld_version_script
-   xa_link_depends += files('xa.sym')
- endif
- 
-+_xa_version = '.'.join(xa_version)
- 
- libxatracker = shared_library(
-   'xatracker',
-   'target.c',
-   c_args : c_vis_args,
-   cpp_args : cpp_vis_args,
-   link_args : [xa_link_args, ld_args_gc_sections],
-   include_directories : [
- inc_common, inc_util, inc_gallium_winsys, inc_gallium_drivers,
-   ],
-   link_whole : [libxa_st],
-   link_with : [
- libgalliumvl_stub, libgallium, libmesa_util, libpipe_loader_static,
- libws_null, libwsw, libswdri, libswkmsdri,
-   ],
-   link_depends : xa_link_depends,
-   dependencies : [
- dep_thread, driver_nouveau, driver_i915, driver_svga, driver_freedreno,
-   ],
-+  version : _xa_version,
-   install : true,
- )
- 
- pkg.generate(
-   name : 'xatracker',
-   description : 'Xorg gallium3D acceleration library',
--  version : '.'.join(xa_version),
-+  version : _xa_version,
-   libraries : libxatracker,
- )
--- 
-2.16.2
-

Modified: PKGBUILD
===
--- PKGBUILD2018-04-18 14:58:52 UTC (rev 322188)
+++ PKGBUILD2018-04-18 17:07:07 UTC (rev 322189)
@@ -5,8 +5,8 @@
 pkgbase=mesa
 pkgname=('opencl-mesa' 'vulkan-intel' 

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

2016-10-07 Thread Laurent Carlier
Date: Friday, October 7, 2016 @ 09:21:18
  Author: lcarlier
Revision: 277865

upgpkg: mesa 12.0.3-3

fix FS#50240 (2nd try)

Added:
  mesa/trunk/0001-loader-dri3-add-get_dri_screen-to-the-vtable.patch
  mesa/trunk/0002-loader-dri3-import-prime-buffers-in-the-currently-bo.patch
Modified:
  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:21:18 UTC (rev 277865)
@@ -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:21:18 UTC (rev 277865)
@@ -0,0 +1,59 @@
+From 

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

2016-07-24 Thread Laurent Carlier
Date: Sunday, July 24, 2016 @ 07:22:21
  Author: lcarlier
Revision: 272433

upgpkg: mesa 12.0.1-2

fix memory leak (FS#50131)

Added:
  mesa/trunk/0001-st-mesa-fix-reference-counting-bug-in-st_vdpau.patch
  mesa/trunk/0002-vl-dri3-fix-a-memory-leak-from-front-buffer.patch
Modified:
  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:22:21 UTC (rev 272433)
@@ -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:22:21 UTC (rev 272433)
@@ -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" 
+---
+ src/gallium/auxiliary/vl/vl_winsys_dri3.c | 1 +

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

2014-09-10 Thread Evangelos Foutras
Date: Wednesday, September 10, 2014 @ 23:09:47
  Author: foutrelis
Revision: 221414

upgpkg: mesa 10.2.7-3

Possible fix for FS#41918.

Added:
  mesa/trunk/0001-gallivm-Disable-workaround-for-PR12833-on-LLVM-3.2.patch
  mesa/trunk/0002-gallivm-set-mcpu-when-initializing-llvm-execution-en.patch
Modified:
  mesa/trunk/PKGBUILD

-+
 0001-gallivm-Disable-workaround-for-PR12833-on-LLVM-3.2.patch   |   33 
 0002-gallivm-set-mcpu-when-initializing-llvm-execution-en.patch |   77 
++
 PKGBUILD|   11 +
 3 files changed, 120 insertions(+), 1 deletion(-)

Added: 0001-gallivm-Disable-workaround-for-PR12833-on-LLVM-3.2.patch
===
--- 0001-gallivm-Disable-workaround-for-PR12833-on-LLVM-3.2.patch   
(rev 0)
+++ 0001-gallivm-Disable-workaround-for-PR12833-on-LLVM-3.2.patch   
2014-09-10 21:09:47 UTC (rev 221414)
@@ -0,0 +1,33 @@
+From 22c970946535956abac321585598425ad5cc82c5 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Jos=C3=A9=20Fonseca?= jfons...@vmware.com
+Date: Wed, 14 May 2014 12:55:50 +0100
+Subject: [PATCH 1/2] gallivm: Disable workaround for PR12833 on LLVM 3.2+.
+
+Fixed upstream.
+
+(cherry picked from commit 172ef0c5a5a97c211702eb4033eeaac20993350e)
+---
+ src/gallium/auxiliary/gallivm/lp_bld_misc.cpp | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/src/gallium/auxiliary/gallivm/lp_bld_misc.cpp 
b/src/gallium/auxiliary/gallivm/lp_bld_misc.cpp
+index d85adfb..45c985d 100644
+--- a/src/gallium/auxiliary/gallivm/lp_bld_misc.cpp
 b/src/gallium/auxiliary/gallivm/lp_bld_misc.cpp
+@@ -321,11 +321,11 @@ 
lp_build_create_jit_compiler_for_module(LLVMExecutionEngineRef *OutJIT,
+builder.setJITMemoryManager(JITMemoryManager::CreateDefaultMemManager());
+ 
+ExecutionEngine *JIT;
+-#if 0
++#if HAVE_LLVM = 0x0302
+JIT = builder.create();
+ #else
+/*
+-* Workaround http://llvm.org/bugs/show_bug.cgi?id=12833
++* Workaround http://llvm.org/PR12833
+ */
+StringRef MArch = ;
+StringRef MCPU = ;
+-- 
+2.1.0
+

Added: 0002-gallivm-set-mcpu-when-initializing-llvm-execution-en.patch
===
--- 0002-gallivm-set-mcpu-when-initializing-llvm-execution-en.patch 
(rev 0)
+++ 0002-gallivm-set-mcpu-when-initializing-llvm-execution-en.patch 
2014-09-10 21:09:47 UTC (rev 221414)
@@ -0,0 +1,77 @@
+From ebe30fd4d4a90219431b6947f233473b2cf518a5 Mon Sep 17 00:00:00 2001
+From: Roland Scheidegger srol...@vmware.com
+Date: Thu, 19 Jun 2014 03:27:26 +0200
+Subject: [PATCH 2/2] gallivm: set mcpu when initializing llvm execution engine
+
+Previously llvm detected cpu features automatically when the execution engine
+was created (based on host cpu). This is no longer the case, which meant llvm
+was then not able to emit some of the intrinsics we used as we didn't specify
+any sse attributes (only on avx supporting systems this was not a problem since
+despite at least some llvm versions enabling it anyway we always set this
+manually). So, instead of trying to figure out which MAttrs to set just set
+MCPU.
+
+This fixes https://bugs.freedesktop.org/show_bug.cgi?id=77493.
+
+Reviewed-by: Jose Fonseca jfons...@vmware.com
+Tested-by: Vinson Lee v...@freedesktop.org
+(cherry picked from commit cad60420d5ea36a4b6fa2e6c91317f71423aa63e)
+---
+ src/gallium/auxiliary/gallivm/lp_bld_misc.cpp | 24 ++--
+ 1 file changed, 22 insertions(+), 2 deletions(-)
+
+diff --git a/src/gallium/auxiliary/gallivm/lp_bld_misc.cpp 
b/src/gallium/auxiliary/gallivm/lp_bld_misc.cpp
+index 45c985d..395ac7b 100644
+--- a/src/gallium/auxiliary/gallivm/lp_bld_misc.cpp
 b/src/gallium/auxiliary/gallivm/lp_bld_misc.cpp
+@@ -59,6 +59,7 @@
+ #include llvm/ExecutionEngine/JITMemoryManager.h
+ #endif
+ #include llvm/Support/CommandLine.h
++#include llvm/Support/Host.h
+ #include llvm/Support/PrettyStackTrace.h
+ 
+ #if HAVE_LLVM = 0x0300
+@@ -309,8 +310,8 @@ 
lp_build_create_jit_compiler_for_module(LLVMExecutionEngineRef *OutJIT,
+   /*
+* AVX feature is not automatically detected from CPUID by the X86 
target
+* yet, because the old (yet default) JIT engine is not capable of
+-   * emitting the opcodes.  But as we're using MCJIT here, it is safe to
+-   * add set this attribute.
++   * emitting the opcodes. On newer llvm versions it is and at least some
++   * versions (tested with 3.3) will emit avx opcodes without this anyway.
+*/
+   MAttrs.push_back(+avx);
+   if (util_cpu_caps.has_f16c) {
+@@ -318,9 +319,28 @@ 
lp_build_create_jit_compiler_for_module(LLVMExecutionEngineRef *OutJIT,
+   }
+   builder.setMAttrs(MAttrs);
+}
++
++#if HAVE_LLVM = 0x0305
++   StringRef MCPU = llvm::sys::getHostCPUName();
++   /*
++* The cpu 

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

2013-07-12 Thread Andreas Radke
Date: Friday, July 12, 2013 @ 15:09:24
  Author: andyrtr
Revision: 189980

upgpkg: mesa 9.1.4-5

revert back to llvm 3.2 - mesa 9.1 isn't meant to run with any later llvm 
version; add pending fixes from stable branch

Added:
  mesa/trunk/git_fixes.patch
Modified:
  mesa/trunk/PKGBUILD
Deleted:
  mesa/trunk/MesaLib-9.1.4-llvm_fixes-1.patch

--+
 MesaLib-9.1.4-llvm_fixes-1.patch |   72 -
 PKGBUILD |   14 -
 git_fixes.patch  |  476 +
 3 files changed, 483 insertions(+), 79 deletions(-)

Deleted: MesaLib-9.1.4-llvm_fixes-1.patch
===
--- MesaLib-9.1.4-llvm_fixes-1.patch2013-07-12 06:44:58 UTC (rev 189979)
+++ MesaLib-9.1.4-llvm_fixes-1.patch2013-07-12 13:09:24 UTC (rev 189980)
@@ -1,72 +0,0 @@
-Submitted By:Armin K. krejzi at email dot com
-Date:2013-07-02
-Initial Package Version: 9.1.4
-Upstream Status: Fixed upstream
-Origin:  Upstream
-Description: Fixes building with LLVM 3.3.
-
 a/src/gallium/drivers/r600/llvm_wrapper.cpp2013-03-05 
23:54:28.0 +0100
-+++ b/src/gallium/drivers/r600/llvm_wrapper.cpp2013-07-02 
12:58:39.294793737 +0200
-@@ -1,8 +1,16 @@
- #include llvm/ADT/OwningPtr.h
- #include llvm/ADT/StringRef.h
-+#if HAVE_LLVM  0x0303
- #include llvm/LLVMContext.h
--#include llvm/PassManager.h
- #include llvm/Support/IRReader.h
-+#else
-+#include llvm/IR/LLVMContext.h
-+#include llvm/IR/Module.h
-+#include llvm/IR/Function.h
-+#include llvm/IR/DataLayout.h
-+#include llvm/IRReader/IRReader.h
-+#endif
-+#include llvm/PassManager.h
- #include llvm/Support/MemoryBuffer.h
- #include llvm/Support/SourceMgr.h
- #include llvm/Transforms/IPO.h
 a/src/gallium/drivers/r600/Makefile.am 2013-03-05 23:54:28.0 
+0100
-+++ b/src/gallium/drivers/r600/Makefile.am 2013-07-02 12:58:39.294793737 
+0200
-@@ -26,7 +26,8 @@
-   -I$(top_srcdir)/src/gallium/drivers/radeon/
- 
- AM_CXXFLAGS= \
--  $(LLVM_CXXFLAGS)
-+  $(LLVM_CXXFLAGS) \
-+  $(DEFINES)
- endif
- 
- if USE_R600_LLVM_COMPILER
 a/src/gallium/drivers/radeon/radeon_llvm_emit.cpp  2013-06-25 
23:24:55.0 +0200
-+++ b/src/gallium/drivers/radeon/radeon_llvm_emit.cpp  2013-07-02 
12:58:39.294793737 +0200
-@@ -25,13 +25,21 @@
-  */
- #include radeon_llvm_emit.h
- 
-+#if HAVE_LLVM  0x0303
- #include llvm/LLVMContext.h
- #include llvm/Module.h
-+#include llvm/DataLayout.h
-+#else
-+#include llvm/IR/LLVMContext.h
-+#include llvm/IR/Module.h
-+#include llvm/IR/DataLayout.h
-+#include llvm/Support/CBindingWrapping.h
-+#endif
-+
- #include llvm/PassManager.h
- #include llvm/ADT/Triple.h
- #include llvm/Support/FormattedStream.h
- #include llvm/Support/Host.h
--#include llvm/Support/IRReader.h
- #include llvm/Support/SourceMgr.h
- #include llvm/Support/TargetRegistry.h
- #include llvm/Support/TargetSelect.h
-@@ -39,7 +47,6 @@
- #include llvm/Target/TargetMachine.h
- #include llvm/Transforms/Scalar.h
- #include llvm-c/Target.h
--#include llvm/DataLayout.h
- 
- #include iostream
- #include stdlib.h

Modified: PKGBUILD
===
--- PKGBUILD2013-07-12 06:44:58 UTC (rev 189979)
+++ PKGBUILD2013-07-12 13:09:24 UTC (rev 189980)
@@ -5,23 +5,23 @@
 pkgbase=mesa
 pkgname=('ati-dri' 'intel-dri' 'nouveau-dri' 'svga-dri' 'mesa' 'mesa-libgl')
 pkgver=9.1.4
-pkgrel=4
+pkgrel=5
 arch=('i686' 'x86_64')
 makedepends=('python2' 'libxml2' 'libx11' 'glproto' 'libdrm' 'dri2proto' 
'libxxf86vm' 'libxdamage'
- 'libvdpau' 'wayland' 'llvm' 'systemd')
+ 'libvdpau' 'wayland' 'llvm-amdgpu-snapshot' 'systemd')
 url=http://mesa3d.sourceforge.net;
 license=('custom')
 options=('!libtool')
 source=(ftp://ftp.freedesktop.org/pub/mesa/${pkgver}/MesaLib-${pkgver}.tar.bz2
-MesaLib-9.1.4-llvm_fixes-1.patch
+git_fixes.patch
 LICENSE)
 md5sums=('a2c4e25d0e27918bc67f61bae04d0cb8'
- '57bd9bb4d2bd47f56ea8478bf2c04525'
+ '8ec30e1bd7abe5e8e540df4fa618540f'
  '5c65a0fe315dd347e09b1f2826a1df5a')
 
 prepare() {
 cd ?esa-*
-patch -Np1 -i ../MesaLib-9.1.4-llvm_fixes-1.patch
+patch -Np1 -i ../git_fixes.patch
 }
 
 build() {
@@ -108,7 +108,7 @@
 
 package_svga-dri() {
   pkgdesc=Gallium3D VMware guest GL driver
-  depends=('libdrm' 'expat' 'llvm-libs')
+  depends=('libdrm' 'expat' 'llvm-amdgpu-lib-snapshot')
 
   install -m755 -d ${pkgdir}/usr/lib/xorg/modules/dri
   mv -v ${srcdir}/fakeinstall/usr/lib/xorg/modules/dri/vmwgfx_dri.so 
${pkgdir}/usr/lib/xorg/modules/dri/
@@ -122,7 +122,7 @@
 
 package_mesa() {
   pkgdesc=an open-source implementation of the OpenGL specification
-  depends=('libdrm' 'libvdpau' 'wayland' 'libxxf86vm' 'libxdamage' 'systemd' 
'llvm-libs')
+  depends=('libdrm' 'libvdpau' 'wayland' 'libxxf86vm' 'libxdamage' 'systemd' 

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

2011-07-09 Thread andyrtr
Date: Saturday, July 9, 2011 @ 09:03:33
  Author: andyrtr
Revision: 131009

upgpkg: mesa 7.11rc1-1
upstream prerelease 7.11rc1 - the tarball was broken so we keep building from 
gitshots for now

Modified:
  mesa/trunk/PKGBUILD
Deleted:
  mesa/trunk/gnome-shell-shader-fix.patch
  mesa/trunk/nouveau-fix-header.patch

--+
 PKGBUILD |   92 ++-
 gnome-shell-shader-fix.patch |  535 -
 nouveau-fix-header.patch |   86 --
 3 files changed, 38 insertions(+), 675 deletions(-)

Modified: PKGBUILD
===
--- PKGBUILD2011-07-09 12:58:20 UTC (rev 131008)
+++ PKGBUILD2011-07-09 13:03:33 UTC (rev 131009)
@@ -9,45 +9,34 @@
 #_git=false
 
 if [ ${_git} = true ]; then
-pkgver=7.10.99.git20110706
+#pkgver=7.10.99.git20110709
+pkgver=7.11rc1
   else
-pkgver=7.10.3
+pkgver=7.11rc1
 fi
-pkgrel=2
+pkgrel=1
 arch=('i686' 'x86_64')
-makedepends=('glproto=1.4.12' 'pkgconfig' 'libdrm=2.4.25' 
'libxxf86vm=1.1.1' 'libxdamage=1.1.3' 'expat=2.0.1' 'libx11=1.4.3' 
'libxt=1.1.1' 
- 'gcc-libs=4.5' 'dri2proto=2.6' 'python2' 'libxml2' 'imake' 
'llvm')
+makedepends=('glproto=1.4.14' 'libdrm=2.4.26' 'libxxf86vm=1.1.1' 
'libxdamage=1.1.3' 'expat=2.0.1' 'libx11=1.4.3' 'libxt=1.1.1' 
+ 'gcc-libs=4.6.1' 'dri2proto=2.6' 'python2' 'libxml2' 'imake' 
'llvm')
 url=http://mesa3d.sourceforge.net;
 license=('custom')
-source=(LICENSE gnome-shell-shader-fix.patch nouveau-fix-header.patch)
+source=(LICENSE)
 if [ ${_git} = true ]; then
# mesa git shot from 7.11 branch - see for state: 
http://cgit.freedesktop.org/mesa/mesa/commit/?h=7.11id=1ae00c5960af83bea9545a18a1754bad83d5cbd0
-   source=(${source[@]} 
'ftp://ftp.archlinux.org/other/mesa/mesa-1ae00c5960af83bea9545a18a1754bad83d5cbd0.tar.bz2')
+   #source=(${source[@]} 
'ftp://ftp.archlinux.org/other/mesa/mesa-1ae00c5960af83bea9545a18a1754bad83d5cbd0.tar.bz2')
+   source=(${source[@]} 
MesaLib-${pkgver}.zip::http://cgit.freedesktop.org/mesa/mesa/snapshot/mesa-b033f050fd5179b051181a0a4b6d94110624d25c.tar.bz2;)
   else
-   source=(${source[@]} 
ftp://ftp.freedesktop.org/pub/mesa/${pkgver}/MesaLib-${pkgver}.zip;
+   source=(${source[@]} 
ftp://ftp.freedesktop.org/pub/mesa/${pkgver/rc1/}/MesaLib-${pkgver/rc/-rc}.zip;
 )
 fi
 md5sums=('5c65a0fe315dd347e09b1f2826a1df5a'
- '3ec78f340f9387abd7a37b195e764cbf'
- '67c87b77cc2236b52a3b47dad3fbb5d4'
- '6d655a2573037838844019275dce66af')
+ '2246d97eb0cfb1f6d2bf8a54b533d07f')
 
 build() {
-if [ ${_git} = true ]; then
-cd ${srcdir}/mesa-*   
-autoreconf -vfi
-  else
-cd ${srcdir}/Mesa-${pkgver} 
-fi
+cd ${srcdir}/?esa-*   
 
-if [ ${_git} != true ]; then
-#backport from master to fix gnome-shell shader
-#https://bugs.freedesktop.org/show_bug.cgi?id=35714
-patch -Np1 -i ${srcdir}/gnome-shell-shader-fix.patch
-patch -Np1 -i ${srcdir}/nouveau-fix-header.patch
-fi
-
 if [ ${_git} = true ]; then
+autoreconf -vfi
 ./autogen.sh --prefix=/usr \
 --with-dri-driverdir=/usr/lib/xorg/modules/dri \
 --with-gallium-drivers=r300,r600,nouveau,swrast \
@@ -67,35 +56,31 @@
 #--enable-shared-glapi EXPERIMENTAL. Enable shared glapi for 
OpenGL[default=no]
 
   else
+  autoreconf -vfi
 ./configure --prefix=/usr \
 --with-dri-driverdir=/usr/lib/xorg/modules/dri \
---enable-gallium-radeon \
---enable-gallium-r600 \
---enable-gallium-nouveau \
---enable-gallium-swrast \
+--with-gallium-drivers=r300,r600,nouveau,swrast \
+--enable-gallium-llvm \
+--enable-gallium-egl \
 --enable-glx-tls \
 --with-driver=dri \
 --enable-xcb \
---with-state-trackers=dri,glx \
 --disable-glut \
 --enable-gles1 \
 --enable-gles2 \
 --enable-egl \
---disable-gallium-egl
+--enable-texture-float \
+--enable-shared-dricore
 fi
 
   make
 }
 
 package_libgl() {
-  depends=('libdrm=2.4.25' 'libxxf86vm=1.1.1' 'libxdamage=1.1.3' 
'expat=2.0.1')
+  depends=('libdrm=2.4.26' 'libxxf86vm=1.1.1' 'libxdamage=1.1.3' 
'expat=2.0.1')
   pkgdesc=Mesa 3-D graphics library and DRI software rasterizer
 
-if [ ${_git} = true ]; then
-cd ${srcdir}/mesa-*   
-  else
-cd ${srcdir}/Mesa-${pkgver} 
-fi
+  cd ${srcdir}/?esa-*   
   install -m755 -d ${pkgdir}/usr/lib
   install -m755 -d ${pkgdir}/usr/lib/xorg/modules/extensions
 
@@ -109,7 +94,7 @@
 if [ ${_git} = true ]; then
 make -C ${srcdir}/mesa-*/src/gallium/targets/dri-swrast 
DESTDIR=${pkgdir} install
   else
-make -C ${srcdir}/Mesa-${pkgver}/src/gallium/targets/dri-swrast 
DESTDIR=${pkgdir} install
+make -C ${srcdir}/Mesa-${pkgver/rc/-rc}/src/gallium/targets/dri-swrast 
DESTDIR=${pkgdir} install
 fi
   ln -s swrastg_dri.so ${pkgdir}/usr/lib/xorg/modules/dri/swrast_dri.so
   ln -s libglx.xorg ${pkgdir}/usr/lib/xorg/modules/extensions/libglx.so
@@ -125,7 +110,7 @@
 if [ 

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

2011-06-12 Thread andyrtr
Date: Sunday, June 12, 2011 @ 07:12:35
  Author: andyrtr
Revision: 127284

upgpkg: mesa 7.10.99.git20110612-1
update snapshot

Modified:
  mesa/trunk/PKGBUILD
Deleted:
  mesa/trunk/gnome-shell-shader-fix.patch
  mesa/trunk/nouveau-fix-header.patch

--+
 PKGBUILD |   10 
 gnome-shell-shader-fix.patch |  535 -
 nouveau-fix-header.patch |   86 --
 3 files changed, 5 insertions(+), 626 deletions(-)

Modified: PKGBUILD
===
--- PKGBUILD2011-06-12 11:02:59 UTC (rev 127283)
+++ PKGBUILD2011-06-12 11:12:35 UTC (rev 127284)
@@ -9,7 +9,7 @@
 #_git=false
 
 if [ ${_git} = true ]; then
-pkgver=7.10.99.git20110531
+pkgver=7.10.99.git20110612
   else
 pkgver=7.10.2
 fi
@@ -21,8 +21,8 @@
 license=('custom')
 source=(LICENSE gnome-shell-shader-fix.patch nouveau-fix-header.patch)
 if [ ${_git} = true ]; then
-   # mesa git shot from mastee (will become 7.11) branch - see for state: 
http://cgit.freedesktop.org/mesa/mesa/commit/?id=b1246cf13bc4e301b499a95d33e0cab26655fed5
-   source=(${source[@]} 
'ftp://ftp.archlinux.org/other/mesa/mesa-b1246cf13bc4e301b499a95d33e0cab26655fed5.tar.bz2')
+   # mesa git shot from mastee (will become 7.11) branch - see for state: 
http://cgit.freedesktop.org/mesa/mesa/commit/?id=9a00dd974699e369b1eb292103fbde8bc6adfb87
+   source=(${source[@]} 
'ftp://ftp.archlinux.org/other/mesa/mesa-9a00dd974699e369b1eb292103fbde8bc6adfb87.tar.bz2')
   else
source=(${source[@]} 
ftp://ftp.freedesktop.org/pub/mesa/${pkgver}/MesaLib-${pkgver}.tar.bz2;
 )
@@ -30,7 +30,7 @@
 md5sums=('5c65a0fe315dd347e09b1f2826a1df5a'
  '3ec78f340f9387abd7a37b195e764cbf'
  '67c87b77cc2236b52a3b47dad3fbb5d4'
- 'c2ff7ab905adf67a5d6c8acbbf495b12')
+ '77b10baeba21268d2a65440f99f97c12')
 
 build() {
 if [ ${_git} = true ]; then
@@ -209,7 +209,7 @@
 
 package_ati-dri() {
   depends=(libgl=${pkgver})
-  pkgdesc=Mesa DRI + Gallium3D r300 drivers for AMD/ATI Radeon
+  pkgdesc=Mesa DRI radeon/r200 + Gallium3D r300,r600 drivers for AMD/ATI 
Radeon
   conflicts=('xf86-video-ati6.9.0-6')
 
 if [ ${_git} = true ]; then

Deleted: gnome-shell-shader-fix.patch
===
--- gnome-shell-shader-fix.patch2011-06-12 11:02:59 UTC (rev 127283)
+++ gnome-shell-shader-fix.patch2011-06-12 11:12:35 UTC (rev 127284)
@@ -1,535 +0,0 @@
-From 3f625689acd570e4f14cc2ebaa43a425d13954ff Mon Sep 17 00:00:00 2001
-From: Christoph Bumiller e0425...@student.tuwien.ac.at
-Date: Thu, 31 Mar 2011 13:49:33 +
-Subject: nv50: copy regalloc fixes from nvc0
-
-Should fix gnome-shell's fade shader.
-
-Unification of the shader backend which is supposed to remove the
-code duplication is still WIP.

-diff --git a/src/gallium/drivers/nv50/nv50_pc.h 
b/src/gallium/drivers/nv50/nv50_pc.h
-index e6f3815..a9a3248 100644
 a/src/gallium/drivers/nv50/nv50_pc.h
-+++ b/src/gallium/drivers/nv50/nv50_pc.h
-@@ -228,6 +228,8 @@ struct nv_ref {
-ubyte flags; /* not used yet */
- };
- 
-+#define NV_REF_FLAG_REGALLOC_PRIV (1  0)
-+
- struct nv_basic_block;
- 
- struct nv_instruction {
-@@ -263,6 +265,15 @@ struct nv_instruction {
-ubyte quadop;
- };
- 
-+static INLINE int
-+nvi_vector_size(struct nv_instruction *nvi)
-+{
-+   int i;
-+   assert(nvi);
-+   for (i = 0; i  4  nvi-def[i]; ++i);
-+   return i;
-+}
-+
- #define CFG_EDGE_FORWARD 0
- #define CFG_EDGE_BACK1
- #define CFG_EDGE_LOOP_ENTER  2
-diff --git a/src/gallium/drivers/nv50/nv50_pc_regalloc.c 
b/src/gallium/drivers/nv50/nv50_pc_regalloc.c
-index 39ae366..657df2c 100644
 a/src/gallium/drivers/nv50/nv50_pc_regalloc.c
-+++ b/src/gallium/drivers/nv50/nv50_pc_regalloc.c
-@@ -32,14 +32,39 @@
- #include util/u_simple_list.h
- 
- #define NUM_REGISTER_FILES 4
-+#define MAX_REGISTER_COUNT 256
- 
- struct register_set {
-struct nv_pc *pc;
- 
-uint32_t last[NUM_REGISTER_FILES];
--   uint32_t bits[NUM_REGISTER_FILES][8];
-+   uint32_t bits[NUM_REGISTER_FILES][(MAX_REGISTER_COUNT + 31) / 32];
- };
- 
-+/* using OR because a set bit means occupied/unavailable, aliasing is allowed 
*/
-+static void
-+intersect_register_sets(struct register_set *dst,
-+struct register_set *src1, struct register_set *src2)
-+{
-+   int i, j;
-+
-+   for (i = 0; i  NUM_REGISTER_FILES; ++i) {
-+  for (j = 0; j  (MAX_REGISTER_COUNT + 31) / 32; ++j)
-+ dst-bits[i][j] = src1-bits[i][j] | src2-bits[i][j];
-+   }
-+}
-+
-+static void
-+mask_register_set(struct register_set *set, uint32_t mask, uint32_t umask)
-+{
-+   int i, j;
-+
-+   for (i = 0; i  NUM_REGISTER_FILES; ++i) {
-+  for (j = 0; j  (MAX_REGISTER_COUNT + 31) / 32; ++j)
-+ set-bits[i][j] = (set-bits[i][j] | mask)  umask;
-+   }
-+}
-+
- struct nv_pc_pass {
-struct nv_pc *pc;
- 
-@@ -61,11 +86,15 @@ 

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

2010-10-09 Thread andyrtr
Date: Saturday, October 9, 2010 @ 08:59:04
  Author: andyrtr
Revision: 94675

upgpkg: mesa 7.9-1
new version 7.9; ship also classic mesa driver for older nvidia chips and use 
gallium3d for Ati R300 chips. tools and demos have been split out into the 
mesa-demos pkg

Modified:
  mesa/trunk/PKGBUILD
Deleted:
  mesa/trunk/fix-glx1.3-crash-xorg19.patch
  mesa/trunk/mesa-7.8-git.patch

---+
 PKGBUILD  |   55 
 fix-glx1.3-crash-xorg19.patch |   73 -
 mesa-7.8-git.patch| 2423 
 3 files changed, 28 insertions(+), 2523 deletions(-)

The diff is longer than the limit of 200KB.
Use svn diff -r 94674:94675 to see the changes.