2592 Commits

Author SHA1 Message Date
Marek Pikuła
a2afb80bdb ci: Use regular Debian as base Windows for ARM
It turns out it's relatively easy to provide support for Windows on ARM.
Unfortunately, it requires building Wine from source, as the version
distributed by Debian (both Bookworm and Sid) is buggy for some tests.
However, building it isn't overly complicated, and can be replaced with
pre-built package once a fixed version lands in Debian Trixie.

Besides that, I also fixed the dynamic linking issue and enabled OpenMP
as for x86 targets.

It has the following advantages:

- It greatly decreases the image size, and improves maintainability of
  the package, as we don't rely on third-party image (from Linaro).
- We can build a native image and run it on ARM GitLab runner spreading
  the load between different runners, and significantly improving the
  speed of execution (over 12 min down to under a minute).

Signed-off-by: Marek Pikuła <m.pikula@partner.samsung.com>
2024-12-17 19:22:33 +01:00
Marek Pikuła
badcc1390b ci: Improve Windows images
- Update LLVM-MinGW.
- Separate out win32 and win64 images. In some scenarios there are
  dependency clashes, thus it's easier to simply separate these two
  images.
- Fix dynamic library loading. This means we can link dynamically
  everything and enable OpenMP for LLVM builds (meaning faster running
  tests)

Signed-off-by: Marek Pikuła <m.pikula@partner.samsung.com>
2024-12-17 19:03:28 +01:00
Marek Pikuła
962a30b3ad ci: Use native ARM runners for Linux ARM targets
- build Docker images
- execute build and test stages
- enable OpenMP for ARMv6 target to improve pipeline speed. This means
  that coverage report cannot be generated for this target (no support
  for -fprofile-update=atomic).

Signed-off-by: Marek Pikuła <m.pikula@partner.samsung.com>
2024-12-17 19:03:27 +01:00
Marek Pikuła
dc933879df ci: Move Docker build to a CI template
This enables reuse of the Docker build with different runner tags. Will
be used for running native image builds on ARM64 runners.

Signed-off-by: Marek Pikuła <m.pikula@partner.samsung.com>
2024-12-17 19:03:26 +01:00
Marek Pikuła
17ab27ef5b ci: Add option to change the default runner tag
Enables specifying GitLab runner tag on per-job basis. It requires
setting the `RUNNER_TAG_DEFAULT` variable as GitLab CI variable in order
to properly expand it when referenced in templates.

Signed-off-by: Marek Pikuła <m.pikula@partner.samsung.com>
2024-12-17 19:03:25 +01:00
Marek Pikuła
590cce95c7 ci: Clean up after disabling failing targets
Remove disabled, failing targets to unclutter the pipeline description.

Signed-off-by: Marek Pikuła <m.pikula@partner.samsung.com>
2024-12-17 19:03:24 +01:00
Marek Pikuła
17cf74322e ci: Enable cross PPC tests
Signed-off-by: Marek Pikuła <m.pikula@partner.samsung.com>
2024-12-17 19:03:23 +01:00
Marek Pikuła
218d5ed249 test: Increase timeout for alpha-loop test
Required to successfully run cross-compiled PPC targets.

Signed-off-by: Marek Pikuła <m.pikula@partner.samsung.com>
2024-12-17 19:03:22 +01:00
Marek Pikuła
656f5a9ba5 ci: Use newer version of QEMU for Bookworm
Bookworm uses QEMU 7, which is buggy in some contexts (e.g., when
running on aarch64 host).

This change updates QEMU to version 9 from bookworm-backports. It
doesn't affect sid images (which have upstream version 9).

Signed-off-by: Marek Pikuła <m.pikula@partner.samsung.com>
2024-12-17 19:03:21 +01:00
Marek Pikuła
ba564a57ef ci: Improve coverage and artifact handling
- Upload all coverage artifacts in the summary stage. Having all source
  coverage reports makes it easier to debug the summary stage behavior
  without the need to download each artifact separately.
- Fail if coverage report cannot be generated to prevent silent coverage
  report failure, which was possible since coverage report was in the
  `after_script` block.
- Always save artifacts, so that it's easier to debug what's happened if
  the job failed.

Signed-off-by: Marek Pikuła <m.pikula@partner.samsung.com>
2024-12-17 19:03:17 +01:00
Matt Turner
aa6d7161bd vmx: Run clang-format 2024-12-13 10:03:40 -05:00
Matt Turner
d09af9f368 vmx: Disable clang-format around some data structure declarations 2024-12-13 10:03:03 -05:00
Matt Turner
fe3ef3a912 vmx: Declare iterator variable in for loop
Reduces churn when running clang-format.
2024-12-13 10:03:03 -05:00
Matt Turner
b1aa943286 vmx: Optimize pix_multiply()
Uses the same algorithm, but splits the elements into even-odd groupings
rather than hi-lo. This allows us to do the initial unpack via the
`vec_mul{e,o}` which multiplies 8-bit values and produces 16-bit values.

Replaces
	2x `vec_mergeh`
	2x `vec_mergel`
	2x `vec_mladd`
with
	1x `vec_mule`
	1x `vec_mulo`
	2x `vec_adds`

Slightly improves performance. On a G4, before and after:

over_8888_8888 =  L1: 281.39  L2: 243.76  M: 50.19 ( 75.64%)  HT: 37.40  VT: 33.08  R: 31.01  RT: 15.47 ( 172Kops/s)
over_8888_8888 =  L1: 359.85  L2: 266.58  M: 50.56 ( 76.10%)  HT: 37.87  VT: 33.60  R: 31.17  RT: 15.54 ( 172Kops/s)
2024-12-13 10:03:03 -05:00
Matt Turner
2cf5da031b vmx: Avoid two shifts in pix_multiply() function
By using `vec_perm` to select the high-bytes of each 16-bit value in
hi/lo, we can save two `vec_sr` instructions.

Slightly improves performance. On a G4, before and after:

over_8888_8888 =  L1: 257.02  L2: 228.77  M: 49.88 ( 75.29%)  HT: 37.02  VT: 32.95  R: 30.79  RT: 15.36 ( 171Kops/s)
over_8888_8888 =  L1: 281.39  L2: 243.76  M: 50.19 ( 75.64%)  HT: 37.40  VT: 33.08  R: 31.01  RT: 15.47 ( 172Kops/s)
2024-12-13 10:03:03 -05:00
Matt Turner
10be4bf9d2 vmx: Move create_mask_32_128() function 2024-12-13 10:03:03 -05:00
Matt Turner
54ef93f17c vmx: Simplify unpack{hi,lo}_128_16x8() function 2024-12-13 10:03:03 -05:00
Matt Turner
554f8fe494 vmx: Make in_over() a real function 2024-12-13 10:03:03 -05:00
Matt Turner
2d8060a3bc vmx: Simplify over() function
Now that we're using the correct vector types, this function is one
line.
2024-12-13 10:03:03 -05:00
Matt Turner
6d50860a86 vmx: Add and use vzero constant
A lot nicer to read than `(vector unsigned char) AVV (0)`.
2024-12-13 10:02:56 -05:00
Matt Turner
53f04100e8 vmx: Use selector variables
In the future if we enable clang-formatting, this will avoid problems
with how it wants to format function arguments.

Also removes some usage of the AVV macro.
2024-12-13 10:02:07 -05:00
Matt Turner
ca9e9faa9d vmx: Add and use create_mask_16_128() function 2024-12-12 17:16:58 -05:00
Matt Turner
c44e0d5f87 vmx: Use appropriate types
I found working in this code very confusing with the number of casts. If
we just use the appropriate vector type, we simplify the code greatly.

Somewhat unexpectedly, this also reduces the instruction counts in some
functions.
2024-12-12 17:16:58 -05:00
Matt Turner
db19202895 vmx: Use create_mask_32_128() more places 2024-12-12 17:16:58 -05:00
Matt Turner
f3d5e47cc4 vmx: Move and use unpack{hi,lo}_128_16x8 in pix_multiply() 2024-12-12 17:16:58 -05:00
Matt Turner
a5bd4c7110 vmx: Remove unpack{hi,lo}_128_8x16 functions 2024-12-12 17:16:58 -05:00
Matt Turner
f3c77cc209 vmx: Remove unpack_128_2x128_16()
This function is only used in vmx_fetch_a8, which is takes packed
unsigned char alpha values and expands them to RGBA8888 with color
components set to 0.

It currently operates by zero-extending the 8-bit alpha values to 16-bit
and then again to 32-bit with different functions (`unpack_128_2x128`
and `unpack_128_2x128_16` respectively). But we can just use the same
function (`unpack_128_2x128`) twice to insert the zeros.

A subsequent commit will change the VMX code to use appropriate vector
types (instead of everything just being a `vector unsigned int` with
casts on most function arguments to select the appropriate `vec_*`
function overload), and removing this function reduces some complexity
from that.
2024-12-12 17:16:57 -05:00
Matt Turner
28f39f7f17 vmx: Remove unpack_565_to_8888() and associated constants 2024-12-12 17:15:30 -05:00
Matt Turner
2ec98b5afd vmx: Remove unnecessary variable 2024-12-12 17:15:22 -05:00
f.wasil
2f495629fe .clang-format: Add 2024-12-12 17:15:05 -05:00
Matt Turner
fbd9f6ee5a Post-release version bump to 0.44.3 2024-12-02 22:54:21 -05:00
Matt Turner
46655e1567 Pre-release version bump to 0.44.2 pixman-0.44.2 2024-12-02 22:51:09 -05:00
Matt Turner
f05a251d94 release.sh: Some improvements
- Upload tar.xz to both x.org and cairographics.org
- Move `git push` and `scp` to the end
- Do most of the work from within build/meson-dist/
- Copy wayland's release.sh's code for getting the project version
- Use bash
2024-12-02 16:20:32 -05:00
Simon Ser
5dd5a5d1c0 release.sh: Add script
Closes: https://gitlab.freedesktop.org/pixman/pixman/-/issues/86
2024-12-02 12:47:36 -05:00
Marek Pikuła
e627c57442 ci: Enable ppc64le testing with clang 2024-12-02 01:46:10 +00:00
Matt Turner
207626180d vmx: Fix is_opaque, is_zero, is_transparent functions
These functions were copied much too literally from pixman-sse2.c in
commit c12ee95 ("vmx: add helper functions")

Fixes: c12ee95 ("vmx: add helper functions")
Closes: https://gitlab.freedesktop.org/pixman/pixman/-/issues/52
2024-12-02 01:46:10 +00:00
Marek Pikuła
2c3cd15f5b ci: Rename mips64el to mips64le
Debian image on Docker Hun finally changed mips64el to mips64le bringing
some unification of names at last. Thus to unify everything here, I
renamed all mips64el to mips64le.

Signed-off-by: Marek Pikuła <m.pikula@partner.samsung.com>
2024-12-01 02:11:24 +01:00
f wasil
999659d64a RISC-V: Force spec 1p0 in architecture definiton
Without setting the ISA spec version explicitly the Link Time Optimization fails.

A valid fix will be in the GCC at some point. Until then we have to be explicit.

GCC bug: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110812
Closes: https://gitlab.freedesktop.org/pixman/pixman/-/issues/117
2024-11-25 17:27:58 +00:00
Benjamin Gilbert
8d7a2f8bf6 meson: require Meson >= 1.3.0
Remove obsolete workarounds.  Rename meson_options.txt to meson.options.
Use c_std=gnu99,c99 to avoid configure-time warning on MSVC:

    DEPRECATION: None of the values ['gnu99'] are supported by the c compiler.
    However, the deprecated gnu99 std currently falls back to c99.
    This will be an error in meson 2.0.
    If the project supports both GNU and MSVC compilers, a value such as
    "c_std=gnu11,c11" specifies that GNU is preferred but it can safely fallback to plain c11.
2024-11-06 20:06:06 -08:00
Sergei Trofimovich
da6350001f RISC-V: fix rvv auto-detection on gcc-13
Without the change auto-detection of `rvv` support is incomplete as it
assumes `vfloat32m1x4_t` is always present if `vfloat32m1_t` is probed
successfully.

It looks like at least on `gcc-13.3.0` `vfloat32m1_t` is present while
`vfloat32m1x4_t` is not. This causes build failure as:

    ../pixman/pixman-rvv.c:464:5: error: unknown type name 'vfloat32m1x4_t'; did you mean 'vfloat32m4_t'?
      464 |     vfloat32m1x4_t sa_sr_sg_sb, da_dr_dg_db, ma_mr_mg_mb;
          |     ^~~~~~~~~~~~~~
          |     vfloat32m4_t

The change probes for both types as both are used in `pixman-rvv.c`.

Tested on `gcc-13`, `gcc-14`, `gcc-15`.

Closes: https://gitlab.freedesktop.org/pixman/pixman/-/issues/115
2024-11-06 22:43:52 +00:00
Matt Turner
0d74d394b4 Post-release version bump to 0.44.1 2024-11-05 11:59:53 -05:00
Matt Turner
ae6646f159 Pre-release version bump to 0.44.0 pixman-0.44.0 2024-11-05 11:51:31 -05:00
Lance Arsenault
126d61e796 pixman: Add library destructor
Closes: https://gitlab.freedesktop.org/pixman/pixman/-/issues/111
2024-11-05 04:31:04 +00:00
f wasil
a987256be8 Fixed memory leak in tests 2024-11-05 03:39:54 +00:00
f wasil
0e424031bd RISC-V floating point operations 2024-10-30 03:39:37 +00:00
Changqing Li
643f098a39 pixman-combine-float.c: fix inlining failed error
Refer [1], always-inline is not suggested to be used if you have indirect
calls. so replace force_inline with inline to fix error like:
In function ‘combine_inner’,
    inlined from ‘combine_soft_light_ca_float’ at ../pixman/pixman-combine-float.c:655:511:
../pixman/pixman-combine-float.c:655:211: error: inlining failed in call to ‘always_inline’ ‘combine_soft_light_c’: function not considered for inlining

Test with gcc-9 and gcc-14, both works well

[1] https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115679

Signed-off-by: Changqing Li <changqing.li@windriver.com>
2024-10-30 01:34:41 +00:00
Marek Pikuła
90f9cf1726 ci: Disable coverage for arm-v5 and mipsel targets
Signed-off-by: Marek Pikuła <m.pikula@partner.samsung.com>
2024-10-21 16:49:50 +02:00
Marek Pikuła
bc2ec45d3b ci: Add auto_cancel policy
Signed-off-by: Marek Pikuła <m.pikula@partner.samsung.com>
2024-10-21 16:49:41 +02:00
Marek Pikuła
de59d1a9fb ci: Don't execute failing jobs
Signed-off-by: Marek Pikuła <m.pikula@partner.samsung.com>
2024-10-21 16:49:40 +02:00
Marek Pikuła
15336dc7cd ci: Pin gcovr version to 7.x
Temporary version pin of gcovr due to errors in coverage report
generation when running with newly released version 8.x.

Signed-off-by: Marek Pikuła <m.pikula@partner.samsung.com>
2024-10-21 13:17:47 +02:00