pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/x11/pixman x11/pixman: update the patch to pixman-vmx....



details:   https://anonhg.NetBSD.org/pkgsrc/rev/8673ed4a2d71
branches:  trunk
changeset: 387099:8673ed4a2d71
user:      he <he%pkgsrc.org@localhost>
date:      Sat Oct 22 12:22:01 2022 +0000

description:
x11/pixman: update the patch to pixman-vmx.c for powerpc.

This gets rid of the warnings and simplifies the code, ref.
the discussion in
https://gitlab.freedesktop.org/pixman/pixman/-/merge_requests/64

diffstat:

 x11/pixman/Makefile                          |   6 +-
 x11/pixman/distinfo                          |   7 ++-
 x11/pixman/patches/patch-pixman_pixman-vmx.c |  59 +++++++++++++--------------
 3 files changed, 37 insertions(+), 35 deletions(-)

diffs (151 lines):

diff -r f764f1428cb8 -r 8673ed4a2d71 x11/pixman/Makefile
--- a/x11/pixman/Makefile       Sat Oct 22 11:43:18 2022 +0000
+++ b/x11/pixman/Makefile       Sat Oct 22 12:22:01 2022 +0000
@@ -1,7 +1,7 @@
-# $NetBSD: Makefile,v 1.84 2022/10/19 17:14:32 he Exp $
+# $NetBSD: Makefile,v 1.85 2022/10/22 12:22:01 he Exp $
 
 DISTNAME=      pixman-0.42.0
-PKGREVISION=   2
+PKGREVISION=   3
 CATEGORIES=    x11
 MASTER_SITES=  ${MASTER_SITE_XORG:=lib/}
 EXTRACT_SUFX=  .tar.xz
@@ -24,6 +24,8 @@
 PKGCONFIG_OVERRIDE+=   pixman-1.pc.in
 PKGCONFIG_OVERRIDE+=   pixman-1-uninstalled.pc.in
 
+TEST_TARGET=   check
+
 X11_LIB_NAME?=         pixman
 .include "../../meta-pkgs/modular-xorg/avoid-duplicate.mk"
 .include "../../mk/bsd.pkg.mk"
diff -r f764f1428cb8 -r 8673ed4a2d71 x11/pixman/distinfo
--- a/x11/pixman/distinfo       Sat Oct 22 11:43:18 2022 +0000
+++ b/x11/pixman/distinfo       Sat Oct 22 12:22:01 2022 +0000
@@ -1,8 +1,11 @@
-$NetBSD: distinfo,v 1.72 2022/10/20 09:35:15 jperkin Exp $
+$NetBSD: distinfo,v 1.73 2022/10/22 12:22:01 he Exp $
 
 BLAKE2s (pixman-0.42.0.tar.xz) = 9846ec6a902afa54328b18a9a58cbdf7ad066aa69cbbfddb145b1475c6ad8899
 SHA512 (pixman-0.42.0.tar.xz) = 43d43d1aef9b8a6167098ab68ce2cfd8c0429c4825d40a4fb468b5b51dc1a2035f8bd1b70413e4ecd77deb469b5d558f42171b423e348d5ddd8604c466ffc7d9
 Size (pixman-0.42.0.tar.xz) = 652780 bytes
+<<<<<<< distinfo
+=======
+>>>>>>> 1.72
 SHA1 (patch-Makefile.in) = 244969af69e43472d43d8cd1556abacf9ec679e0
 SHA1 (patch-configure) = 909bf50acfd69700b26bd55a47f93fd77b49226c
-SHA1 (patch-pixman_pixman-vmx.c) = 26ee87f2d1ffabf89fc1e2ed6cd50abbb2fc86cd
+SHA1 (patch-pixman_pixman-vmx.c) = 8ca3649a5dd0527ce078af1b91fb01611dde9b45
diff -r f764f1428cb8 -r 8673ed4a2d71 x11/pixman/patches/patch-pixman_pixman-vmx.c
--- a/x11/pixman/patches/patch-pixman_pixman-vmx.c      Sat Oct 22 11:43:18 2022 +0000
+++ b/x11/pixman/patches/patch-pixman_pixman-vmx.c      Sat Oct 22 12:22:01 2022 +0000
@@ -1,72 +1,69 @@
-$NetBSD: patch-pixman_pixman-vmx.c,v 1.4 2022/10/20 09:35:15 jperkin Exp $
+$NetBSD: patch-pixman_pixman-vmx.c,v 1.5 2022/10/22 12:22:01 he Exp $
 
-Add a fix so that this builds on NetBSD/powerpc.  Otherwise we get
-pixman-vmx.c:2936:5: error: subscripted value is neither array nor pointer
-Also fix something which clearly must be bugs with loading
-vector registers from single 32-bit ints.
+Add a fix so that this builds without warnings on NetBSD/powerpc.
+Also do some simplification.
 
 https://gitlab.freedesktop.org/pixman/pixman/-/merge_requests/64/
 
 --- pixman/pixman-vmx.c.orig   2021-03-01 13:49:17.000000000 +0000
 +++ pixman/pixman-vmx.c
-@@ -292,7 +292,9 @@ create_mask_1x32_128 (const uint32_t *sr
+@@ -278,21 +278,10 @@ save_128_aligned (uint32_t* data,
+     STORE_VECTOR(data)
+ }
+ 
+-static force_inline vector unsigned int
+-create_mask_1x32_128 (const uint32_t *src)
+-{
+-    vector unsigned int vsrc;
+-    DECLARE_SRC_MASK_VAR;
+-
+-    COMPUTE_SHIFT_MASK (src);
+-    LOAD_VECTOR (src);
+-    return vec_splat(vsrc, 0);
+-}
+-
  static force_inline vector unsigned int
  create_mask_32_128 (uint32_t mask)
  {
 -    return create_mask_1x32_128(&mask);
-+    uint32_t nmask[4]; /* vector sized array */
-+    nmask[3] = nmask[2] = nmask[1] = nmask[0] = mask;
-+    return create_mask_1x32_128(nmask);
++    return (vector unsigned int) {mask, mask, mask, mask};
  }
  
  static force_inline vector unsigned int
-@@ -2435,6 +2437,9 @@ vmx_fill (pixman_implementation_t *imp,
-     uint8_t *byte_line;
- 
-     vector unsigned int vfiller;
-+    uint32_t fillers[4];
-+
-+    fillers[3] = fillers[2] = fillers[1] = fillers[0] = filler;
- 
-     if (bpp == 8)
-     {
-@@ -2471,7 +2476,7 @@ vmx_fill (pixman_implementation_t *imp,
+@@ -2471,7 +2460,7 @@ vmx_fill (pixman_implementation_t *imp,
        return FALSE;
      }
  
 -    vfiller = create_mask_1x32_128(&filler);
-+    vfiller = create_mask_1x32_128(fillers);
++    vfiller = create_mask_32_128(filler);
  
      while (height--)
      {
-@@ -2913,32 +2918,29 @@ scaled_nearest_scanline_vmx_8888_8888_OV
+@@ -2913,32 +2902,26 @@ scaled_nearest_scanline_vmx_8888_8888_OVER (uint32_t*       pd,
  
      while (w >= 4)
      {
 -      vector unsigned int tmp;
 -      uint32_t tmp1, tmp2, tmp3, tmp4;
-+      union {
-+              vector unsigned int tmp;
-+              uint32_t tmp1[4];
-+      } u;
++      uint32_t tmp[4];
  
 -      tmp1 = *(ps + pixman_fixed_to_int (vx));
-+      u.tmp1[0] = *(ps + pixman_fixed_to_int (vx));
++      tmp[0] = *(ps + pixman_fixed_to_int (vx));
        vx += unit_x;
        while (vx >= 0)
            vx -= src_width_fixed;
 -      tmp2 = *(ps + pixman_fixed_to_int (vx));
-+      u.tmp1[1] = *(ps + pixman_fixed_to_int (vx));
++      tmp[1] = *(ps + pixman_fixed_to_int (vx));
        vx += unit_x;
        while (vx >= 0)
            vx -= src_width_fixed;
 -      tmp3 = *(ps + pixman_fixed_to_int (vx));
-+      u.tmp1[2] = *(ps + pixman_fixed_to_int (vx));
++      tmp[2] = *(ps + pixman_fixed_to_int (vx));
        vx += unit_x;
        while (vx >= 0)
            vx -= src_width_fixed;
 -      tmp4 = *(ps + pixman_fixed_to_int (vx));
-+      u.tmp1[3] = *(ps + pixman_fixed_to_int (vx));
++      tmp[3] = *(ps + pixman_fixed_to_int (vx));
        vx += unit_x;
        while (vx >= 0)
            vx -= src_width_fixed;
@@ -77,7 +74,7 @@
 -      tmp[3] = tmp4;
 -
 -      vsrc = combine4 ((const uint32_t *) &tmp, pm);
-+      vsrc = combine4 ((const uint32_t *) &u.tmp, pm);
++      vsrc = combine4 (tmp, pm);
  
        if (is_opaque (vsrc))
        {



Home | Main Index | Thread Index | Old Index