summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorhe <he@pkgsrc.org>2022-10-22 12:22:01 +0000
committerhe <he@pkgsrc.org>2022-10-22 12:22:01 +0000
commit22700a2d5f4900f6de33e10161ac3dc9c30a15fb (patch)
tree3066996d3210aa287ba167a40ed7397321bb0b05
parenta5e93bcba174c536816b5169095f67bbbac87b1d (diff)
downloadpkgsrc-22700a2d5f4900f6de33e10161ac3dc9c30a15fb.tar.gz
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
-rw-r--r--x11/pixman/Makefile6
-rw-r--r--x11/pixman/distinfo7
-rw-r--r--x11/pixman/patches/patch-pixman_pixman-vmx.c59
3 files changed, 37 insertions, 35 deletions
diff --git a/x11/pixman/Makefile b/x11/pixman/Makefile
index a75e2b7eedf..1c4bd7af4ed 100644
--- a/x11/pixman/Makefile
+++ b/x11/pixman/Makefile
@@ -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 @@ USE_TOOLS+= perl
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 --git a/x11/pixman/distinfo b/x11/pixman/distinfo
index 03d77b2976b..59c6726c2df 100644
--- a/x11/pixman/distinfo
+++ b/x11/pixman/distinfo
@@ -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 --git a/x11/pixman/patches/patch-pixman_pixman-vmx.c b/x11/pixman/patches/patch-pixman_pixman-vmx.c
index b799b09612d..1dd29f41aee 100644
--- a/x11/pixman/patches/patch-pixman_pixman-vmx.c
+++ b/x11/pixman/patches/patch-pixman_pixman-vmx.c
@@ -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 @@ https://gitlab.freedesktop.org/pixman/pixman/-/merge_requests/64/
- 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))
{