mirror of
https://salsa.debian.org/xorg-team/lib/pixman
synced 2025-08-28 03:52:09 +00:00
Compare commits
137 Commits
pixman-0.4
...
debian-uns
Author | SHA1 | Date | |
---|---|---|---|
![]() |
b85678a8de | ||
![]() |
7d26aad890 | ||
![]() |
07627e9f31 | ||
![]() |
dc43d37962 | ||
![]() |
c05da7d917 | ||
![]() |
e55fd151a2 | ||
![]() |
7d5149536f | ||
![]() |
2ad078304f | ||
![]() |
7cca9d2d9a | ||
![]() |
c8cb00a5ad | ||
![]() |
b87363cd49 | ||
![]() |
2e58ff85bd | ||
![]() |
31b00cc770 | ||
![]() |
ae6646f159 | ||
![]() |
126d61e796 | ||
![]() |
a987256be8 | ||
![]() |
0e424031bd | ||
![]() |
643f098a39 | ||
![]() |
90f9cf1726 | ||
![]() |
bc2ec45d3b | ||
![]() |
de59d1a9fb | ||
![]() |
15336dc7cd | ||
![]() |
0476eda33a | ||
![]() |
11e51bc72f | ||
![]() |
277f485a9c | ||
![]() |
126b083142 | ||
![]() |
a3d297fa46 | ||
![]() |
9176847f1d | ||
![]() |
76b133f293 | ||
![]() |
b7ac7cd122 | ||
![]() |
ffa5645a2d | ||
![]() |
51dcfb8027 | ||
![]() |
c0ee08aab0 | ||
![]() |
44927bf1e1 | ||
![]() |
19b1a98e8d | ||
![]() |
028213b588 | ||
![]() |
05b5ecd934 | ||
![]() |
726d77f6fe | ||
![]() |
0cb4fbe324 | ||
![]() |
4047a553d9 | ||
![]() |
cbf9d7e0d3 | ||
![]() |
c35e47bd88 | ||
![]() |
e7ef051a6d | ||
![]() |
2d35a8769c | ||
![]() |
15af6fd0bc | ||
![]() |
a7263190c2 | ||
![]() |
b753a6f49b | ||
![]() |
6410ec79bd | ||
![]() |
5b8e928139 | ||
![]() |
2e29b7c43d | ||
![]() |
e5f8efc4c7 | ||
![]() |
7ed0f8d04d | ||
![]() |
3a32506877 | ||
![]() |
865e6ce00b | ||
![]() |
b252d40714 | ||
![]() |
54cad71674 | ||
![]() |
add7c8db45 | ||
![]() |
63ae6af9a6 | ||
![]() |
033716e99a | ||
![]() |
74130e84c5 | ||
![]() |
63332b4e72 | ||
![]() |
8c6d59a9f8 | ||
![]() |
ac485a9b66 | ||
![]() |
fdd7161097 | ||
![]() |
91b8526c1e | ||
![]() |
e8bb34e302 | ||
![]() |
43773c69db | ||
![]() |
8c39ce2437 | ||
![]() |
8e4be8c2db | ||
![]() |
6c2e4a0dd9 | ||
![]() |
396e1a76ed | ||
![]() |
7e76c96281 | ||
![]() |
af101d3c21 | ||
![]() |
20cc4ee0e9 | ||
![]() |
7883ab8d63 | ||
![]() |
86f9162332 | ||
![]() |
b4b789df5b | ||
![]() |
08115a4217 | ||
![]() |
47a1c3d330 | ||
![]() |
634b8196d2 | ||
![]() |
753f5e095e | ||
![]() |
7aeeb501ad | ||
![]() |
7169c0404f | ||
![]() |
f1072b07eb | ||
![]() |
2cf9ae1cea | ||
![]() |
72c4245b2e | ||
![]() |
55eb680a1f | ||
![]() |
593a970266 | ||
![]() |
67490a8bc1 | ||
![]() |
47d3fbe38f | ||
![]() |
55845c3dd3 | ||
![]() |
672f67db96 | ||
![]() |
48d5df1f37 | ||
![]() |
e4c878d179 | ||
![]() |
ee145e53d1 | ||
![]() |
eb998d7b65 | ||
![]() |
a7a919b881 | ||
![]() |
a4e8d8901f | ||
![]() |
590b8eb08f | ||
![]() |
dbe5c715e6 | ||
![]() |
713077d0a3 | ||
![]() |
618e3d4283 | ||
![]() |
40d6c9b256 | ||
![]() |
83ba024483 | ||
![]() |
37216a3283 | ||
![]() |
a1f88e842e | ||
![]() |
c3bbb94b4c | ||
![]() |
ca7bb8894e | ||
![]() |
1a0d50ce70 | ||
![]() |
0cf92877a9 | ||
![]() |
4ee322c4e2 | ||
![]() |
b5b3243792 | ||
![]() |
7df9e162c6 | ||
![]() |
8d6d7f44f4 | ||
![]() |
421fc252ab | ||
![]() |
7989483929 | ||
![]() |
b4a105d772 | ||
![]() |
285b9a907c | ||
![]() |
adc07d4618 | ||
![]() |
3563dfe436 | ||
![]() |
c6e1af995e | ||
![]() |
eadb82866b | ||
![]() |
36001032b7 | ||
![]() |
bd4e7a9b9e | ||
![]() |
e0d4403e78 | ||
![]() |
5f5e752f15 | ||
![]() |
aaf59b0338 | ||
![]() |
4251202d9d | ||
![]() |
e93eaff517 | ||
![]() |
d93ec57138 | ||
![]() |
9b49f4e087 | ||
![]() |
606f5c15b0 | ||
![]() |
15e0668616 | ||
![]() |
0ba6cbe1ac | ||
![]() |
c2fe1568ff | ||
![]() |
3b1fefda7f | ||
![]() |
10a057e27f |
@ -6,9 +6,6 @@ root = true
|
||||
[*]
|
||||
tab_width = 8
|
||||
|
||||
[Makefile.*]
|
||||
indent_style = tab
|
||||
|
||||
[meson.build,meson_options.txt]
|
||||
indent_style = space
|
||||
indent_size = 2
|
||||
|
80
.gitlab-ci.d/01-docker.yml
Normal file
80
.gitlab-ci.d/01-docker.yml
Normal file
@ -0,0 +1,80 @@
|
||||
# Docker build stage
|
||||
#
|
||||
# It builds a multi-arch image for all required architectures. Each image can be
|
||||
# later easily used with properly configured Docker (which uses binfmt and QEMU
|
||||
# underneath).
|
||||
|
||||
docker:
|
||||
stage: docker
|
||||
image: quay.io/buildah/stable
|
||||
rules:
|
||||
- if: "$CI_PIPELINE_SOURCE == 'merge_request_event' && $TARGET =~ $ACTIVE_TARGET_PATTERN"
|
||||
changes:
|
||||
paths:
|
||||
- .gitlab-ci.d/01-docker.yml
|
||||
- .gitlab-ci.d/01-docker/**/*
|
||||
variables:
|
||||
DOCKER_TAG: $CI_COMMIT_REF_SLUG
|
||||
DOCKER_IMAGE_NAME: ${CI_REGISTRY_IMAGE}/pixman:${DOCKER_TAG}
|
||||
- if: "$CI_PIPELINE_SOURCE == 'schedule' && $TARGET =~ $ACTIVE_TARGET_PATTERN"
|
||||
- if: "$CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH && $TARGET =~ $ACTIVE_TARGET_PATTERN"
|
||||
- if: "$CI_COMMIT_TAG && $TARGET =~ $ACTIVE_TARGET_PATTERN"
|
||||
|
||||
variables:
|
||||
# Use vfs with buildah. Docker offers overlayfs as a default, but Buildah
|
||||
# cannot stack overlayfs on top of another overlayfs filesystem.
|
||||
STORAGE_DRIVER: vfs
|
||||
|
||||
# Write all image metadata in the docker format, not the standard OCI
|
||||
# format. Newer versions of docker can handle the OCI format, but older
|
||||
# versions, like the one shipped with Fedora 30, cannot handle the format.
|
||||
BUILDAH_FORMAT: docker
|
||||
|
||||
BUILDAH_ISOLATION: chroot
|
||||
CACHE_IMAGE: ${CI_REGISTRY_IMAGE}/cache
|
||||
CACHE_ARGS: --cache-from ${CACHE_IMAGE} --cache-to ${CACHE_IMAGE}
|
||||
before_script:
|
||||
# Login to the target registry.
|
||||
- echo "${CI_REGISTRY_PASSWORD}" |
|
||||
buildah login -u "${CI_REGISTRY_USER}" --password-stdin ${CI_REGISTRY}
|
||||
|
||||
# Docker Hub login is optional, and can be used to circumvent image pull
|
||||
# quota for anonymous pulls for base images.
|
||||
- echo "${DOCKERHUB_PASSWORD}" |
|
||||
buildah login -u "${DOCKERHUB_USER}" --password-stdin docker.io ||
|
||||
echo "Failed to login to Docker Hub."
|
||||
parallel:
|
||||
matrix:
|
||||
- TARGET:
|
||||
- linux-386
|
||||
- linux-amd64
|
||||
- linux-arm-v5
|
||||
- linux-arm-v7
|
||||
- linux-arm64-v8
|
||||
- linux-mips
|
||||
- linux-mips64el
|
||||
- linux-mipsel
|
||||
- linux-ppc
|
||||
- linux-ppc64
|
||||
- linux-ppc64le
|
||||
- linux-riscv64
|
||||
- windows-686
|
||||
- windows-amd64
|
||||
- windows-arm64-v8
|
||||
script:
|
||||
# Prepare environment.
|
||||
- ${LOAD_TARGET_ENV}
|
||||
- FULL_IMAGE_NAME=${DOCKER_IMAGE_NAME}-${TARGET}
|
||||
|
||||
# Build and push the image.
|
||||
- buildah bud
|
||||
--tag ${FULL_IMAGE_NAME}
|
||||
--layers ${CACHE_ARGS}
|
||||
--target ${TARGET}
|
||||
--platform=${DOCKER_PLATFORM}
|
||||
--build-arg BASE_IMAGE=${BASE_IMAGE}
|
||||
--build-arg BASE_IMAGE_TAG=${BASE_IMAGE_TAG}
|
||||
--build-arg LLVM_VERSION=${LLVM_VERSION}
|
||||
-f Dockerfile .gitlab-ci.d/01-docker/
|
||||
- buildah images
|
||||
- buildah push ${FULL_IMAGE_NAME}
|
150
.gitlab-ci.d/01-docker/Dockerfile
Normal file
150
.gitlab-ci.d/01-docker/Dockerfile
Normal file
@ -0,0 +1,150 @@
|
||||
ARG BASE_IMAGE=docker.io/debian
|
||||
ARG BASE_IMAGE_TAG=bookworm-slim
|
||||
FROM ${BASE_IMAGE}:${BASE_IMAGE_TAG} AS base
|
||||
|
||||
LABEL org.opencontainers.image.title="Pixman build environment for platform coverage" \
|
||||
org.opencontainers.image.authors="Marek Pikuła <m.pikula@partner.samsung.com>"
|
||||
|
||||
ARG DEBIAN_FRONTEND=noninteractive
|
||||
ENV APT_UPDATE="apt-get update" \
|
||||
APT_INSTALL="apt-get install -y --no-install-recommends" \
|
||||
APT_CLEANUP="rm -rf /var/lib/apt/lists/* /var/cache/apt/archives/*"
|
||||
|
||||
ARG GCOVR_VERSION="~=7.2"
|
||||
ARG MESON_VERSION="~=1.6"
|
||||
RUN ${APT_UPDATE} \
|
||||
&& ${APT_INSTALL} \
|
||||
# Build dependencies.
|
||||
build-essential \
|
||||
ninja-build \
|
||||
pkg-config \
|
||||
qemu-user \
|
||||
# pipx dependencies.
|
||||
python3-argcomplete \
|
||||
python3-packaging \
|
||||
python3-pip \
|
||||
python3-platformdirs \
|
||||
python3-userpath \
|
||||
python3-venv \
|
||||
# gcovr dependencies.
|
||||
libxml2-dev \
|
||||
libxslt-dev \
|
||||
python3-dev \
|
||||
&& ${APT_CLEANUP} \
|
||||
# Install pipx using pip to have a more recent version of pipx, which
|
||||
# supports the `--global` flag.
|
||||
&& pip install pipx --break-system-packages \
|
||||
# Install a recent version of meson and gcovr using pipx to have the same
|
||||
# version across all variants regardless of base.
|
||||
&& pipx install --global \
|
||||
gcovr${GCOVR_VERSION} \
|
||||
meson${MESON_VERSION} \
|
||||
&& gcovr --version \
|
||||
&& echo Meson version: \
|
||||
&& meson --version
|
||||
|
||||
FROM base AS llvm-base
|
||||
# LLVM 16 is the highest available in Bookworm. Preferably, we should use the
|
||||
# same version for all platforms, but it's not possible at the moment.
|
||||
ARG LLVM_VERSION=16
|
||||
RUN ${APT_UPDATE} \
|
||||
&& ${APT_INSTALL} \
|
||||
clang-${LLVM_VERSION} \
|
||||
libclang-rt-${LLVM_VERSION}-dev \
|
||||
lld-${LLVM_VERSION} \
|
||||
llvm-${LLVM_VERSION} \
|
||||
&& ${APT_CLEANUP} \
|
||||
&& ln -f /usr/bin/clang-${LLVM_VERSION} /usr/bin/clang \
|
||||
&& ln -f /usr/bin/lld-${LLVM_VERSION} /usr/bin/lld \
|
||||
&& ln -f /usr/bin/llvm-ar-${LLVM_VERSION} /usr/bin/llvm-ar \
|
||||
&& ln -f /usr/bin/llvm-strip-${LLVM_VERSION} /usr/bin/llvm-strip
|
||||
|
||||
FROM llvm-base AS native-base
|
||||
ARG LLVM_VERSION=16
|
||||
RUN ${APT_UPDATE} \
|
||||
&& ${APT_INSTALL} \
|
||||
# Runtime library dependencies.
|
||||
libglib2.0-dev \
|
||||
libgtk-3-dev \
|
||||
libpng-dev \
|
||||
# Install libomp-dev if available (OpenMP support for LLVM). It's done only
|
||||
# for the native images, as OpenMP support in cross-build environment is
|
||||
# tricky for LLVM.
|
||||
&& (${APT_INSTALL} libomp-${LLVM_VERSION}-dev \
|
||||
|| echo "OpenMP not available on this platform.") \
|
||||
&& ${APT_CLEANUP}
|
||||
|
||||
# The following targets differ in BASE_IMAGE.
|
||||
FROM native-base AS linux-386
|
||||
FROM native-base AS linux-amd64
|
||||
FROM native-base AS linux-arm-v5
|
||||
FROM native-base AS linux-arm-v7
|
||||
FROM native-base AS linux-arm64-v8
|
||||
FROM native-base AS linux-mips64el
|
||||
FROM native-base AS linux-mipsel
|
||||
FROM native-base AS linux-ppc64le
|
||||
FROM native-base AS linux-riscv64
|
||||
|
||||
# The following targets should have a common BASE_IMAGE.
|
||||
FROM llvm-base AS linux-mips
|
||||
RUN ${APT_UPDATE} \
|
||||
&& ${APT_INSTALL} gcc-multilib-mips-linux-gnu \
|
||||
&& ${APT_CLEANUP}
|
||||
|
||||
FROM llvm-base AS linux-ppc
|
||||
RUN ${APT_UPDATE} \
|
||||
&& ${APT_INSTALL} gcc-multilib-powerpc-linux-gnu \
|
||||
&& ${APT_CLEANUP}
|
||||
|
||||
FROM llvm-base AS linux-ppc64
|
||||
RUN ${APT_UPDATE} \
|
||||
&& ${APT_INSTALL} gcc-multilib-powerpc64-linux-gnu \
|
||||
&& ${APT_CLEANUP}
|
||||
|
||||
# We use a common image for Windows i686 and amd64, as it doesn't make sense to
|
||||
# make them separate in terms of build time and image size. After two runs they
|
||||
# should use the same cache layers, so in the end it makes the collective image
|
||||
# size smaller.
|
||||
FROM base AS windows-base
|
||||
ARG LLVM_MINGW_RELEASE=20240619
|
||||
ARG LLVM_MINGW_VARIANT=llvm-mingw-${LLVM_MINGW_RELEASE}-msvcrt-ubuntu-20.04-x86_64
|
||||
RUN ${APT_UPDATE} \
|
||||
&& ${APT_INSTALL} wget \
|
||||
&& ${APT_CLEANUP} \
|
||||
&& cd /opt \
|
||||
&& wget https://github.com/mstorsjo/llvm-mingw/releases/download/${LLVM_MINGW_RELEASE}/${LLVM_MINGW_VARIANT}.tar.xz \
|
||||
&& tar -xf ${LLVM_MINGW_VARIANT}.tar.xz \
|
||||
&& rm -f ${LLVM_MINGW_VARIANT}.tar.xz
|
||||
ENV PATH=${PATH}:/opt/${LLVM_MINGW_VARIANT}/bin
|
||||
|
||||
FROM windows-base AS windows-x86-base
|
||||
RUN dpkg --add-architecture i386 \
|
||||
&& ${APT_UPDATE} \
|
||||
&& ${APT_INSTALL} \
|
||||
gcc-mingw-w64-i686 \
|
||||
gcc-mingw-w64-x86-64 \
|
||||
mingw-w64-tools \
|
||||
procps \
|
||||
wine \
|
||||
wine32 \
|
||||
wine64 \
|
||||
&& ${APT_CLEANUP} \
|
||||
# Inspired by https://code.videolan.org/videolan/docker-images
|
||||
&& wine wineboot --init \
|
||||
&& while pgrep wineserver > /dev/null; do \
|
||||
echo "waiting ..."; \
|
||||
sleep 1; \
|
||||
done \
|
||||
&& rm -rf /tmp/wine-*
|
||||
|
||||
FROM windows-x86-base AS windows-686
|
||||
FROM windows-x86-base AS windows-amd64
|
||||
|
||||
# aarch64 image requires linaro/wine-arm64 as a base.
|
||||
FROM windows-base AS windows-arm64-v8
|
||||
RUN wine-arm64 wineboot --init \
|
||||
&& while pgrep wineserver > /dev/null; do \
|
||||
echo "waiting ..."; \
|
||||
sleep 1; \
|
||||
done \
|
||||
&& rm -rf /tmp/wine-*
|
4
.gitlab-ci.d/01-docker/target-env/linux-386.env
Normal file
4
.gitlab-ci.d/01-docker/target-env/linux-386.env
Normal file
@ -0,0 +1,4 @@
|
||||
DOCKER_PLATFORM=linux/386
|
||||
BASE_IMAGE=docker.io/i386/debian
|
||||
BASE_IMAGE_TAG=bookworm-slim
|
||||
LLVM_VERSION=16
|
4
.gitlab-ci.d/01-docker/target-env/linux-amd64.env
Normal file
4
.gitlab-ci.d/01-docker/target-env/linux-amd64.env
Normal file
@ -0,0 +1,4 @@
|
||||
DOCKER_PLATFORM=linux/amd64
|
||||
BASE_IMAGE=docker.io/amd64/debian
|
||||
BASE_IMAGE_TAG=bookworm-slim
|
||||
LLVM_VERSION=16
|
4
.gitlab-ci.d/01-docker/target-env/linux-arm-v5.env
Normal file
4
.gitlab-ci.d/01-docker/target-env/linux-arm-v5.env
Normal file
@ -0,0 +1,4 @@
|
||||
DOCKER_PLATFORM=linux/arm/v5
|
||||
BASE_IMAGE=docker.io/arm32v5/debian
|
||||
BASE_IMAGE_TAG=bookworm-slim
|
||||
LLVM_VERSION=16
|
4
.gitlab-ci.d/01-docker/target-env/linux-arm-v7.env
Normal file
4
.gitlab-ci.d/01-docker/target-env/linux-arm-v7.env
Normal file
@ -0,0 +1,4 @@
|
||||
DOCKER_PLATFORM=linux/arm/v7
|
||||
BASE_IMAGE=docker.io/arm32v7/debian
|
||||
BASE_IMAGE_TAG=bookworm-slim
|
||||
LLVM_VERSION=16
|
4
.gitlab-ci.d/01-docker/target-env/linux-arm64-v8.env
Normal file
4
.gitlab-ci.d/01-docker/target-env/linux-arm64-v8.env
Normal file
@ -0,0 +1,4 @@
|
||||
DOCKER_PLATFORM=linux/arm64/v8
|
||||
BASE_IMAGE=docker.io/arm64v8/debian
|
||||
BASE_IMAGE_TAG=bookworm-slim
|
||||
LLVM_VERSION=16
|
4
.gitlab-ci.d/01-docker/target-env/linux-mips.env
Normal file
4
.gitlab-ci.d/01-docker/target-env/linux-mips.env
Normal file
@ -0,0 +1,4 @@
|
||||
DOCKER_PLATFORM=linux/amd64
|
||||
BASE_IMAGE=docker.io/amd64/debian
|
||||
BASE_IMAGE_TAG=bookworm-slim
|
||||
LLVM_VERSION=16
|
4
.gitlab-ci.d/01-docker/target-env/linux-mips64el.env
Normal file
4
.gitlab-ci.d/01-docker/target-env/linux-mips64el.env
Normal file
@ -0,0 +1,4 @@
|
||||
DOCKER_PLATFORM=linux/mips64el
|
||||
BASE_IMAGE=docker.io/mips64le/debian
|
||||
BASE_IMAGE_TAG=bookworm-slim
|
||||
LLVM_VERSION=16
|
4
.gitlab-ci.d/01-docker/target-env/linux-mipsel.env
Normal file
4
.gitlab-ci.d/01-docker/target-env/linux-mipsel.env
Normal file
@ -0,0 +1,4 @@
|
||||
DOCKER_PLATFORM=linux/mipsel
|
||||
BASE_IMAGE=docker.io/serenitycode/debian-debootstrap
|
||||
BASE_IMAGE_TAG=mipsel-bookworm-slim
|
||||
LLVM_VERSION=14
|
1
.gitlab-ci.d/01-docker/target-env/linux-ppc.env
Symbolic link
1
.gitlab-ci.d/01-docker/target-env/linux-ppc.env
Symbolic link
@ -0,0 +1 @@
|
||||
linux-amd64.env
|
1
.gitlab-ci.d/01-docker/target-env/linux-ppc64.env
Symbolic link
1
.gitlab-ci.d/01-docker/target-env/linux-ppc64.env
Symbolic link
@ -0,0 +1 @@
|
||||
linux-amd64.env
|
4
.gitlab-ci.d/01-docker/target-env/linux-ppc64le.env
Normal file
4
.gitlab-ci.d/01-docker/target-env/linux-ppc64le.env
Normal file
@ -0,0 +1,4 @@
|
||||
DOCKER_PLATFORM=linux/ppc64le
|
||||
BASE_IMAGE=docker.io/ppc64le/debian
|
||||
BASE_IMAGE_TAG=bookworm-slim
|
||||
LLVM_VERSION=16
|
4
.gitlab-ci.d/01-docker/target-env/linux-riscv64.env
Normal file
4
.gitlab-ci.d/01-docker/target-env/linux-riscv64.env
Normal file
@ -0,0 +1,4 @@
|
||||
DOCKER_PLATFORM=linux/riscv64
|
||||
BASE_IMAGE=docker.io/riscv64/debian
|
||||
BASE_IMAGE_TAG=sid-slim
|
||||
LLVM_VERSION=18
|
1
.gitlab-ci.d/01-docker/target-env/windows-686.env
Symbolic link
1
.gitlab-ci.d/01-docker/target-env/windows-686.env
Symbolic link
@ -0,0 +1 @@
|
||||
linux-amd64.env
|
1
.gitlab-ci.d/01-docker/target-env/windows-amd64.env
Symbolic link
1
.gitlab-ci.d/01-docker/target-env/windows-amd64.env
Symbolic link
@ -0,0 +1 @@
|
||||
linux-amd64.env
|
3
.gitlab-ci.d/01-docker/target-env/windows-arm64-v8.env
Normal file
3
.gitlab-ci.d/01-docker/target-env/windows-arm64-v8.env
Normal file
@ -0,0 +1,3 @@
|
||||
DOCKER_PLATFORM=linux/amd64
|
||||
BASE_IMAGE=docker.io/linaro/wine-arm64
|
||||
BASE_IMAGE_TAG=latest
|
107
.gitlab-ci.d/02-build.yml
Normal file
107
.gitlab-ci.d/02-build.yml
Normal file
@ -0,0 +1,107 @@
|
||||
# Build stage
|
||||
#
|
||||
# This stage builds pixman with enabled coverage for all supported
|
||||
# architectures.
|
||||
#
|
||||
# Some targets don't support atomic profile update, so to decrease the number of
|
||||
# gcov errors, they need to be built without OpenMP (single threaded) by adding
|
||||
# `-Dopenmp=disabled` Meson argument.
|
||||
|
||||
variables:
|
||||
# Used in test stage as well.
|
||||
BUILD_DIR: build-${TOOLCHAIN}
|
||||
|
||||
# Applicable to all build targets.
|
||||
|
||||
include:
|
||||
- local: .gitlab-ci.d/templates/build.yml
|
||||
inputs:
|
||||
target: linux-386
|
||||
- local: .gitlab-ci.d/templates/build.yml
|
||||
inputs:
|
||||
target: linux-amd64
|
||||
- local: .gitlab-ci.d/templates/build.yml
|
||||
inputs:
|
||||
target: linux-arm-v5
|
||||
qemu_cpu: arm1136
|
||||
# Disable coverage, as the tests take too long to run with a single thread.
|
||||
enable_gnu_coverage: false
|
||||
- local: .gitlab-ci.d/templates/build.yml
|
||||
inputs:
|
||||
target: linux-arm-v7
|
||||
qemu_cpu: max
|
||||
- local: .gitlab-ci.d/templates/build.yml
|
||||
inputs:
|
||||
target: linux-arm64-v8
|
||||
qemu_cpu: max
|
||||
- local: .gitlab-ci.d/templates/build.yml
|
||||
inputs:
|
||||
target: linux-mips
|
||||
toolchain: [gnu]
|
||||
qemu_cpu: 74Kf
|
||||
enable_gnu_coverage: false
|
||||
# TODO: Merge with the one above once the following issue is resolved:
|
||||
# https://gitlab.freedesktop.org/pixman/pixman/-/issues/105).
|
||||
- local: .gitlab-ci.d/templates/build.yml
|
||||
inputs:
|
||||
target: linux-mips
|
||||
toolchain: [llvm]
|
||||
qemu_cpu: 74Kf
|
||||
job_name_prefix: "."
|
||||
job_name_suffix: ":failing"
|
||||
allow_failure: true
|
||||
retry: 0
|
||||
- local: .gitlab-ci.d/templates/build.yml
|
||||
inputs:
|
||||
target: linux-mips64el
|
||||
qemu_cpu: Loongson-3A4000
|
||||
- local: .gitlab-ci.d/templates/build.yml
|
||||
inputs:
|
||||
target: linux-mipsel
|
||||
toolchain: [gnu]
|
||||
qemu_cpu: 74Kf
|
||||
# Disable coverage, as the tests take too long to run with a single thread.
|
||||
enable_gnu_coverage: false
|
||||
# TODO: Merge with the one above once the following issue is resolved:
|
||||
# https://gitlab.freedesktop.org/pixman/pixman/-/issues/105).
|
||||
- local: .gitlab-ci.d/templates/build.yml
|
||||
inputs:
|
||||
target: linux-mipsel
|
||||
toolchain: [llvm]
|
||||
qemu_cpu: 74Kf
|
||||
job_name_prefix: "."
|
||||
job_name_suffix: ":failing"
|
||||
allow_failure: true
|
||||
retry: 0
|
||||
- local: .gitlab-ci.d/templates/build.yml
|
||||
inputs:
|
||||
target: linux-ppc
|
||||
qemu_cpu: g4
|
||||
enable_gnu_coverage: false
|
||||
- local: .gitlab-ci.d/templates/build.yml
|
||||
inputs:
|
||||
target: linux-ppc64
|
||||
qemu_cpu: ppc64
|
||||
enable_gnu_coverage: false
|
||||
- local: .gitlab-ci.d/templates/build.yml
|
||||
inputs:
|
||||
target: linux-ppc64le
|
||||
qemu_cpu: power10
|
||||
- local: .gitlab-ci.d/templates/build.yml
|
||||
inputs:
|
||||
target: linux-riscv64
|
||||
qemu_cpu: rv64
|
||||
- local: .gitlab-ci.d/templates/build.yml
|
||||
inputs:
|
||||
target: windows-686
|
||||
enable_gnu_coverage: false
|
||||
- local: .gitlab-ci.d/templates/build.yml
|
||||
inputs:
|
||||
target: windows-amd64
|
||||
enable_gnu_coverage: false
|
||||
- local: .gitlab-ci.d/templates/build.yml
|
||||
inputs:
|
||||
target: windows-arm64-v8
|
||||
toolchain: [llvm] # GNU toolchain doesn't seem to support Windows on ARM.
|
||||
qemu_cpu: max
|
||||
enable_gnu_coverage: false
|
175
.gitlab-ci.d/03-test.yml
Normal file
175
.gitlab-ci.d/03-test.yml
Normal file
@ -0,0 +1,175 @@
|
||||
# Test stage
|
||||
#
|
||||
# This stage executes the test suite for pixman for all architectures in
|
||||
# different configurations. Build and test is split, as some architectures can
|
||||
# have different QEMU configuration or have multiple supported pixman backends,
|
||||
# which are executed as job matrix.
|
||||
#
|
||||
# Mind that `PIXMAN_ENABLE` variable in matrix runs does nothing, but it looks
|
||||
# better in CI to indicate what is actually being tested.
|
||||
#
|
||||
# Some emulated targets are really slow or cannot be run in multithreaded mode
|
||||
# (mipsel, arm-v5). Thus coverage reporting is disabled for them.
|
||||
|
||||
variables:
|
||||
# Used in summary stage as well.
|
||||
COVERAGE_BASE_DIR: coverage
|
||||
COVERAGE_OUT: ${COVERAGE_BASE_DIR}/${CI_JOB_ID}
|
||||
TEST_NAME: "" # Allow to specify a set of tests to run with run variables.
|
||||
|
||||
include:
|
||||
- local: .gitlab-ci.d/templates/test.yml
|
||||
inputs:
|
||||
target: linux-386
|
||||
toolchain: [gnu]
|
||||
pixman_disable:
|
||||
- "sse2 ssse3" # Testing "mmx"
|
||||
- "mmx ssse3" # Testing "sse2"
|
||||
- "mmx sse2" # Testing "ssse3"
|
||||
# TODO: Merge up after resolving
|
||||
# https://gitlab.freedesktop.org/pixman/pixman/-/issues/106
|
||||
- local: .gitlab-ci.d/templates/test.yml
|
||||
inputs:
|
||||
target: linux-386
|
||||
toolchain: [llvm]
|
||||
pixman_disable:
|
||||
# Same as above.
|
||||
- "sse2 ssse3"
|
||||
- "mmx ssse3"
|
||||
- "mmx sse2"
|
||||
job_name_prefix: "."
|
||||
job_name_suffix: ":failing"
|
||||
allow_failure: true
|
||||
retry: 0
|
||||
- local: .gitlab-ci.d/templates/test.yml
|
||||
inputs:
|
||||
target: linux-amd64
|
||||
pixman_disable:
|
||||
- ""
|
||||
- "fast"
|
||||
- "wholeops"
|
||||
- local: .gitlab-ci.d/templates/test.yml
|
||||
inputs:
|
||||
target: linux-arm-v5
|
||||
toolchain: [gnu]
|
||||
qemu_cpu: [arm1136]
|
||||
pixman_disable: ["arm-neon"] # Test only arm-simd.
|
||||
timeout: 3h
|
||||
test_timeout_multiplier: 40
|
||||
# TODO: Merge up after resolving
|
||||
# https://gitlab.freedesktop.org/pixman/pixman/-/issues/107
|
||||
- local: .gitlab-ci.d/templates/test.yml
|
||||
inputs:
|
||||
target: linux-arm-v5
|
||||
toolchain: [llvm]
|
||||
qemu_cpu: [arm1136]
|
||||
pixman_disable: ["arm-neon"] # Test only arm-simd.
|
||||
timeout: 3h
|
||||
test_timeout_multiplier: 40
|
||||
job_name_prefix: "."
|
||||
job_name_suffix: ":failing"
|
||||
allow_failure: true
|
||||
retry: 0
|
||||
- local: .gitlab-ci.d/templates/test.yml
|
||||
inputs:
|
||||
target: linux-arm-v7
|
||||
qemu_cpu: [max]
|
||||
- local: .gitlab-ci.d/templates/test.yml
|
||||
inputs:
|
||||
target: linux-arm64-v8
|
||||
qemu_cpu: [max]
|
||||
- local: .gitlab-ci.d/templates/test.yml
|
||||
inputs:
|
||||
target: linux-mips
|
||||
toolchain: [gnu] # TODO: Add llvm once the build is fixed.
|
||||
qemu_cpu: [74Kf]
|
||||
job_name_prefix: "."
|
||||
job_name_suffix: ":failing"
|
||||
allow_failure: true # Some tests seem to fail.
|
||||
retry: 0
|
||||
- local: .gitlab-ci.d/templates/test.yml
|
||||
inputs:
|
||||
target: linux-mips64el
|
||||
toolchain: [gnu]
|
||||
qemu_cpu: [Loongson-3A4000]
|
||||
# TODO: Merge up after resolving
|
||||
# https://gitlab.freedesktop.org/pixman/pixman/-/issues/108
|
||||
- local: .gitlab-ci.d/templates/test.yml
|
||||
inputs:
|
||||
target: linux-mips64el
|
||||
toolchain: [llvm]
|
||||
qemu_cpu: [Loongson-3A4000]
|
||||
job_name_prefix: "."
|
||||
job_name_suffix: ":failing"
|
||||
allow_failure: true
|
||||
retry: 0
|
||||
- local: .gitlab-ci.d/templates/test.yml
|
||||
inputs:
|
||||
target: linux-mipsel
|
||||
toolchain: [gnu] # TODO: Add llvm once the build is fixed.
|
||||
qemu_cpu: [74Kf]
|
||||
timeout: 2h
|
||||
- local: .gitlab-ci.d/templates/test.yml
|
||||
inputs:
|
||||
target: linux-ppc
|
||||
qemu_cpu: [g4]
|
||||
job_name_prefix: "."
|
||||
job_name_suffix: ":failing"
|
||||
allow_failure: true # SIGILL for some tests
|
||||
retry: 0
|
||||
- local: .gitlab-ci.d/templates/test.yml
|
||||
inputs:
|
||||
target: linux-ppc64
|
||||
qemu_cpu: [ppc64]
|
||||
job_name_prefix: "."
|
||||
job_name_suffix: ":failing"
|
||||
allow_failure: true # SIGSEGV for some tests
|
||||
retry: 0
|
||||
- local: .gitlab-ci.d/templates/test.yml
|
||||
inputs:
|
||||
target: linux-ppc64le
|
||||
toolchain: [gnu]
|
||||
qemu_cpu: [power10]
|
||||
# TODO: Merge up after resolving
|
||||
# https://gitlab.freedesktop.org/pixman/pixman/-/issues/109
|
||||
- local: .gitlab-ci.d/templates/test.yml
|
||||
inputs:
|
||||
target: linux-ppc64le
|
||||
toolchain: [llvm]
|
||||
qemu_cpu: [power10]
|
||||
job_name_prefix: "."
|
||||
job_name_suffix: ":failing"
|
||||
allow_failure: true
|
||||
retry: 0
|
||||
- local: .gitlab-ci.d/templates/test.yml
|
||||
inputs:
|
||||
target: linux-riscv64
|
||||
qemu_cpu:
|
||||
# Test on target without RVV (verify no autovectorization).
|
||||
- rv64,v=false
|
||||
# Test correctness for different VLENs.
|
||||
- rv64,v=true,vext_spec=v1.0,vlen=128,elen=64
|
||||
- rv64,v=true,vext_spec=v1.0,vlen=256,elen=64
|
||||
- rv64,v=true,vext_spec=v1.0,vlen=512,elen=64
|
||||
- rv64,v=true,vext_spec=v1.0,vlen=1024,elen=64
|
||||
- local: .gitlab-ci.d/templates/test.yml
|
||||
inputs:
|
||||
target: windows-686
|
||||
pixman_disable:
|
||||
# The same as for linux-386.
|
||||
- "sse2 ssse3"
|
||||
- "mmx ssse3"
|
||||
- "mmx sse2"
|
||||
- local: .gitlab-ci.d/templates/test.yml
|
||||
inputs:
|
||||
target: windows-amd64
|
||||
pixman_disable:
|
||||
# The same as for linux-amd64.
|
||||
- ""
|
||||
- "fast"
|
||||
- "wholeops"
|
||||
- local: .gitlab-ci.d/templates/test.yml
|
||||
inputs:
|
||||
target: windows-arm64-v8
|
||||
toolchain: [llvm]
|
||||
qemu_cpu: [max]
|
47
.gitlab-ci.d/04-summary.yml
Normal file
47
.gitlab-ci.d/04-summary.yml
Normal file
@ -0,0 +1,47 @@
|
||||
# Summary stage
|
||||
#
|
||||
# This stage takes coverage reports from test runs for all architectures, and
|
||||
# merges it into a single report, with GitLab visualization. There is also an
|
||||
# HTML report generated as a separate artifact.
|
||||
|
||||
summary:
|
||||
extends: .target:all
|
||||
stage: summary
|
||||
variables:
|
||||
TARGET: linux-amd64
|
||||
COVERAGE_SUMMARY_DIR: ${COVERAGE_BASE_DIR}/summary
|
||||
needs:
|
||||
- job: test:linux-386
|
||||
optional: true
|
||||
- job: test:linux-amd64
|
||||
optional: true
|
||||
- job: test:linux-arm-v7
|
||||
optional: true
|
||||
- job: test:linux-arm64-v8
|
||||
optional: true
|
||||
- job: test:linux-mips64el
|
||||
optional: true
|
||||
- job: test:linux-ppc64le
|
||||
optional: true
|
||||
- job: test:linux-riscv64
|
||||
optional: true
|
||||
script:
|
||||
- echo "Input coverage reports:" && ls ${COVERAGE_BASE_DIR}/*.json || (echo "No coverage reports available." && exit)
|
||||
- |
|
||||
args=( )
|
||||
for f in ${COVERAGE_BASE_DIR}/*.json; do
|
||||
args+=( "-a" "$f" )
|
||||
done
|
||||
- mkdir -p ${COVERAGE_SUMMARY_DIR}
|
||||
- gcovr "${args[@]}"
|
||||
--cobertura-pretty --cobertura ${COVERAGE_SUMMARY_DIR}/coverage.xml
|
||||
--html-details ${COVERAGE_SUMMARY_DIR}/coverage.html
|
||||
--txt --print-summary
|
||||
coverage: '/^TOTAL.*\s+(\d+\%)$/'
|
||||
artifacts:
|
||||
reports:
|
||||
coverage_report:
|
||||
coverage_format: cobertura
|
||||
path: ${COVERAGE_SUMMARY_DIR}/coverage.xml
|
||||
paths:
|
||||
- ${COVERAGE_SUMMARY_DIR}/
|
1
.gitlab-ci.d/meson-cross/linux-386-gnu.meson
Symbolic link
1
.gitlab-ci.d/meson-cross/linux-386-gnu.meson
Symbolic link
@ -0,0 +1 @@
|
||||
native-gnu.meson
|
1
.gitlab-ci.d/meson-cross/linux-386-llvm.meson
Symbolic link
1
.gitlab-ci.d/meson-cross/linux-386-llvm.meson
Symbolic link
@ -0,0 +1 @@
|
||||
native-llvm.meson
|
1
.gitlab-ci.d/meson-cross/linux-amd64-gnu.meson
Symbolic link
1
.gitlab-ci.d/meson-cross/linux-amd64-gnu.meson
Symbolic link
@ -0,0 +1 @@
|
||||
native-gnu.meson
|
1
.gitlab-ci.d/meson-cross/linux-amd64-llvm.meson
Symbolic link
1
.gitlab-ci.d/meson-cross/linux-amd64-llvm.meson
Symbolic link
@ -0,0 +1 @@
|
||||
native-llvm.meson
|
1
.gitlab-ci.d/meson-cross/linux-arm-v5-gnu.meson
Symbolic link
1
.gitlab-ci.d/meson-cross/linux-arm-v5-gnu.meson
Symbolic link
@ -0,0 +1 @@
|
||||
native-gnu-noopenmp.meson
|
1
.gitlab-ci.d/meson-cross/linux-arm-v5-llvm.meson
Symbolic link
1
.gitlab-ci.d/meson-cross/linux-arm-v5-llvm.meson
Symbolic link
@ -0,0 +1 @@
|
||||
native-llvm-noopenmp.meson
|
1
.gitlab-ci.d/meson-cross/linux-arm-v7-gnu.meson
Symbolic link
1
.gitlab-ci.d/meson-cross/linux-arm-v7-gnu.meson
Symbolic link
@ -0,0 +1 @@
|
||||
native-gnu.meson
|
1
.gitlab-ci.d/meson-cross/linux-arm-v7-llvm.meson
Symbolic link
1
.gitlab-ci.d/meson-cross/linux-arm-v7-llvm.meson
Symbolic link
@ -0,0 +1 @@
|
||||
native-llvm.meson
|
1
.gitlab-ci.d/meson-cross/linux-arm64-v8-gnu.meson
Symbolic link
1
.gitlab-ci.d/meson-cross/linux-arm64-v8-gnu.meson
Symbolic link
@ -0,0 +1 @@
|
||||
native-gnu.meson
|
1
.gitlab-ci.d/meson-cross/linux-arm64-v8-llvm.meson
Symbolic link
1
.gitlab-ci.d/meson-cross/linux-arm64-v8-llvm.meson
Symbolic link
@ -0,0 +1 @@
|
||||
native-llvm.meson
|
11
.gitlab-ci.d/meson-cross/linux-mips-gnu.meson
Normal file
11
.gitlab-ci.d/meson-cross/linux-mips-gnu.meson
Normal file
@ -0,0 +1,11 @@
|
||||
[binaries]
|
||||
c = ['mips-linux-gnu-gcc', '-DCI_HAS_ALL_MIPS_CPU_FEATURES']
|
||||
ar = 'mips-linux-gnu-ar'
|
||||
strip = 'mips-linux-gnu-strip'
|
||||
exe_wrapper = ['qemu-mips', '-L', '/usr/mips-linux-gnu/']
|
||||
|
||||
[host_machine]
|
||||
system = 'linux'
|
||||
cpu_family = 'mips32'
|
||||
cpu = 'mips32'
|
||||
endian = 'big'
|
14
.gitlab-ci.d/meson-cross/linux-mips-llvm.meson
Normal file
14
.gitlab-ci.d/meson-cross/linux-mips-llvm.meson
Normal file
@ -0,0 +1,14 @@
|
||||
[binaries]
|
||||
c = ['clang', '-target', 'mips-linux-gnu', '-fPIC', '-DCI_HAS_ALL_MIPS_CPU_FEATURES']
|
||||
ar = 'llvm-ar'
|
||||
strip = 'llvm-strip'
|
||||
exe_wrapper = ['qemu-mips', '-L', '/usr/mips-linux-gnu/']
|
||||
|
||||
[built-in options]
|
||||
c_link_args = ['-target', 'mips-linux-gnu', '-fuse-ld=lld']
|
||||
|
||||
[host_machine]
|
||||
system = 'linux'
|
||||
cpu_family = 'mips32'
|
||||
cpu = 'mips32'
|
||||
endian = 'big'
|
8
.gitlab-ci.d/meson-cross/linux-mips64el-gnu.meson
Normal file
8
.gitlab-ci.d/meson-cross/linux-mips64el-gnu.meson
Normal file
@ -0,0 +1,8 @@
|
||||
[binaries]
|
||||
c = ['gcc', '-DCI_HAS_ALL_MIPS_CPU_FEATURES']
|
||||
ar = 'ar'
|
||||
strip = 'strip'
|
||||
pkg-config = 'pkg-config'
|
||||
|
||||
[project options]
|
||||
mips-dspr2 = 'disabled'
|
8
.gitlab-ci.d/meson-cross/linux-mips64el-llvm.meson
Normal file
8
.gitlab-ci.d/meson-cross/linux-mips64el-llvm.meson
Normal file
@ -0,0 +1,8 @@
|
||||
[binaries]
|
||||
c = ['clang', '-DCI_HAS_ALL_MIPS_CPU_FEATURES']
|
||||
ar = 'llvm-ar'
|
||||
strip = 'llvm-strip'
|
||||
pkg-config = 'pkg-config'
|
||||
|
||||
[project options]
|
||||
mips-dspr2 = 'disabled'
|
1
.gitlab-ci.d/meson-cross/linux-mipsel-gnu.meson
Symbolic link
1
.gitlab-ci.d/meson-cross/linux-mipsel-gnu.meson
Symbolic link
@ -0,0 +1 @@
|
||||
native-gnu-noopenmp.meson
|
1
.gitlab-ci.d/meson-cross/linux-mipsel-llvm.meson
Symbolic link
1
.gitlab-ci.d/meson-cross/linux-mipsel-llvm.meson
Symbolic link
@ -0,0 +1 @@
|
||||
native-llvm-noopenmp.meson
|
11
.gitlab-ci.d/meson-cross/linux-ppc-gnu.meson
Normal file
11
.gitlab-ci.d/meson-cross/linux-ppc-gnu.meson
Normal file
@ -0,0 +1,11 @@
|
||||
[binaries]
|
||||
c = 'powerpc-linux-gnu-gcc'
|
||||
ar = 'powerpc-linux-gnu-ar'
|
||||
strip = 'powerpc-linux-gnu-strip'
|
||||
exe_wrapper = ['qemu-ppc', '-L', '/usr/powerpc-linux-gnu']
|
||||
|
||||
[host_machine]
|
||||
system = 'linux'
|
||||
cpu_family = 'ppc'
|
||||
cpu = 'ppc'
|
||||
endian = 'big'
|
15
.gitlab-ci.d/meson-cross/linux-ppc-llvm.meson
Normal file
15
.gitlab-ci.d/meson-cross/linux-ppc-llvm.meson
Normal file
@ -0,0 +1,15 @@
|
||||
[binaries]
|
||||
c = ['clang', '-target', 'powerpc-linux-gnu']
|
||||
ar = 'llvm-ar'
|
||||
strip = 'llvm-strip'
|
||||
exe_wrapper = ['qemu-ppc', '-L', '/usr/powerpc-linux-gnu/']
|
||||
|
||||
[built-in options]
|
||||
# We cannot use LLD, as it doesn't support big-endian PPC.
|
||||
c_link_args = ['-target', 'powerpc-linux-gnu']
|
||||
|
||||
[host_machine]
|
||||
system = 'linux'
|
||||
cpu_family = 'ppc'
|
||||
cpu = 'ppc'
|
||||
endian = 'big'
|
11
.gitlab-ci.d/meson-cross/linux-ppc64-gnu.meson
Normal file
11
.gitlab-ci.d/meson-cross/linux-ppc64-gnu.meson
Normal file
@ -0,0 +1,11 @@
|
||||
[binaries]
|
||||
c = 'powerpc64-linux-gnu-gcc'
|
||||
ar = 'powerpc64-linux-gnu-ar'
|
||||
strip = 'powerpc64-linux-gnu-strip'
|
||||
exe_wrapper = ['qemu-ppc64', '-L', '/usr/powerpc64-linux-gnu/']
|
||||
|
||||
[host_machine]
|
||||
system = 'linux'
|
||||
cpu_family = 'ppc64'
|
||||
cpu = 'ppc64'
|
||||
endian = 'big'
|
15
.gitlab-ci.d/meson-cross/linux-ppc64-llvm.meson
Normal file
15
.gitlab-ci.d/meson-cross/linux-ppc64-llvm.meson
Normal file
@ -0,0 +1,15 @@
|
||||
[binaries]
|
||||
c = ['clang', '-target', 'powerpc64-linux-gnu']
|
||||
ar = 'llvm-ar'
|
||||
strip = 'llvm-strip'
|
||||
exe_wrapper = ['qemu-ppc64', '-L', '/usr/powerpc64-linux-gnu/']
|
||||
|
||||
[built-in options]
|
||||
# We cannot use LLD, as it doesn't support big-endian PPC.
|
||||
c_link_args = ['-target', 'powerpc64-linux-gnu']
|
||||
|
||||
[host_machine]
|
||||
system = 'linux'
|
||||
cpu_family = 'ppc64'
|
||||
cpu = 'ppc64'
|
||||
endian = 'big'
|
1
.gitlab-ci.d/meson-cross/linux-ppc64le-gnu.meson
Symbolic link
1
.gitlab-ci.d/meson-cross/linux-ppc64le-gnu.meson
Symbolic link
@ -0,0 +1 @@
|
||||
native-gnu.meson
|
1
.gitlab-ci.d/meson-cross/linux-ppc64le-llvm.meson
Symbolic link
1
.gitlab-ci.d/meson-cross/linux-ppc64le-llvm.meson
Symbolic link
@ -0,0 +1 @@
|
||||
native-llvm.meson
|
1
.gitlab-ci.d/meson-cross/linux-riscv64-gnu.meson
Symbolic link
1
.gitlab-ci.d/meson-cross/linux-riscv64-gnu.meson
Symbolic link
@ -0,0 +1 @@
|
||||
native-gnu.meson
|
1
.gitlab-ci.d/meson-cross/linux-riscv64-llvm.meson
Symbolic link
1
.gitlab-ci.d/meson-cross/linux-riscv64-llvm.meson
Symbolic link
@ -0,0 +1 @@
|
||||
native-llvm.meson
|
8
.gitlab-ci.d/meson-cross/native-gnu-noopenmp.meson
Normal file
8
.gitlab-ci.d/meson-cross/native-gnu-noopenmp.meson
Normal file
@ -0,0 +1,8 @@
|
||||
[binaries]
|
||||
c = ['gcc', '-DCI_HAS_ALL_MIPS_CPU_FEATURES']
|
||||
ar = 'ar'
|
||||
strip = 'strip'
|
||||
pkg-config = 'pkg-config'
|
||||
|
||||
[project options]
|
||||
openmp = 'disabled'
|
5
.gitlab-ci.d/meson-cross/native-gnu.meson
Normal file
5
.gitlab-ci.d/meson-cross/native-gnu.meson
Normal file
@ -0,0 +1,5 @@
|
||||
[binaries]
|
||||
c = 'gcc'
|
||||
ar = 'ar'
|
||||
strip = 'strip'
|
||||
pkg-config = 'pkg-config'
|
8
.gitlab-ci.d/meson-cross/native-llvm-noopenmp.meson
Normal file
8
.gitlab-ci.d/meson-cross/native-llvm-noopenmp.meson
Normal file
@ -0,0 +1,8 @@
|
||||
[binaries]
|
||||
c = ['clang', '-DCI_HAS_ALL_MIPS_CPU_FEATURES']
|
||||
ar = 'llvm-ar'
|
||||
strip = 'llvm-strip'
|
||||
pkg-config = 'pkg-config'
|
||||
|
||||
[project options]
|
||||
openmp = 'disabled'
|
5
.gitlab-ci.d/meson-cross/native-llvm.meson
Normal file
5
.gitlab-ci.d/meson-cross/native-llvm.meson
Normal file
@ -0,0 +1,5 @@
|
||||
[binaries]
|
||||
c = 'clang'
|
||||
ar = 'llvm-ar'
|
||||
strip = 'llvm-strip'
|
||||
pkg-config = 'pkg-config'
|
18
.gitlab-ci.d/meson-cross/windows-686-gnu.meson
Normal file
18
.gitlab-ci.d/meson-cross/windows-686-gnu.meson
Normal file
@ -0,0 +1,18 @@
|
||||
[binaries]
|
||||
c = 'i686-w64-mingw32-gcc'
|
||||
ar = 'i686-w64-mingw32-ar'
|
||||
strip = 'i686-w64-mingw32-strip'
|
||||
windres = 'i686-w64-mingw32-windres'
|
||||
exe_wrapper = 'wine'
|
||||
|
||||
[built-in options]
|
||||
c_link_args = ['-static-libgcc']
|
||||
|
||||
[host_machine]
|
||||
system = 'windows'
|
||||
cpu_family = 'x86'
|
||||
cpu = 'i686'
|
||||
endian = 'little'
|
||||
|
||||
[project options]
|
||||
openmp = 'disabled'
|
18
.gitlab-ci.d/meson-cross/windows-686-llvm.meson
Normal file
18
.gitlab-ci.d/meson-cross/windows-686-llvm.meson
Normal file
@ -0,0 +1,18 @@
|
||||
[binaries]
|
||||
c = 'i686-w64-mingw32-clang'
|
||||
ar = 'i686-w64-mingw32-llvm-ar'
|
||||
strip = 'i686-w64-mingw32-strip'
|
||||
windres = 'i686-w64-mingw32-windres'
|
||||
exe_wrapper = 'wine'
|
||||
|
||||
[built-in options]
|
||||
c_link_args = ['-static']
|
||||
|
||||
[project options]
|
||||
openmp = 'disabled'
|
||||
|
||||
[host_machine]
|
||||
system = 'windows'
|
||||
cpu_family = 'x86'
|
||||
cpu = 'i686'
|
||||
endian = 'little'
|
15
.gitlab-ci.d/meson-cross/windows-amd64-gnu.meson
Normal file
15
.gitlab-ci.d/meson-cross/windows-amd64-gnu.meson
Normal file
@ -0,0 +1,15 @@
|
||||
[binaries]
|
||||
c = 'x86_64-w64-mingw32-gcc'
|
||||
ar = 'x86_64-w64-mingw32-ar'
|
||||
strip = 'x86_64-w64-mingw32-strip'
|
||||
windres = 'x86_64-w64-mingw32-windres'
|
||||
exe_wrapper = 'wine'
|
||||
|
||||
[built-in options]
|
||||
c_link_args = ['-static-libgcc']
|
||||
|
||||
[host_machine]
|
||||
system = 'windows'
|
||||
cpu_family = 'x86_64'
|
||||
cpu = 'x86_64'
|
||||
endian = 'little'
|
20
.gitlab-ci.d/meson-cross/windows-amd64-llvm.meson
Normal file
20
.gitlab-ci.d/meson-cross/windows-amd64-llvm.meson
Normal file
@ -0,0 +1,20 @@
|
||||
[binaries]
|
||||
c = 'x86_64-w64-mingw32-clang'
|
||||
ar = 'x86_64-w64-mingw32-llvm-ar'
|
||||
strip = 'x86_64-w64-mingw32-strip'
|
||||
windres = 'x86_64-w64-mingw32-windres'
|
||||
exe_wrapper = 'wine'
|
||||
|
||||
[built-in options]
|
||||
# Static linking is a workaround around `libwinpthread-1` not being discovered correctly.
|
||||
c_link_args = ['-static']
|
||||
|
||||
[project options]
|
||||
# OpenMP is disabled as it is not being discovered correctly during tests.
|
||||
openmp = 'disabled'
|
||||
|
||||
[host_machine]
|
||||
system = 'windows'
|
||||
cpu_family = 'x86_64'
|
||||
cpu = 'x86_64'
|
||||
endian = 'little'
|
18
.gitlab-ci.d/meson-cross/windows-arm64-v8-llvm.meson
Normal file
18
.gitlab-ci.d/meson-cross/windows-arm64-v8-llvm.meson
Normal file
@ -0,0 +1,18 @@
|
||||
[binaries]
|
||||
c = 'aarch64-w64-mingw32-clang'
|
||||
ar = 'aarch64-w64-mingw32-llvm-ar'
|
||||
strip = 'aarch64-w64-mingw32-strip'
|
||||
windres = 'aarch64-w64-mingw32-windres'
|
||||
exe_wrapper = 'wine-arm64'
|
||||
|
||||
[built-in options]
|
||||
c_link_args = ['-static']
|
||||
|
||||
[project options]
|
||||
openmp = 'disabled'
|
||||
|
||||
[host_machine]
|
||||
system = 'windows'
|
||||
cpu_family = 'aarch64'
|
||||
cpu = 'aarch64'
|
||||
endian = 'little'
|
65
.gitlab-ci.d/pixman-project.yml
Normal file
65
.gitlab-ci.d/pixman-project.yml
Normal file
@ -0,0 +1,65 @@
|
||||
# This file contains the set of jobs run by the pixman project:
|
||||
# https://gitlab.freedesktop.org/pixman/pixman/-/pipelines
|
||||
|
||||
stages:
|
||||
- docker
|
||||
- build
|
||||
- test
|
||||
- summary
|
||||
|
||||
variables:
|
||||
# Make it possible to change RUNNER_TAG from GitLab variables. The default
|
||||
# `kvm` tag has been tested with FDO infrastructure.
|
||||
RUNNER_TAG: kvm
|
||||
|
||||
# Docker image global configuration.
|
||||
DOCKER_TAG: latest
|
||||
DOCKER_IMAGE_NAME: registry.freedesktop.org/pixman/pixman/pixman:${DOCKER_TAG}
|
||||
|
||||
# Execute to load a target-specific environment.
|
||||
LOAD_TARGET_ENV: source .gitlab-ci.d/01-docker/target-env/${TARGET}.env
|
||||
|
||||
# Enable/disable specific targets for code and platform coverage targets.
|
||||
ACTIVE_TARGET_PATTERN: '/linux-386|linux-amd64|linux-arm-v5|linux-arm-v7|linux-arm64-v8|linux-mips|linux-mips64el|linux-mipsel|linux-ppc|linux-ppc64|linux-ppc64le|linux-riscv64|windows-686|windows-amd64|windows-arm64-v8/i'
|
||||
|
||||
workflow:
|
||||
rules:
|
||||
# Use modified Docker image if building in MR and Docker image is affected
|
||||
# by the MR.
|
||||
- if: $CI_PIPELINE_SOURCE == 'merge_request_event'
|
||||
changes:
|
||||
paths:
|
||||
- .gitlab-ci.d/01-docker.yml
|
||||
- .gitlab-ci.d/01-docker/**/*
|
||||
variables:
|
||||
DOCKER_TAG: $CI_COMMIT_REF_SLUG
|
||||
DOCKER_IMAGE_NAME: ${CI_REGISTRY_IMAGE}/pixman:${DOCKER_TAG}
|
||||
|
||||
# A standard set of GitLab CI triggers (i.e., MR, schedule, default branch,
|
||||
# and tag).
|
||||
- if: $CI_PIPELINE_SOURCE == 'merge_request_event'
|
||||
- if: $CI_COMMIT_BRANCH && $CI_OPEN_MERGE_REQUESTS
|
||||
when: never
|
||||
- if: $CI_PIPELINE_SOURCE == 'schedule'
|
||||
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
|
||||
- if: $CI_COMMIT_BRANCH
|
||||
- if: $CI_COMMIT_TAG
|
||||
|
||||
auto_cancel:
|
||||
on_new_commit: conservative
|
||||
on_job_failure: all
|
||||
|
||||
default:
|
||||
tags:
|
||||
- $RUNNER_TAG
|
||||
|
||||
# Retry in case the runner is misconfigured for multi-arch builds or some
|
||||
# random unexpected runner error occurs (it happened during testing).
|
||||
retry: 1
|
||||
|
||||
include:
|
||||
- local: "/.gitlab-ci.d/templates/targets.yml"
|
||||
- local: "/.gitlab-ci.d/01-docker.yml"
|
||||
- local: "/.gitlab-ci.d/02-build.yml"
|
||||
- local: "/.gitlab-ci.d/03-test.yml"
|
||||
- local: "/.gitlab-ci.d/04-summary.yml"
|
80
.gitlab-ci.d/templates/build.yml
Normal file
80
.gitlab-ci.d/templates/build.yml
Normal file
@ -0,0 +1,80 @@
|
||||
spec:
|
||||
inputs:
|
||||
target:
|
||||
description:
|
||||
Build target in form of "OS-ARCH" pair (e.g., linux-amd64). Mostly the
|
||||
same as platform string for Docker but with a hyphen instead of slash.
|
||||
toolchain:
|
||||
description:
|
||||
An array of toolchains to test with. Each toolchain should have an
|
||||
appropriate Meson cross file.
|
||||
type: array
|
||||
default: [gnu, llvm]
|
||||
qemu_cpu:
|
||||
description:
|
||||
QEMU_CPU environmental variable used by Docker (which uses QEMU
|
||||
underneath). It is not used by x86 targets, as they are executed
|
||||
natively on the host.
|
||||
default: ""
|
||||
enable_gnu_coverage:
|
||||
description:
|
||||
Enable coverage build flags. It can be later used to compile a coverage
|
||||
report for all the jobs. Should be enabled only for native build
|
||||
environments as they have all the optional dependencies, and are the
|
||||
most reliable and uniform (so disable for cross environments).
|
||||
type: boolean
|
||||
default: true
|
||||
job_name_prefix:
|
||||
description:
|
||||
Additional prefix for the job name. Can be used to disable a job with a
|
||||
"." prefix.
|
||||
default: ""
|
||||
job_name_suffix:
|
||||
description:
|
||||
Additional suffix for the job name. Can be used to prevent job
|
||||
duplication for jobs for the same target.
|
||||
default: ""
|
||||
allow_failure:
|
||||
description:
|
||||
Set the `allow_failure` flag for jobs that are expected to fail.
|
||||
Remember to set `retry` argument to 0 to prevent unnecessary retries.
|
||||
type: boolean
|
||||
default: false
|
||||
retry:
|
||||
description:
|
||||
Set the `retry` flag for a job. Usually used together with
|
||||
`allow_failure`.
|
||||
type: number
|
||||
default: 1
|
||||
---
|
||||
|
||||
"$[[ inputs.job_name_prefix ]]build:$[[ inputs.target ]]$[[ inputs.job_name_suffix ]]":
|
||||
extends: .target:all
|
||||
stage: build
|
||||
allow_failure: $[[ inputs.allow_failure ]]
|
||||
retry: $[[ inputs.retry ]]
|
||||
needs:
|
||||
- job: docker
|
||||
optional: true
|
||||
parallel:
|
||||
matrix:
|
||||
- TARGET: $[[ inputs.target ]]
|
||||
variables:
|
||||
TARGET: $[[ inputs.target ]]
|
||||
QEMU_CPU: $[[ inputs.qemu_cpu ]]
|
||||
parallel:
|
||||
matrix:
|
||||
- TOOLCHAIN: $[[ inputs.toolchain ]]
|
||||
script:
|
||||
- |
|
||||
if [ "$[[ inputs.enable_gnu_coverage ]]" == "true" ] && [ "${TOOLCHAIN}" == "gnu" ]; then
|
||||
COV_C_ARGS=-fprofile-update=atomic
|
||||
COV_MESON_BUILD_ARGS=-Db_coverage=true
|
||||
fi
|
||||
- meson setup ${BUILD_DIR}
|
||||
--cross-file .gitlab-ci.d/meson-cross/${TARGET}-${TOOLCHAIN}.meson
|
||||
-Dc_args="${COV_C_ARGS}" ${COV_MESON_BUILD_ARGS}
|
||||
- meson compile -C ${BUILD_DIR}
|
||||
artifacts:
|
||||
paths:
|
||||
- ${BUILD_DIR}/
|
9
.gitlab-ci.d/templates/targets.yml
Normal file
9
.gitlab-ci.d/templates/targets.yml
Normal file
@ -0,0 +1,9 @@
|
||||
# General target templates.
|
||||
|
||||
.target:all:
|
||||
image:
|
||||
name: $DOCKER_IMAGE_NAME-$TARGET
|
||||
rules:
|
||||
- if: "$TARGET =~ $ACTIVE_TARGET_PATTERN"
|
||||
before_script:
|
||||
- ${LOAD_TARGET_ENV}
|
112
.gitlab-ci.d/templates/test.yml
Normal file
112
.gitlab-ci.d/templates/test.yml
Normal file
@ -0,0 +1,112 @@
|
||||
spec:
|
||||
inputs:
|
||||
target:
|
||||
description:
|
||||
Build target in form of "OS-ARCH" pair (e.g., linux-amd64). Mostly the
|
||||
same as platform string for Docker but with a hyphen instead of slash.
|
||||
toolchain:
|
||||
description:
|
||||
An array of toolchains to test with. Each toolchain should have an
|
||||
appropriate Meson cross file.
|
||||
type: array
|
||||
default: [gnu, llvm]
|
||||
qemu_cpu:
|
||||
description:
|
||||
An array of QEMU_CPU environmental variables used as a job matrix
|
||||
variable, and in turn by Docker (which uses QEMU underneath). It is not
|
||||
used by x86 targets, as they are executed natively on the host.
|
||||
type: array
|
||||
default: [""]
|
||||
pixman_disable:
|
||||
description:
|
||||
An array of PIXMAN_DISABLE targets used as a job matrix variable.
|
||||
type: array
|
||||
default: [""]
|
||||
timeout:
|
||||
description:
|
||||
GitLab job timeout property. May need to be increased for slow
|
||||
targets.
|
||||
default: 1h
|
||||
test_timeout_multiplier:
|
||||
description:
|
||||
Test timeout multiplier flag used for Meson test execution. May need to
|
||||
be increased for slow targets.
|
||||
type: number
|
||||
default: 20
|
||||
meson_testthreads:
|
||||
description:
|
||||
Sets MESON_TESTTHREADS environmental variable. For some platforms, the
|
||||
tests should be executed one by one (without multithreading) to prevent
|
||||
gcovr errors.
|
||||
type: number
|
||||
default: 0
|
||||
gcovr_flags:
|
||||
description:
|
||||
Additional flags passed to gcovr tool.
|
||||
default: ""
|
||||
job_name_prefix:
|
||||
description:
|
||||
Additional prefix for the job name. Can be used to disable a job with a
|
||||
"." prefix.
|
||||
default: ""
|
||||
job_name_suffix:
|
||||
description:
|
||||
Additional suffix for the job name. Can be used to prevent job
|
||||
duplication for jobs for the same target.
|
||||
default: ""
|
||||
allow_failure:
|
||||
description:
|
||||
Set the `allow_failure` flag for jobs that are expected to fail.
|
||||
Remember to set `retry` argument to 0 to prevent unnecessary retries.
|
||||
type: boolean
|
||||
default: false
|
||||
retry:
|
||||
description:
|
||||
Set the `retry` flag for a job. Usually used together with
|
||||
`allow_failure`.
|
||||
type: number
|
||||
default: 1
|
||||
---
|
||||
|
||||
"$[[ inputs.job_name_prefix ]]test:$[[ inputs.target ]]$[[ inputs.job_name_suffix ]]":
|
||||
extends: .target:all
|
||||
stage: test
|
||||
allow_failure: $[[ inputs.allow_failure ]]
|
||||
retry: $[[ inputs.retry ]]
|
||||
timeout: $[[ inputs.timeout ]]
|
||||
needs:
|
||||
- job: docker
|
||||
optional: true
|
||||
parallel:
|
||||
matrix:
|
||||
- TARGET: $[[ inputs.target ]]
|
||||
- job: build:$[[ inputs.target ]]
|
||||
parallel:
|
||||
matrix:
|
||||
- TOOLCHAIN: $[[ inputs.toolchain ]]
|
||||
variables:
|
||||
TARGET: $[[ inputs.target ]]
|
||||
TEST_TIMEOUT_MULTIPLIER: $[[ inputs.test_timeout_multiplier ]]
|
||||
GCOVR_FLAGS: $[[ inputs.gcovr_flags ]]
|
||||
MESON_ARGS: -t ${TEST_TIMEOUT_MULTIPLIER} --no-rebuild -v ${TEST_NAME}
|
||||
MESON_TESTTHREADS: $[[ inputs.meson_testthreads ]]
|
||||
parallel:
|
||||
matrix:
|
||||
- TOOLCHAIN: $[[ inputs.toolchain ]]
|
||||
PIXMAN_DISABLE: $[[ inputs.pixman_disable ]]
|
||||
QEMU_CPU: $[[ inputs.qemu_cpu ]]
|
||||
script:
|
||||
- meson test -C ${BUILD_DIR} ${MESON_ARGS}
|
||||
after_script:
|
||||
- mkdir -p ${COVERAGE_OUT}
|
||||
- gcovr ${GCOVR_FLAGS} -r ./ ${BUILD_DIR} -e ./subprojects
|
||||
--json ${COVERAGE_OUT}.json
|
||||
--html-details ${COVERAGE_OUT}/coverage.html
|
||||
--print-summary || echo "No coverage data available."
|
||||
artifacts:
|
||||
paths:
|
||||
- ${BUILD_DIR}/meson-logs/testlog.txt
|
||||
- ${COVERAGE_BASE_DIR}/
|
||||
reports:
|
||||
junit:
|
||||
- ${BUILD_DIR}/meson-logs/testlog.junit.xml
|
@ -1,19 +1,16 @@
|
||||
image: fedora:28
|
||||
#
|
||||
# This is the GitLab CI configuration file for the mainstream pixman project:
|
||||
# https://gitlab.freedesktop.org/pixman/pixman/-/pipelines
|
||||
#
|
||||
# !!! DO NOT ADD ANY NEW CONFIGURATION TO THIS FILE !!!
|
||||
#
|
||||
# Only documentation or comments is accepted.
|
||||
#
|
||||
# To use a different set of jobs than the mainstream project, you need to set
|
||||
# the location of your custom yml file at "custom CI/CD configuration path", on
|
||||
# your GitLab CI namespace:
|
||||
# https://docs.gitlab.com/ee/ci/pipelines/settings.html#custom-cicd-configuration-path
|
||||
#
|
||||
|
||||
autotools-build:
|
||||
script:
|
||||
- dnf -y install dnf-plugins-core
|
||||
- dnf -y groupinstall buildsys-build
|
||||
- dnf -y builddep pixman
|
||||
- ./autogen.sh
|
||||
- make -sj4 check
|
||||
|
||||
meson-build:
|
||||
script:
|
||||
- dnf -y install dnf-plugins-core
|
||||
- dnf -y groupinstall buildsys-build
|
||||
- dnf -y builddep pixman
|
||||
- dnf -y install ninja-build
|
||||
- python3 -m pip install meson>=0.47.2
|
||||
- meson build
|
||||
- ninja -C build test
|
||||
include:
|
||||
- local: '/.gitlab-ci.d/pixman-project.yml'
|
||||
|
142
Makefile.am
142
Makefile.am
@ -1,142 +0,0 @@
|
||||
SUBDIRS = pixman demos test
|
||||
|
||||
pkgconfigdir=$(libdir)/pkgconfig
|
||||
pkgconfig_DATA=pixman-1.pc
|
||||
|
||||
$(pkgconfig_DATA): pixman-1.pc.in
|
||||
|
||||
snapshot:
|
||||
distdir="$(distdir)-`date '+%Y%m%d'`"; \
|
||||
test -d "$(srcdir)/.git" && distdir=$$distdir-`cd "$(srcdir)" && git rev-parse HEAD | cut -c 1-6`; \
|
||||
$(MAKE) $(AM_MAKEFLAGS) distdir="$$distdir" dist
|
||||
|
||||
GPGKEY=3892336E
|
||||
USERNAME=$$USER
|
||||
RELEASE_OR_SNAPSHOT = $$(if test "x$(PIXMAN_VERSION_MINOR)" = "x$$(echo "$(PIXMAN_VERSION_MINOR)/2*2" | bc)" ; then echo release; else echo snapshot; fi)
|
||||
RELEASE_CAIRO_HOST = $(USERNAME)@cairographics.org
|
||||
RELEASE_CAIRO_DIR = /srv/cairo.freedesktop.org/www/$(RELEASE_OR_SNAPSHOT)s
|
||||
RELEASE_CAIRO_URL = https://cairographics.org/$(RELEASE_OR_SNAPSHOT)s
|
||||
RELEASE_XORG_URL = https://www.x.org/releases/individual/lib
|
||||
RELEASE_XORG_HOST = $(USERNAME)@xorg.freedesktop.org
|
||||
RELEASE_XORG_DIR = /srv/xorg.freedesktop.org/archive/individual/lib
|
||||
RELEASE_ANNOUNCE_LIST = cairo-announce@cairographics.org, xorg-announce@lists.freedesktop.org, pixman@lists.freedesktop.org
|
||||
|
||||
EXTRA_DIST = \
|
||||
Makefile.win32 \
|
||||
Makefile.win32.common \
|
||||
meson.build \
|
||||
meson_options.txt \
|
||||
neon-test.S \
|
||||
arm-simd-test.S \
|
||||
$(NULL)
|
||||
|
||||
tar_gz = $(PACKAGE)-$(VERSION).tar.gz
|
||||
tar_xz = $(PACKAGE)-$(VERSION).tar.xz
|
||||
|
||||
sha512_tgz = $(tar_gz).sha512
|
||||
sha256_tgz = $(tar_gz).sha256
|
||||
|
||||
sha512_txz = $(tar_xz).sha512
|
||||
sha256_txz = $(tar_xz).sha256
|
||||
|
||||
gpg_file = $(sha512_tgz).asc
|
||||
|
||||
$(sha512_tgz): $(tar_gz)
|
||||
sha512sum $^ > $@
|
||||
|
||||
$(sha256_tgz): $(tar_gz)
|
||||
sha256sum $^ > $@
|
||||
|
||||
$(sha512_txz): $(tar_xz)
|
||||
sha512sum $^ > $@
|
||||
|
||||
$(sha256_txz): $(tar_xz)
|
||||
sha256sum $^ > $@
|
||||
|
||||
$(gpg_file): $(sha512_tgz)
|
||||
@echo "Please enter your GPG password to sign the checksum."
|
||||
gpg --armor --sign $^
|
||||
|
||||
HASHFILES = $(sha512_tgz) $(sha512_txz) $(sha256_tgz) $(sha256_txz)
|
||||
|
||||
release-verify-newer:
|
||||
@echo -n "Checking that no $(VERSION) release already exists at $(RELEASE_XORG_HOST)..."
|
||||
@ssh $(RELEASE_XORG_HOST) test ! -e $(RELEASE_XORG_DIR)/$(tar_gz) \
|
||||
|| (echo "Ouch." && echo "Found: $(RELEASE_XORG_HOST):$(RELEASE_XORG_DIR)/$(tar_gz)" \
|
||||
&& echo "Refusing to try to generate a new release of the same name." \
|
||||
&& false)
|
||||
@ssh $(RELEASE_CAIRO_HOST) test ! -e $(RELEASE_CAIRO_DIR)/$(tar_gz) \
|
||||
|| (echo "Ouch." && echo "Found: $(RELEASE_CAIRO_HOST):$(RELEASE_CAIRO_DIR)/$(tar_gz)" \
|
||||
&& echo "Refusing to try to generate a new release of the same name." \
|
||||
&& false)
|
||||
@echo "Good."
|
||||
|
||||
release-remove-old:
|
||||
$(RM) $(tar_gz) $(tar_xz) $(HASHFILES) $(gpg_file)
|
||||
|
||||
ensure-prev:
|
||||
@if [[ "$(PREV)" == "" ]]; then \
|
||||
echo "" && \
|
||||
echo "You must set the PREV variable on the make command line to" && \
|
||||
echo "the last version." && \
|
||||
echo "" && \
|
||||
echo "For example:" && \
|
||||
echo " make PREV=0.7.3" && \
|
||||
echo "" && \
|
||||
false; \
|
||||
fi
|
||||
|
||||
release-check: ensure-prev release-verify-newer release-remove-old distcheck
|
||||
|
||||
release-tag:
|
||||
git tag -u $(GPGKEY) -m "$(PACKAGE) $(VERSION) release" $(PACKAGE)-$(VERSION)
|
||||
|
||||
release-upload: release-check $(tar_gz) $(tar_xz) $(sha512_tgz) $(sha512_txz) $(sha256_tgz) $(gpg_file)
|
||||
scp $(tar_gz) $(sha512_tgz) $(gpg_file) $(RELEASE_CAIRO_HOST):$(RELEASE_CAIRO_DIR)
|
||||
scp $(tar_gz) $(tar_xz) $(RELEASE_XORG_HOST):$(RELEASE_XORG_DIR)
|
||||
ssh $(RELEASE_CAIRO_HOST) "rm -f $(RELEASE_CAIRO_DIR)/LATEST-$(PACKAGE)-[0-9]* && ln -s $(tar_gz) $(RELEASE_CAIRO_DIR)/LATEST-$(PACKAGE)-$(VERSION)"
|
||||
|
||||
RELEASE_TYPE = $$(if test "x$(PIXMAN_VERSION_MINOR)" = "x$$(echo "$(PIXMAN_VERSION_MINOR)/2*2" | bc)" ; then echo "stable release in the" ; else echo "development snapshot leading up to a stable"; fi)
|
||||
|
||||
release-publish-message: $(HASHFILES) ensure-prev
|
||||
@echo "Please follow the instructions in RELEASING to push stuff out and"
|
||||
@echo "send out the announcement mails. Here is the excerpt you need:"
|
||||
@echo ""
|
||||
@echo "Lists: $(RELEASE_ANNOUNCE_LIST)"
|
||||
@echo "Subject: [ANNOUNCE] $(PACKAGE) release $(VERSION) now available"
|
||||
@echo "============================== CUT HERE =============================="
|
||||
@echo "A new $(PACKAGE) release $(VERSION) is now available. This is a $(RELEASE_TYPE)"
|
||||
@echo ""
|
||||
@echo "tar.gz:"
|
||||
@echo " $(RELEASE_CAIRO_URL)/$(tar_gz)"
|
||||
@echo " $(RELEASE_XORG_URL)/$(tar_gz)"
|
||||
@echo ""
|
||||
@echo "tar.xz:"
|
||||
@echo " $(RELEASE_XORG_URL)/$(tar_xz)"
|
||||
@echo ""
|
||||
@echo "Hashes:"
|
||||
@echo -n " SHA256: "
|
||||
@cat $(sha256_tgz)
|
||||
@echo -n " SHA256: "
|
||||
@cat $(sha256_txz)
|
||||
@echo -n " SHA512: "
|
||||
@cat $(sha512_tgz)
|
||||
@echo -n " SHA512: "
|
||||
@cat $(sha512_txz)
|
||||
@echo ""
|
||||
@echo "GPG signature:"
|
||||
@echo " $(RELEASE_CAIRO_URL)/$(gpg_file)"
|
||||
@echo " (signed by`gpg --list-keys $(GPGKEY) | grep uid | cut -b4- | tr -s " "`)"
|
||||
@echo ""
|
||||
@echo "Git:"
|
||||
@echo " https://gitlab.freedesktop.org/pixman/pixman.git"
|
||||
@echo " tag: $(PACKAGE)-$(VERSION)"
|
||||
@echo ""
|
||||
@echo "Log:"
|
||||
@git log --no-merges "$(PACKAGE)-$(PREV)".."$(PACKAGE)-$(VERSION)" | git shortlog | awk '{ printf "\t"; print ; }' | cut -b1-80
|
||||
@echo "============================== CUT HERE =============================="
|
||||
@echo ""
|
||||
|
||||
release-publish: release-upload release-tag release-publish-message
|
||||
|
||||
.PHONY: release-upload release-publish release-publish-message release-tag
|
@ -1,25 +0,0 @@
|
||||
default: all
|
||||
|
||||
top_srcdir = .
|
||||
include $(top_srcdir)/Makefile.win32.common
|
||||
|
||||
all: pixman test
|
||||
|
||||
pixman:
|
||||
@$(MAKE) -C pixman -f Makefile.win32
|
||||
|
||||
test:
|
||||
@$(MAKE) -C test -f Makefile.win32
|
||||
|
||||
clean_r:
|
||||
@$(MAKE) -C pixman -f Makefile.win32 clean
|
||||
@$(MAKE) -C test -f Makefile.win32 clean
|
||||
|
||||
check:
|
||||
@$(MAKE) -C test -f Makefile.win32 check
|
||||
|
||||
|
||||
clean: clean_r
|
||||
|
||||
|
||||
.PHONY: all pixman test clean check
|
@ -1,73 +0,0 @@
|
||||
LIBRARY = pixman-1
|
||||
|
||||
ifeq ($(shell echo ""),)
|
||||
# POSIX style shell
|
||||
mkdir_p = mkdir -p $1
|
||||
rm = $(RM) $1
|
||||
echo = echo "$1"
|
||||
else
|
||||
# DOS/Windows style shell
|
||||
mkdir_p = if not exist $(subst /,\,$1) md $(subst /,\,$1)
|
||||
echo = echo $1
|
||||
rm = del $(subst /,\,$1)
|
||||
endif
|
||||
|
||||
CC = cl
|
||||
LD = link
|
||||
AR = lib
|
||||
PERL = perl
|
||||
|
||||
ifneq ($(shell echo ""),)
|
||||
RM = del
|
||||
endif
|
||||
|
||||
ifeq ($(top_builddir),)
|
||||
top_builddir = $(top_srcdir)
|
||||
endif
|
||||
|
||||
CFG_VAR = $(CFG)
|
||||
ifeq ($(CFG_VAR),)
|
||||
CFG_VAR = release
|
||||
endif
|
||||
|
||||
ifeq ($(CFG_VAR),debug)
|
||||
CFG_CFLAGS = -MDd -Od -Zi
|
||||
CFG_LDFLAGS = -DEBUG
|
||||
else
|
||||
CFG_CFLAGS = -MD -O2
|
||||
CFG_LDFLAGS =
|
||||
endif
|
||||
|
||||
# Package definitions, to be used instead of those provided in config.h
|
||||
PKG_CFLAGS = -DPACKAGE=$(LIBRARY) -DPACKAGE_VERSION="" -DPACKAGE_BUGREPORT=""
|
||||
|
||||
BASE_CFLAGS = -nologo -I. -I$(top_srcdir) -I$(top_srcdir)/pixman
|
||||
|
||||
PIXMAN_CFLAGS = $(BASE_CFLAGS) $(PKG_CFLAGS) $(CFG_CFLAGS) $(CFLAGS)
|
||||
PIXMAN_LDFLAGS = -nologo $(CFG_LDFLAGS) $(LDFLAGS)
|
||||
PIXMAN_ARFLAGS = -nologo $(LDFLAGS)
|
||||
|
||||
|
||||
inform:
|
||||
ifneq ($(CFG),release)
|
||||
ifneq ($(CFG),debug)
|
||||
ifneq ($(CFG),)
|
||||
@echo "Invalid specified configuration option: "$(CFG)"."
|
||||
@echo
|
||||
@echo "Possible choices for configuration are 'release' and 'debug'"
|
||||
@exit 1
|
||||
endif
|
||||
@echo "Using default RELEASE configuration... (use CFG=release or CFG=debug)"
|
||||
endif
|
||||
endif
|
||||
|
||||
$(CFG_VAR):
|
||||
@$(call mkdir_p,$@)
|
||||
|
||||
$(CFG_VAR)/%.obj: %.c $(libpixman_headers) | $(CFG_VAR)
|
||||
$(CC) -c $(PIXMAN_CFLAGS) -Fo"$@" $<
|
||||
|
||||
clean: inform $(CFG_VAR)
|
||||
-$(call rm,$(CFG_VAR)/*.exe $(CFG_VAR)/*.ilk $(CFG_VAR)/*.lib $(CFG_VAR)/*.obj $(CFG_VAR)/*.pdb)
|
||||
|
||||
.PHONY: inform clean
|
80
README
80
README
@ -1,14 +1,20 @@
|
||||
Pixman
|
||||
======
|
||||
|
||||
Pixman is a library that provides low-level pixel manipulation
|
||||
features such as image compositing and trapezoid rasterization.
|
||||
|
||||
Questions, bug reports and patches should be directed to the pixman
|
||||
mailing list:
|
||||
Questions should be directed to the pixman mailing list:
|
||||
|
||||
http://lists.freedesktop.org/mailman/listinfo/pixman
|
||||
https://lists.freedesktop.org/mailman/listinfo/pixman
|
||||
|
||||
You can also file bugs at
|
||||
|
||||
https://bugs.freedesktop.org/enter_bug.cgi?product=pixman
|
||||
https://gitlab.freedesktop.org/pixman/pixman/-/issues/new
|
||||
|
||||
or submit improvements in form of a Merge Request via
|
||||
|
||||
https://gitlab.freedesktop.org/pixman/pixman/-/merge_requests
|
||||
|
||||
For real time discussions about pixman, feel free to join the IRC
|
||||
channels #cairo and #xorg-devel on the FreeNode IRC network.
|
||||
@ -21,54 +27,66 @@ In order to contribute to pixman, you will need a working knowledge of
|
||||
the git version control system. For a quick getting started guide,
|
||||
there is the "Everyday Git With 20 Commands Or So guide"
|
||||
|
||||
http://www.kernel.org/pub/software/scm/git/docs/everyday.html
|
||||
https://www.kernel.org/pub/software/scm/git/docs/everyday.html
|
||||
|
||||
from the Git homepage. For more in depth git documentation, see the
|
||||
resources on the Git community documentation page:
|
||||
|
||||
http://git-scm.com/documentation
|
||||
https://git-scm.com/documentation
|
||||
|
||||
Pixman uses the infrastructure from the freedesktop.org umbrella
|
||||
project. For instructions about how to use the git service on
|
||||
freedesktop.org, see:
|
||||
|
||||
http://www.freedesktop.org/wiki/Infrastructure/git/Developers
|
||||
https://www.freedesktop.org/wiki/Infrastructure/git/Developers
|
||||
|
||||
The Pixman master repository can be found at:
|
||||
|
||||
git://anongit.freedesktop.org/git/pixman
|
||||
|
||||
and browsed on the web here:
|
||||
|
||||
http://cgit.freedesktop.org/pixman/
|
||||
https://gitlab.freedesktop.org/pixman/pixman
|
||||
|
||||
|
||||
Sending patches
|
||||
---------------
|
||||
|
||||
The general workflow for sending patches is to first make sure that
|
||||
git can send mail on your system. Then,
|
||||
Patches should be submitted in form of Merge Requests via Gitlab.
|
||||
|
||||
- create a branch off of master in your local git repository
|
||||
You will first need to create a fork of the main pixman repository at
|
||||
|
||||
- make your changes as one or more commits
|
||||
https://gitlab.freedesktop.org/pixman/pixman
|
||||
|
||||
- use the
|
||||
via the Fork button on the top right. Once that is done you can add your
|
||||
personal repository as a remote to your local pixman development git checkout:
|
||||
|
||||
git send-email
|
||||
git remote add my-gitlab git@gitlab.freedesktop.org:YOURUSERNAME/pixman.git
|
||||
|
||||
command to send the patch series to pixman@lists.freedesktop.org.
|
||||
git fetch my-gitlab
|
||||
|
||||
Make sure to have added ssh keys to your gitlab profile at
|
||||
|
||||
https://gitlab.freedesktop.org/profile/keys
|
||||
|
||||
Once that is set up, the general workflow for sending patches is to create a
|
||||
new local branch with your improvements and once it's ready push it to your
|
||||
personal pixman fork:
|
||||
|
||||
git checkout -b fix-some-bug
|
||||
...
|
||||
git push my-gitlab
|
||||
|
||||
The output of the `git push` command will include a link that allows you to
|
||||
create a Merge Request against the official pixman repository.
|
||||
|
||||
Whenever you make changes to your branch (add new commits or fix up commits)
|
||||
you push them back to your personal pixman fork:
|
||||
|
||||
git push -f my-gitlab
|
||||
|
||||
If there is an open Merge Request Gitlab will automatically pick up the
|
||||
changes from your branch and pixman developers can review them anew.
|
||||
|
||||
In order for your patches to be accepted, please consider the
|
||||
following guidelines:
|
||||
|
||||
- This link:
|
||||
|
||||
http://www.kernel.org/pub/software/scm/git/docs/user-manual.html#patch-series
|
||||
|
||||
describes how what a good patch series is, and to create one with
|
||||
git.
|
||||
|
||||
- At each point in the series, pixman should compile and the test
|
||||
suite should pass.
|
||||
|
||||
@ -79,7 +97,7 @@ following guidelines:
|
||||
|
||||
You can run the test suite with
|
||||
|
||||
make check
|
||||
meson test -C builddir
|
||||
|
||||
It will take around two minutes to run on a modern PC.
|
||||
|
||||
@ -101,7 +119,7 @@ following guidelines:
|
||||
- If review comments were incorporated, a brief version
|
||||
history describing what those changes were.
|
||||
|
||||
- For big patch series, send an introductory email with an overall
|
||||
- For big patch series, write an introductory post with an overall
|
||||
description of the patch series, including benchmarks and
|
||||
motivation. Each commit message should still be descriptive and
|
||||
include enough information to understand why this particular commit
|
||||
@ -111,6 +129,6 @@ Pixman has high standards for code quality and so almost everybody
|
||||
should expect to have the first versions of their patches rejected.
|
||||
|
||||
If you think that the reviewers are wrong about something, or that the
|
||||
guidelines above are wrong, feel free to discuss the issue on the
|
||||
list. The purpose of the guidelines and code review is to ensure high
|
||||
code quality; it is not an exercise in compliance.
|
||||
guidelines above are wrong, feel free to discuss the issue. The purpose
|
||||
of the guidelines and code review is to ensure high code quality; it is
|
||||
not an exercise in compliance.
|
||||
|
@ -10,12 +10,11 @@ Here are the steps to follow to create a new pixman release:
|
||||
|
||||
git log master...origin (no output; note: *3* dots)
|
||||
|
||||
2) Increment pixman_(major|minor|micro) in configure.ac and meson.build
|
||||
according to the directions in those files.
|
||||
2) Increment the version in meson.build.
|
||||
|
||||
3) Make sure that new version works, including
|
||||
|
||||
- make distcheck passes
|
||||
- meson test passes
|
||||
|
||||
- the X server still works with the new pixman version
|
||||
installed
|
||||
|
5
a64-neon-test.S
Normal file
5
a64-neon-test.S
Normal file
@ -0,0 +1,5 @@
|
||||
.text
|
||||
.arch armv8-a
|
||||
.altmacro
|
||||
prfm pldl2strm, [x0]
|
||||
xtn v0.8b, v0.8h
|
14
autogen.sh
14
autogen.sh
@ -1,14 +0,0 @@
|
||||
#! /bin/sh
|
||||
|
||||
srcdir=`dirname $0`
|
||||
test -z "$srcdir" && srcdir=.
|
||||
|
||||
ORIGDIR=`pwd`
|
||||
cd $srcdir
|
||||
|
||||
autoreconf -v --install || exit 1
|
||||
cd $ORIGDIR || exit $?
|
||||
|
||||
if test -z "$NOCONFIGURE"; then
|
||||
$srcdir/configure "$@"
|
||||
fi
|
1161
configure.ac
1161
configure.ac
File diff suppressed because it is too large
Load Diff
@ -1,6 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
set -ex
|
||||
|
||||
./autogen.sh
|
||||
make -sj4 check
|
39
debian/changelog
vendored
39
debian/changelog
vendored
@ -1,3 +1,42 @@
|
||||
pixman (0.44.0-4) UNRELEASED; urgency=medium
|
||||
|
||||
* Team upload.
|
||||
* debian/copyright: Convert to machine-readable format
|
||||
|
||||
-- Dylan Aïssi <daissi@debian.org> Thu, 31 Jul 2025 22:16:23 +0200
|
||||
|
||||
pixman (0.44.0-3) unstable; urgency=medium
|
||||
|
||||
* Replace timeout bump patch by using a multiplier option instead.
|
||||
Thanks, Aurelien Jarno! (Closes: #1086999)
|
||||
|
||||
-- Timo Aaltonen <tjaalton@debian.org> Sat, 09 Nov 2024 11:02:55 +0200
|
||||
|
||||
pixman (0.44.0-2) unstable; urgency=medium
|
||||
|
||||
* patches: Increase test timeout 120->240s. (Closes: #1086999)
|
||||
|
||||
-- Timo Aaltonen <tjaalton@debian.org> Fri, 08 Nov 2024 09:58:04 +0200
|
||||
|
||||
pixman (0.44.0-1) unstable; urgency=medium
|
||||
|
||||
* New upstream release.
|
||||
* patches: Refresh patch.
|
||||
* control, rules: Build with meson.
|
||||
* symbols: Updated.
|
||||
* control: Migrate to pkgconf.
|
||||
* rules: Drop obsolete dbgsym-migration.
|
||||
|
||||
-- Timo Aaltonen <tjaalton@debian.org> Thu, 07 Nov 2024 16:48:29 +0200
|
||||
|
||||
pixman (0.42.2-1) unstable; urgency=medium
|
||||
|
||||
* New upstream release.
|
||||
* d/p/Avoid-integer-overflow-leading-to-out-of-bounds-writ.diff:
|
||||
- Removed, fixed upstream.
|
||||
|
||||
-- Emilio Pozuelo Monfort <pochu@debian.org> Fri, 11 Nov 2022 13:42:25 +0100
|
||||
|
||||
pixman (0.40.0-1.1) unstable; urgency=medium
|
||||
|
||||
* Non-maintainer upload.
|
||||
|
3
debian/control
vendored
3
debian/control
vendored
@ -5,7 +5,8 @@ Maintainer: Debian X Strike Force <debian-x@lists.debian.org>
|
||||
Uploaders: Andreas Boll <aboll@debian.org>
|
||||
Build-Depends:
|
||||
debhelper-compat (= 13),
|
||||
pkg-config,
|
||||
meson,
|
||||
pkgconf,
|
||||
quilt,
|
||||
Standards-Version: 4.2.1
|
||||
Vcs-Git: https://salsa.debian.org/xorg-team/lib/pixman.git
|
||||
|
89
debian/copyright
vendored
89
debian/copyright
vendored
@ -1,47 +1,48 @@
|
||||
This package was downloaded from
|
||||
https://xorg.freedesktop.org/releases/individual/lib/
|
||||
Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
|
||||
Upstream-Name: pixman
|
||||
Source: https://gitlab.freedesktop.org/pixman/pixman
|
||||
License: Expat
|
||||
|
||||
Debian packaging by Julien Cristau <jcristau@debian.org>, 18 May 2007.
|
||||
Files: *
|
||||
Copyright: 1987-1998 The Open Group
|
||||
1987-1989 Digital Equipment Corporation
|
||||
1999-2008 Keith Packard
|
||||
2000 SuSE, Inc.
|
||||
2000 Keith Packard, member of The XFree86 Project, Inc.
|
||||
2004-2010 Red Hat, Inc.
|
||||
2004 Nicholas Miell
|
||||
2005 Lars Knoll & Zack Rusin, Trolltech
|
||||
2005 Trolltech AS
|
||||
2007 Luca Barbato
|
||||
2008 Aaron Plattner, NVIDIA Corporation
|
||||
2008 Rodrigo Kumpera
|
||||
2008 André Tupinambá
|
||||
2008 Mozilla Corporation
|
||||
2008 Frederic Plourde
|
||||
2009, Oracle and/or its affiliates. All rights reserved.
|
||||
2009-2010 Nokia Corporation
|
||||
License: Expat
|
||||
|
||||
The following is the MIT license, agreed upon by most contributors.
|
||||
Copyright holders of new code should use this license statement where
|
||||
possible. They may also add themselves to the list below.
|
||||
Files: debian/*
|
||||
Copyright: 2007 Julien Cristau <jcristau@debian.org>
|
||||
License: Expat
|
||||
|
||||
/*
|
||||
* Copyright 1987, 1988, 1989, 1998 The Open Group
|
||||
* Copyright 1987, 1988, 1989 Digital Equipment Corporation
|
||||
* Copyright 1999, 2004, 2008 Keith Packard
|
||||
* Copyright 2000 SuSE, Inc.
|
||||
* Copyright 2000 Keith Packard, member of The XFree86 Project, Inc.
|
||||
* Copyright 2004, 2005, 2007, 2008, 2009, 2010 Red Hat, Inc.
|
||||
* Copyright 2004 Nicholas Miell
|
||||
* Copyright 2005 Lars Knoll & Zack Rusin, Trolltech
|
||||
* Copyright 2005 Trolltech AS
|
||||
* Copyright 2007 Luca Barbato
|
||||
* Copyright 2008 Aaron Plattner, NVIDIA Corporation
|
||||
* Copyright 2008 Rodrigo Kumpera
|
||||
* Copyright 2008 André Tupinambá
|
||||
* Copyright 2008 Mozilla Corporation
|
||||
* Copyright 2008 Frederic Plourde
|
||||
* Copyright 2009, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright 2009, 2010 Nokia Corporation
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the "Software"),
|
||||
* to deal in the Software without restriction, including without limitation
|
||||
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
* and/or sell copies of the Software, and to permit persons to whom the
|
||||
* Software is furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice (including the next
|
||||
* paragraph) shall be included in all copies or substantial portions of the
|
||||
* Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
* DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
License: Expat
|
||||
Permission is hereby granted, free of charge, to any person obtaining a
|
||||
copy of this software and associated documentation files (the "Software"),
|
||||
to deal in the Software without restriction, including without limitation
|
||||
the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
and/or sell copies of the Software, and to permit persons to whom the
|
||||
Software is furnished to do so, subject to the following conditions:
|
||||
.
|
||||
The above copyright notice and this permission notice (including the next
|
||||
paragraph) shall be included in all copies or substantial portions of the
|
||||
Software.
|
||||
.
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
DEALINGS IN THE SOFTWARE.
|
||||
|
2
debian/libpixman-1-0.symbols
vendored
2
debian/libpixman-1-0.symbols
vendored
@ -80,6 +80,7 @@ libpixman-1.so.0 libpixman-1-0 #MINVER#
|
||||
pixman_region32_contains_point@Base 0.11.2
|
||||
pixman_region32_contains_rectangle@Base 0.11.2
|
||||
pixman_region32_copy@Base 0.11.2
|
||||
pixman_region32_empty@Base 0.44.0
|
||||
pixman_region32_equal@Base 0.11.2
|
||||
pixman_region32_extents@Base 0.11.2
|
||||
pixman_region32_fini@Base 0.11.2
|
||||
@ -104,6 +105,7 @@ libpixman-1.so.0 libpixman-1-0 #MINVER#
|
||||
pixman_region_contains_point@Base 0
|
||||
pixman_region_contains_rectangle@Base 0
|
||||
pixman_region_copy@Base 0
|
||||
pixman_region_empty@Base 0.44.0
|
||||
pixman_region_equal@Base 0
|
||||
pixman_region_extents@Base 0
|
||||
pixman_region_fini@Base 0
|
||||
|
1
debian/libpixman-1-dev.install
vendored
1
debian/libpixman-1-dev.install
vendored
@ -1,4 +1,3 @@
|
||||
usr/lib/*/libpixman-1.so
|
||||
usr/lib/*/libpixman-1.a
|
||||
usr/lib/*/pkgconfig
|
||||
usr/include/pixman-1
|
||||
|
@ -1,32 +0,0 @@
|
||||
From: Matt Turner <mattst88@gmail.com>
|
||||
Date: Wed, 2 Nov 2022 12:07:32 -0400
|
||||
Subject: Avoid integer overflow leading to out-of-bounds write
|
||||
Origin: https://gitlab.freedesktop.org/pixman/pixman/-/commit/a1f88e842e0216a5b4df1ab023caebe33c101395
|
||||
Bug: https://gitlab.freedesktop.org/pixman/pixman/-/issues/63
|
||||
Bug-Debian: https://bugs.debian.org/1023427
|
||||
Bug-Debian-Security: https://security-tracker.debian.org/tracker/CVE-2022-44638
|
||||
|
||||
Thanks to Maddie Stone and Google's Project Zero for discovering this
|
||||
issue, providing a proof-of-concept, and a great analysis.
|
||||
|
||||
Closes: https://gitlab.freedesktop.org/pixman/pixman/-/issues/63
|
||||
---
|
||||
pixman/pixman-trap.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/pixman/pixman-trap.c b/pixman/pixman-trap.c
|
||||
index 91766fdbfca0..7560405ee2e4 100644
|
||||
--- a/pixman/pixman-trap.c
|
||||
+++ b/pixman/pixman-trap.c
|
||||
@@ -74,7 +74,7 @@ pixman_sample_floor_y (pixman_fixed_t y,
|
||||
|
||||
if (f < Y_FRAC_FIRST (n))
|
||||
{
|
||||
- if (pixman_fixed_to_int (i) == 0x8000)
|
||||
+ if (pixman_fixed_to_int (i) == 0xffff8000)
|
||||
{
|
||||
f = 0; /* saturate */
|
||||
}
|
||||
--
|
||||
2.37.2
|
||||
|
1
debian/patches/series
vendored
1
debian/patches/series
vendored
@ -1,2 +1 @@
|
||||
test-increase-timeout.diff
|
||||
Avoid-integer-overflow-leading-to-out-of-bounds-writ.diff
|
||||
|
12
debian/patches/test-increase-timeout.diff
vendored
12
debian/patches/test-increase-timeout.diff
vendored
@ -1,10 +1,8 @@
|
||||
Index: pixman/test/alpha-loop.c
|
||||
===================================================================
|
||||
--- pixman.orig/test/alpha-loop.c 2013-07-26 14:26:43.905457549 +0200
|
||||
+++ pixman/test/alpha-loop.c 2013-08-03 10:21:53.498601016 +0200
|
||||
@@ -21,7 +21,7 @@
|
||||
pixman_image_t *d = pixman_image_create_bits (PIXMAN_a8r8g8b8, WIDTH, HEIGHT, dest, WIDTH * 4);
|
||||
pixman_image_t *s = pixman_image_create_bits (PIXMAN_a2r10g10b10, WIDTH, HEIGHT, src, WIDTH * 4);
|
||||
--- a/test/alpha-loop.c
|
||||
+++ b/test/alpha-loop.c
|
||||
@@ -22,7 +22,7 @@ main (int argc, char **argv)
|
||||
d = pixman_image_create_bits (PIXMAN_a8r8g8b8, WIDTH, HEIGHT, dest, WIDTH * 4);
|
||||
s = pixman_image_create_bits (PIXMAN_a2r10g10b10, WIDTH, HEIGHT, src, WIDTH * 4);
|
||||
|
||||
- fail_after (5, "Infinite loop detected: 5 seconds without progress\n");
|
||||
+ fail_after (50, "Infinite loop detected: 50 seconds without progress\n");
|
||||
|
11
debian/rules
vendored
11
debian/rules
vendored
@ -9,8 +9,8 @@ export DEB_BUILD_MAINT_OPTIONS = hardening=+all
|
||||
override_dh_auto_configure:
|
||||
# also avoid loongson2f optimizations on mipsel, see 0.26.0-3
|
||||
# changelog entry:
|
||||
LS_CFLAGS=" " dh_auto_configure -- --disable-gtk \
|
||||
--disable-arm-iwmmxt
|
||||
LS_CFLAGS=" " dh_auto_configure -- \
|
||||
-Dgtk=disabled
|
||||
|
||||
# Install in debian/tmp to retain control through dh_install:
|
||||
override_dh_auto_install:
|
||||
@ -21,17 +21,12 @@ override_dh_install:
|
||||
find debian/tmp -name '*.la' -delete
|
||||
dh_install
|
||||
|
||||
# Debug package:
|
||||
override_dh_strip:
|
||||
dh_strip -p$(PACKAGE) --dbgsym-migration="$(PACKAGE)-dbg (<< 0.34.0-2~)"
|
||||
dh_strip -N$(PACKAGE)
|
||||
|
||||
# Shlibs:
|
||||
override_dh_makeshlibs:
|
||||
dh_makeshlibs -p$(PACKAGE) --add-udeb $(PACKAGE)-udeb -V"$(PACKAGE) (>= $(SHLIBS))" -- -c4
|
||||
|
||||
override_dh_auto_test:
|
||||
dh_auto_test -- VERBOSE=1
|
||||
dh_auto_test -- --verbose --timeout-multiplier 3
|
||||
|
||||
%:
|
||||
dh $@ --with quilt --builddirectory=build/
|
||||
|
@ -1,60 +0,0 @@
|
||||
EXTRA_DIST = \
|
||||
parrot.c \
|
||||
parrot.jpg \
|
||||
scale.ui \
|
||||
dither.ui \
|
||||
meson.build \
|
||||
$(NULL)
|
||||
|
||||
if HAVE_GTK
|
||||
|
||||
AM_CFLAGS = $(OPENMP_CFLAGS)
|
||||
AM_LDFLAGS = $(OPENMP_CFLAGS)
|
||||
|
||||
LDADD = $(top_builddir)/pixman/libpixman-1.la -lm $(GTK_LIBS) $(PNG_LIBS)
|
||||
AM_CPPFLAGS = -I$(top_srcdir)/pixman -I$(top_builddir)/pixman $(GTK_CFLAGS) $(PNG_CFLAGS)
|
||||
|
||||
GTK_UTILS = gtk-utils.c gtk-utils.h ../test/utils.c ../test/utils.h \
|
||||
../test/utils-prng.c ../test/utils-prng.h
|
||||
|
||||
DEMOS = \
|
||||
clip-test \
|
||||
clip-in \
|
||||
composite-test \
|
||||
gradient-test \
|
||||
radial-test \
|
||||
linear-gradient \
|
||||
conical-test \
|
||||
alpha-test \
|
||||
screen-test \
|
||||
convolution-test \
|
||||
trap-test \
|
||||
tri-test \
|
||||
quad2quad \
|
||||
checkerboard \
|
||||
srgb-trap-test \
|
||||
srgb-test \
|
||||
scale \
|
||||
dither
|
||||
|
||||
gradient_test_SOURCES = gradient-test.c $(GTK_UTILS)
|
||||
alpha_test_SOURCES = alpha-test.c $(GTK_UTILS)
|
||||
composite_test_SOURCES = composite-test.c $(GTK_UTILS)
|
||||
clip_test_SOURCES = clip-test.c $(GTK_UTILS)
|
||||
clip_in_SOURCES = clip-in.c $(GTK_UTILS)
|
||||
trap_test_SOURCES = trap-test.c $(GTK_UTILS)
|
||||
screen_test_SOURCES = screen-test.c $(GTK_UTILS)
|
||||
convolution_test_SOURCES = convolution-test.c $(GTK_UTILS)
|
||||
radial_test_SOURCES = radial-test.c $(GTK_UTILS)
|
||||
linear_gradient_SOURCES = linear-gradient.c $(GTK_UTILS)
|
||||
conical_test_SOURCES = conical-test.c $(GTK_UTILS)
|
||||
tri_test_SOURCES = tri-test.c $(GTK_UTILS)
|
||||
checkerboard_SOURCES = checkerboard.c $(GTK_UTILS)
|
||||
srgb_test_SOURCES = srgb-test.c $(GTK_UTILS)
|
||||
srgb_trap_test_SOURCES = srgb-trap-test.c $(GTK_UTILS)
|
||||
scale_SOURCES = scale.c $(GTK_UTILS)
|
||||
dither_SOURCES = dither.c $(GTK_UTILS)
|
||||
|
||||
noinst_PROGRAMS = $(DEMOS)
|
||||
|
||||
endif
|
@ -1,4 +1,4 @@
|
||||
#include "../test/utils.h"
|
||||
#include "utils.h"
|
||||
#include "gtk-utils.h"
|
||||
|
||||
#define SIZE 128
|
||||
|
@ -23,12 +23,12 @@
|
||||
* DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#include "pixman-config.h"
|
||||
#endif
|
||||
#include <math.h>
|
||||
#include <gtk/gtk.h>
|
||||
#include <stdlib.h>
|
||||
#include "../test/utils.h"
|
||||
#include "utils.h"
|
||||
#include "gtk-utils.h"
|
||||
|
||||
#define WIDTH 1024
|
||||
@ -103,48 +103,46 @@ rescale (GtkWidget *may_be_null, app_t *app)
|
||||
}
|
||||
|
||||
static gboolean
|
||||
on_expose (GtkWidget *da, GdkEvent *event, gpointer data)
|
||||
on_draw (GtkWidget *widget, cairo_t *cr, gpointer user_data)
|
||||
{
|
||||
app_t *app = data;
|
||||
GdkRectangle *area = &event->expose.area;
|
||||
app_t *app = user_data;
|
||||
GdkRectangle area;
|
||||
cairo_surface_t *surface;
|
||||
pixman_image_t *tmp, *final;
|
||||
cairo_t *cr;
|
||||
uint32_t *pixels;
|
||||
|
||||
gdk_cairo_get_clip_rectangle(cr, &area);
|
||||
|
||||
tmp = pixman_image_create_bits (
|
||||
app->format, area->width, area->height, NULL, 0);
|
||||
app->format, area.width, area.height, NULL, 0);
|
||||
pixman_image_set_dither (tmp, app->dither);
|
||||
|
||||
pixman_image_composite (
|
||||
PIXMAN_OP_SRC,
|
||||
app->original, NULL, tmp,
|
||||
area->x, area->y, 0, 0, 0, 0,
|
||||
app->width - area->x,
|
||||
app->height - area->y);
|
||||
area.x, area.y, 0, 0, 0, 0,
|
||||
app->width - area.x,
|
||||
app->height - area.y);
|
||||
|
||||
pixels = calloc (1, area->width * area->height * 4);
|
||||
pixels = calloc (1, area.width * area.height * 4);
|
||||
final = pixman_image_create_bits (
|
||||
PIXMAN_a8r8g8b8, area->width, area->height, pixels, area->width * 4);
|
||||
PIXMAN_a8r8g8b8, area.width, area.height, pixels, area.width * 4);
|
||||
|
||||
pixman_image_composite (
|
||||
PIXMAN_OP_SRC,
|
||||
tmp, NULL, final,
|
||||
area->x, area->y, 0, 0, 0, 0,
|
||||
app->width - area->x,
|
||||
app->height - area->y);
|
||||
area.x, area.y, 0, 0, 0, 0,
|
||||
app->width - area.x,
|
||||
app->height - area.y);
|
||||
|
||||
surface = cairo_image_surface_create_for_data (
|
||||
(uint8_t *)pixels, CAIRO_FORMAT_ARGB32,
|
||||
area->width, area->height, area->width * 4);
|
||||
area.width, area.height, area.width * 4);
|
||||
|
||||
cr = gdk_cairo_create (da->window);
|
||||
|
||||
cairo_set_source_surface (cr, surface, area->x, area->y);
|
||||
cairo_set_source_surface (cr, surface, area.x, area.y);
|
||||
|
||||
cairo_paint (cr);
|
||||
|
||||
cairo_destroy (cr);
|
||||
cairo_surface_destroy (surface);
|
||||
free (pixels);
|
||||
pixman_image_unref (final);
|
||||
@ -211,7 +209,7 @@ app_new (pixman_image_t *original)
|
||||
g_error ("Could not read file dither.ui: %s", err->message);
|
||||
|
||||
widget = get_widget (app, "drawing_area");
|
||||
g_signal_connect (widget, "expose_event", G_CALLBACK (on_expose), app);
|
||||
g_signal_connect (widget, "draw", G_CALLBACK (on_draw), app);
|
||||
|
||||
set_up_combo_box (app, "target_format_combo_box",
|
||||
G_N_ELEMENTS (formats), formats);
|
||||
|
@ -1,6 +1,8 @@
|
||||
#include <gtk/gtk.h>
|
||||
#include <config.h>
|
||||
#include "../test/utils.h"
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include <pixman-config.h>
|
||||
#endif
|
||||
#include "utils.h"
|
||||
#include "gtk-utils.h"
|
||||
|
||||
pixman_image_t *
|
||||
@ -93,15 +95,14 @@ pixbuf_from_argb32 (uint32_t *bits,
|
||||
}
|
||||
|
||||
static gboolean
|
||||
on_expose (GtkWidget *widget, GdkEventExpose *expose, gpointer data)
|
||||
on_draw (GtkWidget *widget, cairo_t *cr, gpointer user_data)
|
||||
{
|
||||
pixman_image_t *pimage = data;
|
||||
pixman_image_t *pimage = user_data;
|
||||
int width = pixman_image_get_width (pimage);
|
||||
int height = pixman_image_get_height (pimage);
|
||||
int stride = pixman_image_get_stride (pimage);
|
||||
cairo_surface_t *cimage;
|
||||
cairo_format_t format;
|
||||
cairo_t *cr;
|
||||
|
||||
if (pixman_image_get_format (pimage) == PIXMAN_x8r8g8b8)
|
||||
format = CAIRO_FORMAT_RGB24;
|
||||
@ -112,13 +113,10 @@ on_expose (GtkWidget *widget, GdkEventExpose *expose, gpointer data)
|
||||
(uint8_t *)pixman_image_get_data (pimage),
|
||||
format, width, height, stride);
|
||||
|
||||
cr = gdk_cairo_create (widget->window);
|
||||
|
||||
cairo_rectangle (cr, 0, 0, width, height);
|
||||
cairo_set_source_surface (cr, cimage, 0, 0);
|
||||
cairo_fill (cr);
|
||||
|
||||
cairo_destroy (cr);
|
||||
cairo_surface_destroy (cimage);
|
||||
|
||||
return TRUE;
|
||||
@ -170,7 +168,7 @@ show_image (pixman_image_t *image)
|
||||
break;
|
||||
}
|
||||
|
||||
g_signal_connect (window, "expose_event", G_CALLBACK (on_expose), copy);
|
||||
g_signal_connect (window, "draw", G_CALLBACK (on_draw), copy);
|
||||
g_signal_connect (window, "delete_event", G_CALLBACK (gtk_main_quit), NULL);
|
||||
|
||||
gtk_widget_show (window);
|
||||
|
@ -1,4 +1,4 @@
|
||||
#include "../test/utils.h"
|
||||
#include "utils.h"
|
||||
#include "gtk-utils.h"
|
||||
|
||||
#define WIDTH 1024
|
||||
|
@ -47,7 +47,7 @@ if dep_gtk.found()
|
||||
libdemo = static_library(
|
||||
'demo',
|
||||
['gtk-utils.c', config_h, version_h],
|
||||
dependencies : [dep_gtk, dep_glib, dep_png, dep_m, dep_openmp],
|
||||
dependencies : [libtestutils_dep, dep_gtk, dep_glib, dep_png, dep_m, dep_openmp],
|
||||
include_directories : inc_pixman,
|
||||
)
|
||||
|
||||
@ -57,8 +57,8 @@ if dep_gtk.found()
|
||||
d,
|
||||
[d + '.c', config_h, version_h],
|
||||
c_args : extra_demo_cflags,
|
||||
link_with : [libdemo, libtestutils],
|
||||
dependencies : [dep_glib, dep_gtk, dep_openmp, idep_pixman],
|
||||
link_with : [libdemo],
|
||||
dependencies : [idep_pixman, libtestutils_dep, dep_glib, dep_gtk, dep_openmp, dep_png],
|
||||
)
|
||||
endforeach
|
||||
endif
|
||||
|
@ -1,4 +1,4 @@
|
||||
#include "../test/utils.h"
|
||||
#include "utils.h"
|
||||
#include "gtk-utils.h"
|
||||
|
||||
#define NUM_GRADIENTS 9
|
||||
|
@ -24,7 +24,7 @@
|
||||
* Author: Soren Sandmann <soren.sandmann@gmail.com>
|
||||
*/
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#include "pixman-config.h"
|
||||
#endif
|
||||
#include <math.h>
|
||||
#include <gtk/gtk.h>
|
||||
@ -278,39 +278,37 @@ rescale (GtkWidget *may_be_null, app_t *app)
|
||||
}
|
||||
|
||||
static gboolean
|
||||
on_expose (GtkWidget *da, GdkEvent *event, gpointer data)
|
||||
on_draw (GtkWidget *widget, cairo_t *cr, gpointer user_data)
|
||||
{
|
||||
app_t *app = data;
|
||||
GdkRectangle *area = &event->expose.area;
|
||||
app_t *app = user_data;
|
||||
GdkRectangle area;
|
||||
cairo_surface_t *surface;
|
||||
pixman_image_t *tmp;
|
||||
cairo_t *cr;
|
||||
uint32_t *pixels;
|
||||
|
||||
pixels = calloc (1, area->width * area->height * 4);
|
||||
tmp = pixman_image_create_bits (
|
||||
PIXMAN_a8r8g8b8, area->width, area->height, pixels, area->width * 4);
|
||||
gdk_cairo_get_clip_rectangle(cr, &area);
|
||||
|
||||
if (area->x < app->scaled_width && area->y < app->scaled_height)
|
||||
pixels = calloc (1, area.width * area.height * 4);
|
||||
tmp = pixman_image_create_bits (
|
||||
PIXMAN_a8r8g8b8, area.width, area.height, pixels, area.width * 4);
|
||||
|
||||
if (area.x < app->scaled_width && area.y < app->scaled_height)
|
||||
{
|
||||
pixman_image_composite (
|
||||
PIXMAN_OP_SRC,
|
||||
app->original, NULL, tmp,
|
||||
area->x, area->y, 0, 0, 0, 0,
|
||||
app->scaled_width - area->x, app->scaled_height - area->y);
|
||||
area.x, area.y, 0, 0, 0, 0,
|
||||
app->scaled_width - area.x, app->scaled_height - area.y);
|
||||
}
|
||||
|
||||
surface = cairo_image_surface_create_for_data (
|
||||
(uint8_t *)pixels, CAIRO_FORMAT_ARGB32,
|
||||
area->width, area->height, area->width * 4);
|
||||
area.width, area.height, area.width * 4);
|
||||
|
||||
cr = gdk_cairo_create (da->window);
|
||||
|
||||
cairo_set_source_surface (cr, surface, area->x, area->y);
|
||||
cairo_set_source_surface (cr, surface, area.x, area.y);
|
||||
|
||||
cairo_paint (cr);
|
||||
|
||||
cairo_destroy (cr);
|
||||
cairo_surface_destroy (surface);
|
||||
free (pixels);
|
||||
pixman_image_unref (tmp);
|
||||
@ -400,7 +398,7 @@ app_new (pixman_image_t *original)
|
||||
gtk_scale_add_mark (GTK_SCALE (widget), 0.0, GTK_POS_LEFT, NULL);
|
||||
|
||||
widget = get_widget (app, "drawing_area");
|
||||
g_signal_connect (widget, "expose_event", G_CALLBACK (on_expose), app);
|
||||
g_signal_connect (widget, "draw", G_CALLBACK (on_draw), app);
|
||||
|
||||
set_up_filter_box (app, "reconstruct_x_combo_box");
|
||||
set_up_filter_box (app, "reconstruct_y_combo_box");
|
||||
|
@ -1,7 +1,7 @@
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include "../test/utils.h"
|
||||
#include "utils.h"
|
||||
#include "gtk-utils.h"
|
||||
|
||||
int
|
||||
|
181
meson.build
181
meson.build
@ -21,10 +21,10 @@
|
||||
project(
|
||||
'pixman',
|
||||
['c'],
|
||||
version : '0.40.0',
|
||||
version : '0.44.0',
|
||||
license : 'MIT',
|
||||
meson_version : '>= 0.50.0',
|
||||
default_options : ['buildtype=debugoptimized'],
|
||||
meson_version : '>= 0.52.0',
|
||||
default_options : ['c_std=gnu99', 'buildtype=debugoptimized'],
|
||||
)
|
||||
|
||||
config = configuration_data()
|
||||
@ -37,6 +37,12 @@ add_project_arguments(
|
||||
'-fno-strict-aliasing',
|
||||
'-fvisibility=hidden',
|
||||
'-Wundef',
|
||||
# -ftrapping-math is the default for gcc, but -fno-trapping-math is the
|
||||
# default for clang. The FLOAT_IS_ZERO macro is used to guard against
|
||||
# floating-point exceptions, however with -fno-trapping-math, the compiler
|
||||
# can reorder floating-point operations so that they occur before the guard.
|
||||
# Note, this function is ignored in clang < 10.0.0.
|
||||
'-ftrapping-math'
|
||||
]),
|
||||
language : ['c']
|
||||
)
|
||||
@ -237,6 +243,41 @@ if not use_vmx.disabled()
|
||||
endif
|
||||
endif
|
||||
|
||||
if cc.compiles('''
|
||||
__asm__ (
|
||||
".func meson_test"
|
||||
".endfunc"
|
||||
);''',
|
||||
name : 'test for ASM .func directive')
|
||||
config.set('ASM_HAVE_FUNC_DIRECTIVE', 1)
|
||||
endif
|
||||
|
||||
if cc.compiles('''
|
||||
__asm__ (
|
||||
".syntax unified\n"
|
||||
);''',
|
||||
name : 'test for ASM .syntax unified directive')
|
||||
config.set('ASM_HAVE_SYNTAX_UNIFIED', 1)
|
||||
endif
|
||||
|
||||
if cc.links('''
|
||||
#include <stdint.h>
|
||||
|
||||
__asm__ (
|
||||
" .global _testlabel\n"
|
||||
"_testlabel:\n"
|
||||
);
|
||||
|
||||
int testlabel();
|
||||
int main(int argc, char* argv[]) {
|
||||
return testlabel();
|
||||
}''',
|
||||
name : 'test for ASM leading underscore')
|
||||
config.set('ASM_LEADING_UNDERSCORE', 1)
|
||||
endif
|
||||
|
||||
|
||||
|
||||
if have_vmx
|
||||
config.set10('USE_VMX', true)
|
||||
elif use_vmx.enabled()
|
||||
@ -275,52 +316,27 @@ elif use_neon.enabled()
|
||||
error('NEON Support unavailable, but required')
|
||||
endif
|
||||
|
||||
use_iwmmxt = get_option('iwmmxt')
|
||||
have_iwmmxt = false
|
||||
iwmmxt_flags = ['-flax-vector-conversions', '-Winline']
|
||||
if not use_iwmmxt.disabled()
|
||||
if get_option('iwmmxt2')
|
||||
iwmmxt_flags += '-march=iwmmxt2'
|
||||
else
|
||||
iwmmxt_flags += '-march=iwmmxt'
|
||||
endif
|
||||
|
||||
if host_machine.cpu_family() == 'arm'
|
||||
if cc.compiles('''
|
||||
#ifndef __IWMMXT__
|
||||
#error "IWMMXT not enabled (with -march=iwmmxt)"
|
||||
#endif
|
||||
#if defined(__GNUC__) && (__GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 8))
|
||||
#error "Need GCC >= 4.8 for IWMMXT intrinsics"
|
||||
#endif
|
||||
#include <mmintrin.h>
|
||||
int main () {
|
||||
union {
|
||||
__m64 v;
|
||||
char c[8];
|
||||
} a = { .c = {1, 2, 3, 4, 5, 6, 7, 8} };
|
||||
int b = 4;
|
||||
__m64 c = _mm_srli_si64 (a.v, b);
|
||||
}
|
||||
''',
|
||||
args : iwmmxt_flags,
|
||||
name : 'IWMMXT Intrinsic Support')
|
||||
have_iwmmxt = true
|
||||
use_a64neon = get_option('a64-neon')
|
||||
have_a64neon = false
|
||||
if not use_a64neon.disabled()
|
||||
if host_machine.cpu_family() == 'aarch64'
|
||||
if cc.compiles(files('a64-neon-test.S'), name : 'NEON A64 Intrinsic Support')
|
||||
have_a64neon = true
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
|
||||
if have_iwmmxt
|
||||
config.set10('USE_ARM_IWMMXT', true)
|
||||
elif use_iwmmxt.enabled()
|
||||
error('IWMMXT Support unavailable, but required')
|
||||
if have_a64neon
|
||||
config.set10('USE_ARM_A64_NEON', true)
|
||||
elif use_a64neon.enabled()
|
||||
error('A64 NEON Support unavailable, but required')
|
||||
endif
|
||||
|
||||
use_mips_dspr2 = get_option('mips-dspr2')
|
||||
have_mips_dspr2 = false
|
||||
mips_dspr2_flags = ['-mdspr2']
|
||||
if not use_mips_dspr2.disabled()
|
||||
if host_machine.cpu_family() == 'mips32'
|
||||
if host_machine.cpu_family().startswith('mips')
|
||||
if cc.compiles('''
|
||||
#if !(defined(__mips__) && __mips_isa_rev >= 2)
|
||||
#error MIPS DSPr2 is currently only available on MIPS32r2 platforms.
|
||||
@ -336,7 +352,7 @@ if not use_mips_dspr2.disabled()
|
||||
);
|
||||
return c;
|
||||
}''',
|
||||
args : mipds_dspr2_flags,
|
||||
args : mips_dspr2_flags,
|
||||
name : 'DSPr2 Intrinsic Support')
|
||||
have_mips_dspr2 = true
|
||||
endif
|
||||
@ -349,6 +365,28 @@ elif use_mips_dspr2.enabled()
|
||||
error('MIPS DSPr2 Support unavailable, but required')
|
||||
endif
|
||||
|
||||
use_rvv = get_option('rvv')
|
||||
have_rvv = false
|
||||
rvv_flags = ['-march=rv64gcv']
|
||||
if not use_rvv.disabled()
|
||||
if host_machine.cpu_family() == 'riscv64'
|
||||
if cc.compiles('''
|
||||
#include <riscv_vector.h>
|
||||
int main() { vfloat32m1_t tmp; return 0; }
|
||||
''',
|
||||
args : rvv_flags,
|
||||
name : 'RISC-V Vector Intrinsic Support')
|
||||
have_rvv = true
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
|
||||
if have_rvv
|
||||
config.set10('USE_RVV', true)
|
||||
elif use_rvv.enabled()
|
||||
error('RISC-V Vector Support unavailable, but required')
|
||||
endif
|
||||
|
||||
use_gnu_asm = get_option('gnu-inline-asm')
|
||||
if not use_gnu_asm.disabled()
|
||||
if cc.compiles('''
|
||||
@ -390,10 +428,8 @@ else
|
||||
dep_openmp = null_dep
|
||||
endif
|
||||
|
||||
dep_gtk = dependency('gtk+-2.0', version : '>= 2.16', required : get_option('gtk'))
|
||||
dep_glib = dependency('glib-2.0', required : get_option('gtk'))
|
||||
dep_pixman = dependency('pixman-1', required : get_option('gtk'),
|
||||
version : '>= ' + meson.project_version())
|
||||
dep_gtk = dependency('gtk+-3.0', required : get_option('gtk').enabled() and get_option('demos').enabled())
|
||||
dep_glib = dependency('glib-2.0', required : get_option('gtk').enabled() and get_option('demos').enabled())
|
||||
|
||||
dep_png = null_dep
|
||||
if not get_option('libpng').disabled()
|
||||
@ -437,6 +473,9 @@ if dep_threads.found() and cc.has_header('pthread.h')
|
||||
else
|
||||
pthreads_found = true
|
||||
endif
|
||||
else
|
||||
# Avoid linking with -pthread if we don't actually have pthreads
|
||||
dep_threads = null_dep
|
||||
endif
|
||||
|
||||
if pthreads_found
|
||||
@ -472,15 +511,25 @@ foreach h : ['sys/mman.h', 'fenv.h', 'unistd.h']
|
||||
endif
|
||||
endforeach
|
||||
|
||||
# gcc on Windows only warns that __declspec(thread) isn't supported,
|
||||
# passing -Werror=attributes makes it fail.
|
||||
if (host_machine.system() == 'windows' and
|
||||
cc.compiles('int __declspec(thread) foo;',
|
||||
args : cc.get_supported_arguments(['-Werror=attributes']),
|
||||
name : 'TLS via __declspec(thread)'))
|
||||
config.set('TLS', '__declspec(thread)')
|
||||
elif cc.compiles('int __thread foo;', name : 'TLS via __thread')
|
||||
config.set('TLS', '__thread')
|
||||
use_tls = get_option('tls')
|
||||
have_tls = ''
|
||||
if not use_tls.disabled()
|
||||
# gcc on Windows only warns that __declspec(thread) isn't supported,
|
||||
# passing -Werror=attributes makes it fail.
|
||||
if (host_machine.system() == 'windows' and
|
||||
cc.compiles('int __declspec(thread) foo;',
|
||||
args : cc.get_supported_arguments(['-Werror=attributes']),
|
||||
name : 'TLS via __declspec(thread)'))
|
||||
have_tls = '__declspec(thread)'
|
||||
elif cc.compiles('int __thread foo;', name : 'TLS via __thread')
|
||||
have_tls = '__thread'
|
||||
endif
|
||||
endif
|
||||
|
||||
if have_tls != ''
|
||||
config.set('TLS', have_tls)
|
||||
elif use_tls.enabled()
|
||||
error('Compiler TLS Support unavailable, but required')
|
||||
endif
|
||||
|
||||
if cc.links('''
|
||||
@ -492,6 +541,15 @@ if cc.links('''
|
||||
config.set('TOOLCHAIN_SUPPORTS_ATTRIBUTE_CONSTRUCTOR', 1)
|
||||
endif
|
||||
|
||||
if cc.links('''
|
||||
static int x = 1;
|
||||
static void __attribute__((destructor)) destructor_function () { x = 0; }
|
||||
int main (void) { return x; }
|
||||
''',
|
||||
name : '__attribute__((destructor))')
|
||||
config.set('TOOLCHAIN_SUPPORTS_ATTRIBUTE_DESTRUCTOR', 1)
|
||||
endif
|
||||
|
||||
if cc.links(
|
||||
' __float128 a = 1.0Q, b = 2.0Q; int main (void) { return a + b; }',
|
||||
name : 'Has float128 support')
|
||||
@ -528,15 +586,24 @@ version_conf.set('PIXMAN_VERSION_MICRO', split[2])
|
||||
add_project_arguments('-DHAVE_CONFIG_H', language : ['c'])
|
||||
|
||||
subdir('pixman')
|
||||
subdir('test')
|
||||
subdir('demos')
|
||||
|
||||
if not get_option('tests').disabled() or not get_option('demos').disabled()
|
||||
subdir(join_paths('test', 'utils'))
|
||||
endif
|
||||
|
||||
if not get_option('demos').disabled()
|
||||
subdir('demos')
|
||||
endif
|
||||
|
||||
if not get_option('tests').disabled()
|
||||
subdir('test')
|
||||
endif
|
||||
|
||||
pkg = import('pkgconfig')
|
||||
pkg.generate(
|
||||
pkg.generate(libpixman,
|
||||
name : 'Pixman',
|
||||
filebase : 'pixman-1',
|
||||
description : 'The pixman library (version 1)',
|
||||
libraries : libpixman,
|
||||
subdirs: 'pixman-1',
|
||||
version : meson.project_version(),
|
||||
)
|
||||
|
@ -54,30 +54,39 @@ option(
|
||||
description : 'Use ARM NEON intrinsic optimized paths',
|
||||
)
|
||||
option(
|
||||
'iwmmxt',
|
||||
'a64-neon',
|
||||
type : 'feature',
|
||||
description : 'Use ARM IWMMXT intrinsic optimized paths',
|
||||
)
|
||||
option(
|
||||
'iwmmxt2',
|
||||
type : 'boolean',
|
||||
value : true,
|
||||
description : 'Use ARM IWMMXT2 intrinsic instead of IWMMXT',
|
||||
description : 'Use ARM A64 NEON intrinsic optimized paths',
|
||||
)
|
||||
option(
|
||||
'mips-dspr2',
|
||||
type : 'feature',
|
||||
description : 'Use MIPS32 DSPr2 intrinsic optimized paths',
|
||||
)
|
||||
option(
|
||||
'rvv',
|
||||
type : 'feature',
|
||||
description : 'Use RISC-V Vector extension',
|
||||
)
|
||||
option(
|
||||
'gnu-inline-asm',
|
||||
type : 'feature',
|
||||
description : 'Use GNU style inline assembler',
|
||||
)
|
||||
option(
|
||||
'tls',
|
||||
type : 'feature',
|
||||
description : 'Use compiler support for thread-local storage',
|
||||
)
|
||||
option(
|
||||
'cpu-features-path',
|
||||
type : 'string',
|
||||
description : 'Path to platform-specific cpu-features.[ch] for systems that do not provide it (e.g. Android)',
|
||||
)
|
||||
option(
|
||||
'openmp',
|
||||
type : 'feature',
|
||||
description : 'Enable openmp support',
|
||||
description : 'Enable OpenMP for tests',
|
||||
)
|
||||
option(
|
||||
'timers',
|
||||
@ -94,10 +103,20 @@ option(
|
||||
option(
|
||||
'gtk',
|
||||
type : 'feature',
|
||||
description : 'Enable tests using GTK',
|
||||
description : 'Enable demos using GTK',
|
||||
)
|
||||
option(
|
||||
'libpng',
|
||||
type : 'feature',
|
||||
description : 'Use libpng'
|
||||
description : 'Use libpng in tests'
|
||||
)
|
||||
option(
|
||||
'tests',
|
||||
type : 'feature',
|
||||
description : 'Build tests'
|
||||
)
|
||||
option(
|
||||
'demos',
|
||||
type : 'feature',
|
||||
description : 'Build demos'
|
||||
)
|
||||
|
@ -1,5 +0,0 @@
|
||||
Name: Pixman
|
||||
Description: The pixman library (version 1)
|
||||
Version: @PACKAGE_VERSION@
|
||||
Cflags: -I${pc_top_builddir}/${pcfiledir}/pixman
|
||||
Libs: ${pc_top_builddir}/${pcfiledir}/pixman/libpixman-1.la
|
@ -1,11 +0,0 @@
|
||||
prefix=@prefix@
|
||||
exec_prefix=@exec_prefix@
|
||||
libdir=@libdir@
|
||||
includedir=@includedir@
|
||||
|
||||
Name: Pixman
|
||||
Description: The pixman library (version 1)
|
||||
Version: @PACKAGE_VERSION@
|
||||
Cflags: -I${includedir}/pixman-1
|
||||
Libs: -L${libdir} -lpixman-1
|
||||
|
@ -1,143 +0,0 @@
|
||||
include $(top_srcdir)/pixman/Makefile.sources
|
||||
|
||||
lib_LTLIBRARIES = libpixman-1.la
|
||||
|
||||
libpixman_1_la_LDFLAGS = -version-info $(LT_VERSION_INFO) -no-undefined @PTHREAD_LDFLAGS@
|
||||
libpixman_1_la_LIBADD = @PTHREAD_LIBS@ -lm
|
||||
libpixman_1_la_SOURCES = $(libpixman_sources) $(libpixman_headers)
|
||||
|
||||
libpixmanincludedir = $(includedir)/pixman-1
|
||||
libpixmaninclude_HEADERS = pixman.h pixman-version.h
|
||||
noinst_LTLIBRARIES =
|
||||
|
||||
EXTRA_DIST = \
|
||||
Makefile.win32 \
|
||||
dither/make-blue-noise.c \
|
||||
pixman-region.c \
|
||||
solaris-hwcap.mapfile \
|
||||
meson.build \
|
||||
$(NULL)
|
||||
|
||||
# mmx code
|
||||
if USE_X86_MMX
|
||||
noinst_LTLIBRARIES += libpixman-mmx.la
|
||||
libpixman_mmx_la_SOURCES = \
|
||||
pixman-mmx.c
|
||||
libpixman_mmx_la_CFLAGS = $(MMX_CFLAGS)
|
||||
libpixman_1_la_LDFLAGS += $(MMX_LDFLAGS)
|
||||
libpixman_1_la_LIBADD += libpixman-mmx.la
|
||||
|
||||
ASM_CFLAGS_mmx=$(MMX_CFLAGS)
|
||||
endif
|
||||
|
||||
# vmx code
|
||||
if USE_VMX
|
||||
noinst_LTLIBRARIES += libpixman-vmx.la
|
||||
libpixman_vmx_la_SOURCES = \
|
||||
pixman-vmx.c \
|
||||
pixman-combine32.h
|
||||
libpixman_vmx_la_CFLAGS = $(VMX_CFLAGS)
|
||||
libpixman_1_la_LIBADD += libpixman-vmx.la
|
||||
|
||||
ASM_CFLAGS_vmx=$(VMX_CFLAGS)
|
||||
endif
|
||||
|
||||
# sse2 code
|
||||
if USE_SSE2
|
||||
noinst_LTLIBRARIES += libpixman-sse2.la
|
||||
libpixman_sse2_la_SOURCES = \
|
||||
pixman-sse2.c
|
||||
libpixman_sse2_la_CFLAGS = $(SSE2_CFLAGS)
|
||||
libpixman_1_la_LDFLAGS += $(SSE2_LDFLAGS)
|
||||
libpixman_1_la_LIBADD += libpixman-sse2.la
|
||||
|
||||
ASM_CFLAGS_sse2=$(SSE2_CFLAGS)
|
||||
endif
|
||||
|
||||
# ssse3 code
|
||||
if USE_SSSE3
|
||||
noinst_LTLIBRARIES += libpixman-ssse3.la
|
||||
libpixman_ssse3_la_SOURCES = \
|
||||
pixman-ssse3.c
|
||||
libpixman_ssse3_la_CFLAGS = $(SSSE3_CFLAGS)
|
||||
libpixman_1_la_LDFLAGS += $(SSSE3_LDFLAGS)
|
||||
libpixman_1_la_LIBADD += libpixman-ssse3.la
|
||||
|
||||
ASM_CFLAGS_ssse3=$(SSSE3_CFLAGS)
|
||||
endif
|
||||
|
||||
# arm simd code
|
||||
if USE_ARM_SIMD
|
||||
noinst_LTLIBRARIES += libpixman-arm-simd.la
|
||||
libpixman_arm_simd_la_SOURCES = \
|
||||
pixman-arm-simd.c \
|
||||
pixman-arm-common.h \
|
||||
pixman-arm-simd-asm.S \
|
||||
pixman-arm-simd-asm-scaled.S \
|
||||
pixman-arm-asm.h \
|
||||
pixman-arm-simd-asm.h
|
||||
libpixman_1_la_LIBADD += libpixman-arm-simd.la
|
||||
|
||||
ASM_CFLAGS_arm_simd=
|
||||
endif
|
||||
|
||||
# arm neon code
|
||||
if USE_ARM_NEON
|
||||
noinst_LTLIBRARIES += libpixman-arm-neon.la
|
||||
libpixman_arm_neon_la_SOURCES = \
|
||||
pixman-arm-neon.c \
|
||||
pixman-arm-common.h \
|
||||
pixman-arm-neon-asm.S \
|
||||
pixman-arm-neon-asm-bilinear.S \
|
||||
pixman-arm-asm.h \
|
||||
pixman-arm-neon-asm.h
|
||||
libpixman_1_la_LIBADD += libpixman-arm-neon.la
|
||||
|
||||
ASM_CFLAGS_arm_neon=
|
||||
endif
|
||||
|
||||
# iwmmxt code
|
||||
if USE_ARM_IWMMXT
|
||||
libpixman_iwmmxt_la_SOURCES = pixman-mmx.c
|
||||
noinst_LTLIBRARIES += libpixman-iwmmxt.la
|
||||
libpixman_1_la_LIBADD += libpixman-iwmmxt.la
|
||||
|
||||
libpixman_iwmmxt_la-pixman-mmx.lo: pixman-mmx.c
|
||||
$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(AM_CPPFLAGS) $(AM_CPPFLAGS) $(CPPFLAGS) $(CFLAGS) $(IWMMXT_CFLAGS) -MT libpixman_iwmmxt_la-pixman-mmx.lo -MD -MP -MF $(DEPDIR)/libpixman_iwmmxt_la-pixman-mmx.Tpo -c -o libpixman_iwmmxt_la-pixman-mmx.lo `test -f 'pixman-mmx.c' || echo '$(srcdir)/'`pixman-mmx.c
|
||||
$(AM_V_at)$(am__mv) $(DEPDIR)/libpixman_iwmmxt_la-pixman-mmx.Tpo $(DEPDIR)/libpixman_iwmmxt_la-pixman-mmx.Plo
|
||||
|
||||
libpixman_iwmmxt_la_DEPENDENCIES = $(am__DEPENDENCIES_1)
|
||||
libpixman_iwmmxt_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \
|
||||
$(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \
|
||||
$(CFLAGS) $(IWMMXT_CFLAGS) $(AM_LDFLAGS) \
|
||||
$(LDFLAGS) -o $@
|
||||
|
||||
libpixman-iwmmxt.la: libpixman_iwmmxt_la-pixman-mmx.lo $(libpixman_iwmmxt_la_DEPENDENCIES)
|
||||
$(AM_V_CCLD)$(libpixman_iwmmxt_la_LINK) libpixman_iwmmxt_la-pixman-mmx.lo $(libpixman_iwmmxt_la_LIBADD) $(LIBS)
|
||||
endif
|
||||
|
||||
# mips dspr2 code
|
||||
if USE_MIPS_DSPR2
|
||||
noinst_LTLIBRARIES += libpixman-mips-dspr2.la
|
||||
libpixman_mips_dspr2_la_SOURCES = \
|
||||
pixman-mips-dspr2.c \
|
||||
pixman-mips-dspr2.h \
|
||||
pixman-mips-dspr2-asm.S \
|
||||
pixman-mips-dspr2-asm.h \
|
||||
pixman-mips-memcpy-asm.S
|
||||
libpixman_1_la_LIBADD += libpixman-mips-dspr2.la
|
||||
|
||||
ASM_CFLAGS_mips_dspr2=
|
||||
endif
|
||||
|
||||
# loongson code
|
||||
if USE_LOONGSON_MMI
|
||||
noinst_LTLIBRARIES += libpixman-loongson-mmi.la
|
||||
libpixman_loongson_mmi_la_SOURCES = pixman-mmx.c loongson-mmintrin.h
|
||||
libpixman_loongson_mmi_la_CFLAGS = $(LS_CFLAGS)
|
||||
libpixman_1_la_LDFLAGS += $(LS_LDFLAGS)
|
||||
libpixman_1_la_LIBADD += libpixman-loongson-mmi.la
|
||||
endif
|
||||
|
||||
.c.s : $(libpixmaninclude_HEADERS)
|
||||
$(CC) $(CFLAGS) $(ASM_CFLAGS_$(@:pixman-%.s=%)) $(ASM_CFLAGS_$(@:pixman-arm-%.s=arm_%)) -DHAVE_CONFIG_H -I$(srcdir) -I$(builddir) -I$(top_builddir) -S -o $@ $<
|
@ -1,43 +0,0 @@
|
||||
libpixman_sources = \
|
||||
pixman.c \
|
||||
pixman-access.c \
|
||||
pixman-access-accessors.c \
|
||||
pixman-bits-image.c \
|
||||
pixman-combine32.c \
|
||||
pixman-combine-float.c \
|
||||
pixman-conical-gradient.c \
|
||||
pixman-filter.c \
|
||||
pixman-x86.c \
|
||||
pixman-mips.c \
|
||||
pixman-arm.c \
|
||||
pixman-ppc.c \
|
||||
pixman-edge.c \
|
||||
pixman-edge-accessors.c \
|
||||
pixman-fast-path.c \
|
||||
pixman-glyph.c \
|
||||
pixman-general.c \
|
||||
pixman-gradient-walker.c \
|
||||
pixman-image.c \
|
||||
pixman-implementation.c \
|
||||
pixman-linear-gradient.c \
|
||||
pixman-matrix.c \
|
||||
pixman-noop.c \
|
||||
pixman-radial-gradient.c \
|
||||
pixman-region16.c \
|
||||
pixman-region32.c \
|
||||
pixman-solid-fill.c \
|
||||
pixman-timer.c \
|
||||
pixman-trap.c \
|
||||
pixman-utils.c \
|
||||
$(NULL)
|
||||
|
||||
libpixman_headers = \
|
||||
dither/blue-noise-64x64.h \
|
||||
pixman.h \
|
||||
pixman-accessor.h \
|
||||
pixman-combine32.h \
|
||||
pixman-compiler.h \
|
||||
pixman-edge-imp.h \
|
||||
pixman-inlines.h \
|
||||
pixman-private.h \
|
||||
$(NULL)
|
@ -1,93 +0,0 @@
|
||||
default: all
|
||||
|
||||
top_srcdir = ..
|
||||
include $(top_srcdir)/pixman/Makefile.sources
|
||||
include $(top_srcdir)/Makefile.win32.common
|
||||
|
||||
MMX_VAR = $(MMX)
|
||||
ifeq ($(MMX_VAR),)
|
||||
MMX_VAR=on
|
||||
endif
|
||||
|
||||
SSE2_VAR = $(SSE2)
|
||||
ifeq ($(SSE2_VAR),)
|
||||
SSE2_VAR=on
|
||||
endif
|
||||
|
||||
SSSE3_VAR = $(SSSE3)
|
||||
ifeq ($(SSSE3_VAR),)
|
||||
SSSE3_VAR=on
|
||||
endif
|
||||
|
||||
MMX_CFLAGS = -DUSE_X86_MMX -w14710 -w14714
|
||||
SSE2_CFLAGS = -DUSE_SSE2
|
||||
SSSE3_CFLAGS = -DUSE_SSSE3
|
||||
|
||||
# MMX compilation flags
|
||||
ifeq ($(MMX_VAR),on)
|
||||
PIXMAN_CFLAGS += $(MMX_CFLAGS)
|
||||
libpixman_sources += pixman-mmx.c
|
||||
endif
|
||||
|
||||
# SSE2 compilation flags
|
||||
ifeq ($(SSE2_VAR),on)
|
||||
PIXMAN_CFLAGS += $(SSE2_CFLAGS)
|
||||
libpixman_sources += pixman-sse2.c
|
||||
endif
|
||||
|
||||
# SSSE3 compilation flags
|
||||
ifeq ($(SSSE3_VAR),on)
|
||||
PIXMAN_CFLAGS += $(SSSE3_CFLAGS)
|
||||
libpixman_sources += pixman-ssse3.c
|
||||
endif
|
||||
|
||||
OBJECTS = $(patsubst %.c, $(CFG_VAR)/%.obj, $(libpixman_sources))
|
||||
|
||||
# targets
|
||||
all: inform informMMX informSSE2 informSSSE3 $(CFG_VAR)/$(LIBRARY).lib
|
||||
|
||||
informMMX:
|
||||
ifneq ($(MMX),off)
|
||||
ifneq ($(MMX),on)
|
||||
ifneq ($(MMX),)
|
||||
@echo "Invalid specified MMX option : "$(MMX_VAR)"."
|
||||
@echo
|
||||
@echo "Possible choices for MMX are 'on' or 'off'"
|
||||
@exit 1
|
||||
endif
|
||||
@echo "Setting MMX flag to default value 'on'... (use MMX=on or MMX=off)"
|
||||
endif
|
||||
endif
|
||||
|
||||
informSSE2:
|
||||
ifneq ($(SSE2),off)
|
||||
ifneq ($(SSE2),on)
|
||||
ifneq ($(SSE2),)
|
||||
@echo "Invalid specified SSE option : "$(SSE2)"."
|
||||
@echo
|
||||
@echo "Possible choices for SSE2 are 'on' or 'off'"
|
||||
@exit 1
|
||||
endif
|
||||
@echo "Setting SSE2 flag to default value 'on'... (use SSE2=on or SSE2=off)"
|
||||
endif
|
||||
endif
|
||||
|
||||
informSSSE3:
|
||||
ifneq ($(SSSE3),off)
|
||||
ifneq ($(SSSE3),on)
|
||||
ifneq ($(SSSE3),)
|
||||
@echo "Invalid specified SSE option : "$(SSSE3)"."
|
||||
@echo
|
||||
@echo "Possible choices for SSSE3 are 'on' or 'off'"
|
||||
@exit 1
|
||||
endif
|
||||
@echo "Setting SSSE3 flag to default value 'on'... (use SSSE3=on or SSSE3=off)"
|
||||
endif
|
||||
endif
|
||||
|
||||
|
||||
# pixman linking
|
||||
$(CFG_VAR)/$(LIBRARY).lib: $(OBJECTS)
|
||||
@$(AR) $(PIXMAN_ARFLAGS) -OUT:$@ $^
|
||||
|
||||
.PHONY: all informMMX informSSE2 informSSSE3
|
@ -73,7 +73,7 @@ print <<"PROLOG";
|
||||
#include <stdint.h>
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include <config.h>
|
||||
#include <pixman-config.h>
|
||||
#endif
|
||||
|
||||
#include "pixman-private.h"
|
||||
|
@ -20,7 +20,7 @@
|
||||
|
||||
config_h = configure_file(
|
||||
configuration : config,
|
||||
output : 'config.h'
|
||||
output : 'pixman-config.h'
|
||||
)
|
||||
|
||||
version_h = configure_file(
|
||||
@ -31,21 +31,20 @@ version_h = configure_file(
|
||||
)
|
||||
|
||||
libpixman_extra_cargs = []
|
||||
if cc.has_function_attribute('dllexport')
|
||||
default_library = get_option('default_library')
|
||||
if default_library != 'static' and cc.has_function_attribute('dllexport')
|
||||
libpixman_extra_cargs = ['-DPIXMAN_API=__declspec(dllexport)']
|
||||
endif
|
||||
|
||||
pixman_simd_libs = []
|
||||
simds = [
|
||||
# the mmx library can be compiled with mmx on x86/x86_64, iwmmxt on
|
||||
# some arm cores, or loongson mmi on loongson mips systems. The
|
||||
# libraries will all have the same name, "pixman-mmx", but there is
|
||||
# no chance of more than one version being built in the same build
|
||||
# because no system could have mmx, iwmmxt, and mmi, and it
|
||||
# simplifies the build logic to give them the same name.
|
||||
# the mmx library can be compiled with mmx on x86/x86_64 or loongson
|
||||
# mmi on loongson mips systems. The libraries will all have the same
|
||||
# name, "pixman-mmx", but there is no chance of more than one version
|
||||
# being built in the same build because no system could have mmx and
|
||||
# mmi, and it simplifies the build logic to give them the same name.
|
||||
['mmx', have_mmx, mmx_flags, []],
|
||||
['mmx', have_loongson_mmi, loongson_mmi_flags, []],
|
||||
['mmx', have_iwmmxt, iwmmxt_flags, []],
|
||||
|
||||
['sse2', have_sse2, sse2_flags, []],
|
||||
['ssse3', have_ssse3, ssse3_flags, []],
|
||||
@ -54,8 +53,11 @@ simds = [
|
||||
['pixman-arm-simd-asm.S', 'pixman-arm-simd-asm-scaled.S']],
|
||||
['arm-neon', have_neon, [],
|
||||
['pixman-arm-neon-asm.S', 'pixman-arm-neon-asm-bilinear.S']],
|
||||
['arm-neon', have_a64neon, [],
|
||||
['pixman-arma64-neon-asm.S', 'pixman-arma64-neon-asm-bilinear.S']],
|
||||
['mips-dspr2', have_mips_dspr2, mips_dspr2_flags,
|
||||
['pixman-mips-dspr2-asm.S', 'pixman-mips-memcpy-asm.S']],
|
||||
['rvv', have_rvv, rvv_flags, []],
|
||||
]
|
||||
|
||||
foreach simd : simds
|
||||
@ -73,18 +75,15 @@ pixman_files = files(
|
||||
'pixman.c',
|
||||
'pixman-access.c',
|
||||
'pixman-access-accessors.c',
|
||||
'pixman-arm.c',
|
||||
'pixman-bits-image.c',
|
||||
'pixman-combine32.c',
|
||||
'pixman-combine-float.c',
|
||||
'pixman-conical-gradient.c',
|
||||
'pixman-filter.c',
|
||||
'pixman-x86.c',
|
||||
'pixman-mips.c',
|
||||
'pixman-arm.c',
|
||||
'pixman-ppc.c',
|
||||
'pixman-edge.c',
|
||||
'pixman-edge-accessors.c',
|
||||
'pixman-fast-path.c',
|
||||
'pixman-filter.c',
|
||||
'pixman-glyph.c',
|
||||
'pixman-general.c',
|
||||
'pixman-gradient-walker.c',
|
||||
@ -92,29 +91,40 @@ pixman_files = files(
|
||||
'pixman-implementation.c',
|
||||
'pixman-linear-gradient.c',
|
||||
'pixman-matrix.c',
|
||||
'pixman-mips.c',
|
||||
'pixman-noop.c',
|
||||
'pixman-ppc.c',
|
||||
'pixman-radial-gradient.c',
|
||||
'pixman-region16.c',
|
||||
'pixman-region32.c',
|
||||
'pixman-riscv.c',
|
||||
'pixman-solid-fill.c',
|
||||
'pixman-timer.c',
|
||||
'pixman-trap.c',
|
||||
'pixman-utils.c',
|
||||
'pixman-x86.c',
|
||||
)
|
||||
|
||||
# We cannot use 'link_with' or 'link_whole' because meson wont do the right
|
||||
# thing for static archives.
|
||||
_obs = []
|
||||
foreach l : pixman_simd_libs
|
||||
_obs += l.extract_all_objects()
|
||||
endforeach
|
||||
# Android cpu-features
|
||||
cpu_features_path = get_option('cpu-features-path')
|
||||
cpu_features_sources = []
|
||||
cpu_features_inc = []
|
||||
if cpu_features_path != ''
|
||||
message('Using cpu-features.[ch] from ' + cpu_features_path)
|
||||
cpu_features_sources = files(
|
||||
cpu_features_path / 'cpu-features.h',
|
||||
cpu_features_path / 'cpu-features.c',
|
||||
)
|
||||
cpu_features_inc = include_directories(cpu_features_path)
|
||||
endif
|
||||
|
||||
libpixman = library(
|
||||
'pixman-1',
|
||||
[pixman_files, config_h, version_h],
|
||||
objects : _obs,
|
||||
[pixman_files, config_h, version_h, cpu_features_sources],
|
||||
link_with: pixman_simd_libs,
|
||||
c_args : libpixman_extra_cargs,
|
||||
dependencies : [dep_m, dep_threads],
|
||||
include_directories : cpu_features_inc,
|
||||
version : meson.project_version(),
|
||||
install : true,
|
||||
)
|
||||
@ -126,4 +136,8 @@ idep_pixman = declare_dependency(
|
||||
include_directories : inc_pixman,
|
||||
)
|
||||
|
||||
if meson.version().version_compare('>= 0.54.0')
|
||||
meson.override_dependency('pixman-1', idep_pixman)
|
||||
endif
|
||||
|
||||
install_headers('pixman.h', subdir : 'pixman-1')
|
||||
|
@ -25,7 +25,7 @@
|
||||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include <config.h>
|
||||
#include <pixman-config.h>
|
||||
#endif
|
||||
|
||||
#include <stdlib.h>
|
||||
@ -465,7 +465,7 @@ convert_and_store_pixel (bits_image_t * image,
|
||||
image, bits, offset, PIXMAN_ ## format); \
|
||||
} \
|
||||
\
|
||||
static const void *const __dummy__ ## format
|
||||
static const void *const __dummy__ ## format MAYBE_UNUSED
|
||||
|
||||
MAKE_ACCESSORS(a8r8g8b8);
|
||||
MAKE_ACCESSORS(x8r8g8b8);
|
||||
@ -610,6 +610,32 @@ fetch_scanline_a8r8g8b8_sRGB_float (bits_image_t * image,
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
fetch_scanline_r8g8b8_sRGB_float (bits_image_t * image,
|
||||
int x,
|
||||
int y,
|
||||
int width,
|
||||
uint32_t * b,
|
||||
const uint32_t *mask)
|
||||
{
|
||||
const uint8_t *bits = (uint8_t *)(image->bits + y * image->rowstride);
|
||||
argb_t *buffer = (argb_t *)b;
|
||||
int i;
|
||||
for (i = x; i < width; ++i)
|
||||
{
|
||||
uint32_t p = FETCH_24 (image, bits, i);
|
||||
argb_t *argb = buffer;
|
||||
|
||||
argb->a = 1.0f;
|
||||
|
||||
argb->r = to_linear[(p >> 16) & 0xff];
|
||||
argb->g = to_linear[(p >> 8) & 0xff];
|
||||
argb->b = to_linear[(p >> 0) & 0xff];
|
||||
|
||||
buffer++;
|
||||
}
|
||||
}
|
||||
|
||||
/* Expects a float buffer */
|
||||
static void
|
||||
fetch_scanline_a2r10g10b10_float (bits_image_t * image,
|
||||
@ -981,6 +1007,24 @@ fetch_pixel_a8r8g8b8_sRGB_float (bits_image_t *image,
|
||||
return argb;
|
||||
}
|
||||
|
||||
static argb_t
|
||||
fetch_pixel_r8g8b8_sRGB_float (bits_image_t *image,
|
||||
int offset,
|
||||
int line)
|
||||
{
|
||||
uint8_t *bits = (uint8_t *)(image->bits + line * image->rowstride);
|
||||
uint32_t p = FETCH_24 (image, bits, offset);
|
||||
argb_t argb;
|
||||
|
||||
argb.a = 1.0f;
|
||||
|
||||
argb.r = to_linear[(p >> 16) & 0xff];
|
||||
argb.g = to_linear[(p >> 8) & 0xff];
|
||||
argb.b = to_linear[(p >> 0) & 0xff];
|
||||
|
||||
return argb;
|
||||
}
|
||||
|
||||
static uint32_t
|
||||
fetch_pixel_yuy2 (bits_image_t *image,
|
||||
int offset,
|
||||
@ -1205,6 +1249,31 @@ store_scanline_a8r8g8b8_sRGB_float (bits_image_t * image,
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
store_scanline_r8g8b8_sRGB_float (bits_image_t * image,
|
||||
int x,
|
||||
int y,
|
||||
int width,
|
||||
const uint32_t *v)
|
||||
{
|
||||
uint8_t *bits = (uint8_t *)(image->bits + image->rowstride * y) + 3 * x;
|
||||
argb_t *values = (argb_t *)v;
|
||||
int i;
|
||||
|
||||
for (i = 0; i < width; ++i)
|
||||
{
|
||||
uint32_t r, g, b, rgb;
|
||||
|
||||
r = to_srgb (values[i].r);
|
||||
g = to_srgb (values[i].g);
|
||||
b = to_srgb (values[i].b);
|
||||
|
||||
rgb = (r << 16) | (g << 8) | b;
|
||||
|
||||
STORE_24 (image, bits, i, rgb);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Contracts a floating point image to 32bpp and then stores it using a
|
||||
* regular 32-bit store proc. Despite the type, this function expects an
|
||||
@ -1283,6 +1352,37 @@ fetch_scanline_a8r8g8b8_32_sRGB (bits_image_t *image,
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
fetch_scanline_r8g8b8_32_sRGB (bits_image_t *image,
|
||||
int x,
|
||||
int y,
|
||||
int width,
|
||||
uint32_t *buffer,
|
||||
const uint32_t *mask)
|
||||
{
|
||||
const uint8_t *bits = (uint8_t *)(image->bits + y * image->rowstride) + 3 * x;
|
||||
uint32_t tmp;
|
||||
int i;
|
||||
|
||||
for (i = 0; i < width; ++i)
|
||||
{
|
||||
uint32_t a, r, g, b;
|
||||
|
||||
tmp = FETCH_24 (image, bits, i);
|
||||
|
||||
a = 0xff;
|
||||
r = (tmp >> 16) & 0xff;
|
||||
g = (tmp >> 8) & 0xff;
|
||||
b = (tmp >> 0) & 0xff;
|
||||
|
||||
r = to_linear[r] * 255.0f + 0.5f;
|
||||
g = to_linear[g] * 255.0f + 0.5f;
|
||||
b = to_linear[b] * 255.0f + 0.5f;
|
||||
|
||||
*buffer++ = (a << 24) | (r << 16) | (g << 8) | (b << 0);
|
||||
}
|
||||
}
|
||||
|
||||
static uint32_t
|
||||
fetch_pixel_a8r8g8b8_32_sRGB (bits_image_t *image,
|
||||
int offset,
|
||||
@ -1304,6 +1404,27 @@ fetch_pixel_a8r8g8b8_32_sRGB (bits_image_t *image,
|
||||
return (a << 24) | (r << 16) | (g << 8) | (b << 0);
|
||||
}
|
||||
|
||||
static uint32_t
|
||||
fetch_pixel_r8g8b8_32_sRGB (bits_image_t *image,
|
||||
int offset,
|
||||
int line)
|
||||
{
|
||||
uint8_t *bits = (uint8_t *)(image->bits + line * image->rowstride);
|
||||
uint32_t tmp = FETCH_24 (image, bits, offset);
|
||||
uint32_t a, r, g, b;
|
||||
|
||||
a = 0xff;
|
||||
r = (tmp >> 16) & 0xff;
|
||||
g = (tmp >> 8) & 0xff;
|
||||
b = (tmp >> 0) & 0xff;
|
||||
|
||||
r = to_linear[r] * 255.0f + 0.5f;
|
||||
g = to_linear[g] * 255.0f + 0.5f;
|
||||
b = to_linear[b] * 255.0f + 0.5f;
|
||||
|
||||
return (a << 24) | (r << 16) | (g << 8) | (b << 0);
|
||||
}
|
||||
|
||||
static void
|
||||
store_scanline_a8r8g8b8_32_sRGB (bits_image_t *image,
|
||||
int x,
|
||||
@ -1336,6 +1457,36 @@ store_scanline_a8r8g8b8_32_sRGB (bits_image_t *image,
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
store_scanline_r8g8b8_32_sRGB (bits_image_t *image,
|
||||
int x,
|
||||
int y,
|
||||
int width,
|
||||
const uint32_t *v)
|
||||
{
|
||||
uint8_t *bits = (uint8_t *)(image->bits + image->rowstride * y) + 3 * x;
|
||||
uint64_t *values = (uint64_t *)v;
|
||||
uint64_t tmp;
|
||||
int i;
|
||||
|
||||
for (i = 0; i < width; ++i)
|
||||
{
|
||||
uint32_t r, g, b;
|
||||
|
||||
tmp = values[i];
|
||||
|
||||
r = (tmp >> 16) & 0xff;
|
||||
g = (tmp >> 8) & 0xff;
|
||||
b = (tmp >> 0) & 0xff;
|
||||
|
||||
r = to_srgb (r * (1/255.0f));
|
||||
g = to_srgb (g * (1/255.0f));
|
||||
b = to_srgb (b * (1/255.0f));
|
||||
|
||||
STORE_24 (image, bits, i, (r << 16) | (g << 8) | (b << 0));
|
||||
}
|
||||
}
|
||||
|
||||
static argb_t
|
||||
fetch_pixel_generic_float (bits_image_t *image,
|
||||
int offset,
|
||||
@ -1409,6 +1560,11 @@ static const format_info_t accessors[] =
|
||||
fetch_pixel_a8r8g8b8_32_sRGB, fetch_pixel_a8r8g8b8_sRGB_float,
|
||||
store_scanline_a8r8g8b8_32_sRGB, store_scanline_a8r8g8b8_sRGB_float,
|
||||
},
|
||||
{ PIXMAN_r8g8b8_sRGB,
|
||||
fetch_scanline_r8g8b8_32_sRGB, fetch_scanline_r8g8b8_sRGB_float,
|
||||
fetch_pixel_r8g8b8_32_sRGB, fetch_pixel_r8g8b8_sRGB_float,
|
||||
store_scanline_r8g8b8_32_sRGB, store_scanline_r8g8b8_sRGB_float,
|
||||
},
|
||||
|
||||
/* 24bpp formats */
|
||||
FORMAT_INFO (r8g8b8),
|
||||
|
@ -25,13 +25,86 @@
|
||||
*
|
||||
*/
|
||||
|
||||
/* Supplementary macro for setting function attributes */
|
||||
.macro pixman_asm_function fname
|
||||
.func fname
|
||||
.global fname
|
||||
#ifdef __ELF__
|
||||
.hidden fname
|
||||
.type fname, %function
|
||||
#ifndef PIXMAN_ARM_ASM_H
|
||||
#define PIXMAN_ARM_ASM_H
|
||||
|
||||
#include "pixman-config.h"
|
||||
|
||||
/*
|
||||
* References:
|
||||
* - https://developer.arm.com/documentation/101028/0012/5--Feature-test-macros
|
||||
* - https://github.com/ARM-software/abi-aa/blob/main/aaelf64/aaelf64.rst
|
||||
*/
|
||||
#if defined(__ARM_FEATURE_BTI_DEFAULT) && __ARM_FEATURE_BTI_DEFAULT == 1
|
||||
#define BTI_C hint 34 /* bti c: for calls, IE bl instructions */
|
||||
#define GNU_PROPERTY_AARCH64_BTI 1 /* bit 0 GNU Notes is for BTI support */
|
||||
#else
|
||||
#define BTI_C
|
||||
#define GNU_PROPERTY_AARCH64_BTI 0
|
||||
#endif
|
||||
fname:
|
||||
|
||||
#if defined(__ARM_FEATURE_PAC_DEFAULT)
|
||||
#if __ARM_FEATURE_PAC_DEFAULT & 1
|
||||
#define SIGN_LR hint 25 /* paciasp: sign with the A key */
|
||||
#define VERIFY_LR hint 29 /* autiasp: verify with the b key */
|
||||
#elif __ARM_FEATURE_PAC_DEFAULT & 2
|
||||
#define SIGN_LR hint 27 /* pacibsp: sign with the b key */
|
||||
#define VERIFY_LR hint 31 /* autibsp: verify with the b key */
|
||||
#endif
|
||||
#define GNU_PROPERTY_AARCH64_POINTER_AUTH 2 /* bit 1 GNU Notes is for PAC support */
|
||||
#else
|
||||
#define SIGN_LR BTI_C
|
||||
#define VERIFY_LR
|
||||
#define GNU_PROPERTY_AARCH64_POINTER_AUTH 0
|
||||
#endif
|
||||
|
||||
/* Add the BTI support to GNU Notes section for ASM files */
|
||||
#if GNU_PROPERTY_AARCH64_BTI != 0 || GNU_PROPERTY_AARCH64_POINTER_AUTH != 0
|
||||
.pushsection .note.gnu.property, "a"; /* Start a new allocatable section */
|
||||
.balign 8; /* align it on a byte boundry */
|
||||
.long 4; /* size of "GNU\0" */
|
||||
.long 0x10; /* size of descriptor */
|
||||
.long 0x5; /* NT_GNU_PROPERTY_TYPE_0 */
|
||||
.asciz "GNU";
|
||||
.long 0xc0000000; /* GNU_PROPERTY_AARCH64_FEATURE_1_AND */
|
||||
.long 4; /* Four bytes of data */
|
||||
.long (GNU_PROPERTY_AARCH64_BTI|GNU_PROPERTY_AARCH64_POINTER_AUTH); /* BTI or PAC is enabled */
|
||||
.long 0; /* padding for 8 byte alignment */
|
||||
.popsection; /* end the section */
|
||||
#endif
|
||||
|
||||
/* Supplementary macro for setting function attributes */
|
||||
.macro pixman_asm_function_impl fname
|
||||
#ifdef ASM_HAVE_FUNC_DIRECTIVE
|
||||
.func \fname
|
||||
#endif
|
||||
.global \fname
|
||||
#ifdef __ELF__
|
||||
.hidden \fname
|
||||
.type \fname, %function
|
||||
#endif
|
||||
\fname:
|
||||
SIGN_LR
|
||||
.endm
|
||||
|
||||
.macro pixman_asm_function fname
|
||||
#ifdef ASM_LEADING_UNDERSCORE
|
||||
pixman_asm_function_impl _\fname
|
||||
#else
|
||||
pixman_asm_function_impl \fname
|
||||
#endif
|
||||
.endm
|
||||
|
||||
.macro pixman_syntax_unified
|
||||
#ifdef ASM_HAVE_SYNTAX_UNIFIED
|
||||
.syntax unified
|
||||
#endif
|
||||
.endm
|
||||
|
||||
.macro pixman_end_asm_function
|
||||
#ifdef ASM_HAVE_FUNC_DIRECTIVE
|
||||
.endfunc
|
||||
#endif
|
||||
.endm
|
||||
|
||||
#endif /* PIXMAN_ARM_ASM_H */
|
||||
|
@ -68,6 +68,8 @@
|
||||
#include "pixman-arm-asm.h"
|
||||
#include "pixman-arm-neon-asm.h"
|
||||
|
||||
pixman_syntax_unified
|
||||
|
||||
/*
|
||||
* Bilinear macros from pixman-arm-neon-asm.S
|
||||
*/
|
||||
@ -82,28 +84,28 @@
|
||||
mov TMP1, X, asr #16
|
||||
add X, X, UX
|
||||
add TMP1, TOP, TMP1, asl #2
|
||||
vld1.32 {reg1}, [TMP1], STRIDE
|
||||
vld1.32 {reg2}, [TMP1]
|
||||
vld1.32 {\reg1}, [TMP1], STRIDE
|
||||
vld1.32 {\reg2}, [TMP1]
|
||||
.endm
|
||||
|
||||
.macro bilinear_load_0565 reg1, reg2, tmp
|
||||
mov TMP1, X, asr #16
|
||||
add X, X, UX
|
||||
add TMP1, TOP, TMP1, asl #1
|
||||
vld1.32 {reg2[0]}, [TMP1], STRIDE
|
||||
vld1.32 {reg2[1]}, [TMP1]
|
||||
convert_four_0565_to_x888_packed reg2, reg1, reg2, tmp
|
||||
vld1.32 {\reg2[0]}, [TMP1], STRIDE
|
||||
vld1.32 {\reg2[1]}, [TMP1]
|
||||
convert_four_0565_to_x888_packed \reg2, \reg1, \reg2, \tmp
|
||||
.endm
|
||||
|
||||
.macro bilinear_load_and_vertical_interpolate_two_8888 \
|
||||
acc1, acc2, reg1, reg2, reg3, reg4, tmp1, tmp2
|
||||
|
||||
bilinear_load_8888 reg1, reg2, tmp1
|
||||
vmull.u8 acc1, reg1, d28
|
||||
vmlal.u8 acc1, reg2, d29
|
||||
bilinear_load_8888 reg3, reg4, tmp2
|
||||
vmull.u8 acc2, reg3, d28
|
||||
vmlal.u8 acc2, reg4, d29
|
||||
bilinear_load_8888 \reg1, \reg2, \tmp1
|
||||
vmull.u8 \acc1, \reg1, d28
|
||||
vmlal.u8 \acc1, \reg2, d29
|
||||
bilinear_load_8888 \reg3, \reg4, \tmp2
|
||||
vmull.u8 \acc2, \reg3, d28
|
||||
vmlal.u8 \acc2, \reg4, d29
|
||||
.endm
|
||||
|
||||
.macro bilinear_load_and_vertical_interpolate_four_8888 \
|
||||
@ -111,9 +113,9 @@
|
||||
yacc1, yacc2, yreg1, yreg2, yreg3, yreg4, yacc2lo, yacc2hi
|
||||
|
||||
bilinear_load_and_vertical_interpolate_two_8888 \
|
||||
xacc1, xacc2, xreg1, xreg2, xreg3, xreg4, xacc2lo, xacc2hi
|
||||
\xacc1, \xacc2, \xreg1, \xreg2, \xreg3, \xreg4, \xacc2lo, \xacc2hi
|
||||
bilinear_load_and_vertical_interpolate_two_8888 \
|
||||
yacc1, yacc2, yreg1, yreg2, yreg3, yreg4, yacc2lo, yacc2hi
|
||||
\yacc1, \yacc2, \yreg1, \yreg2, \yreg3, \yreg4, \yacc2lo, \yacc2hi
|
||||
.endm
|
||||
|
||||
.macro bilinear_load_and_vertical_interpolate_two_0565 \
|
||||
@ -125,19 +127,19 @@
|
||||
mov TMP2, X, asr #16
|
||||
add X, X, UX
|
||||
add TMP2, TOP, TMP2, asl #1
|
||||
vld1.32 {acc2lo[0]}, [TMP1], STRIDE
|
||||
vld1.32 {acc2hi[0]}, [TMP2], STRIDE
|
||||
vld1.32 {acc2lo[1]}, [TMP1]
|
||||
vld1.32 {acc2hi[1]}, [TMP2]
|
||||
convert_0565_to_x888 acc2, reg3, reg2, reg1
|
||||
vzip.u8 reg1, reg3
|
||||
vzip.u8 reg2, reg4
|
||||
vzip.u8 reg3, reg4
|
||||
vzip.u8 reg1, reg2
|
||||
vmull.u8 acc1, reg1, d28
|
||||
vmlal.u8 acc1, reg2, d29
|
||||
vmull.u8 acc2, reg3, d28
|
||||
vmlal.u8 acc2, reg4, d29
|
||||
vld1.32 {\acc2lo[0]}, [TMP1], STRIDE
|
||||
vld1.32 {\acc2hi[0]}, [TMP2], STRIDE
|
||||
vld1.32 {\acc2lo[1]}, [TMP1]
|
||||
vld1.32 {\acc2hi[1]}, [TMP2]
|
||||
convert_0565_to_x888 \acc2, \reg3, \reg2, \reg1
|
||||
vzip.u8 \reg1, \reg3
|
||||
vzip.u8 \reg2, \reg4
|
||||
vzip.u8 \reg3, \reg4
|
||||
vzip.u8 \reg1, \reg2
|
||||
vmull.u8 \acc1, \reg1, d28
|
||||
vmlal.u8 \acc1, \reg2, d29
|
||||
vmull.u8 \acc2, \reg3, d28
|
||||
vmlal.u8 \acc2, \reg4, d29
|
||||
.endm
|
||||
|
||||
.macro bilinear_load_and_vertical_interpolate_four_0565 \
|
||||
@ -150,46 +152,46 @@
|
||||
mov TMP2, X, asr #16
|
||||
add X, X, UX
|
||||
add TMP2, TOP, TMP2, asl #1
|
||||
vld1.32 {xacc2lo[0]}, [TMP1], STRIDE
|
||||
vld1.32 {xacc2hi[0]}, [TMP2], STRIDE
|
||||
vld1.32 {xacc2lo[1]}, [TMP1]
|
||||
vld1.32 {xacc2hi[1]}, [TMP2]
|
||||
convert_0565_to_x888 xacc2, xreg3, xreg2, xreg1
|
||||
vld1.32 {\xacc2lo[0]}, [TMP1], STRIDE
|
||||
vld1.32 {\xacc2hi[0]}, [TMP2], STRIDE
|
||||
vld1.32 {\xacc2lo[1]}, [TMP1]
|
||||
vld1.32 {\xacc2hi[1]}, [TMP2]
|
||||
convert_0565_to_x888 \xacc2, \xreg3, \xreg2, \xreg1
|
||||
mov TMP1, X, asr #16
|
||||
add X, X, UX
|
||||
add TMP1, TOP, TMP1, asl #1
|
||||
mov TMP2, X, asr #16
|
||||
add X, X, UX
|
||||
add TMP2, TOP, TMP2, asl #1
|
||||
vld1.32 {yacc2lo[0]}, [TMP1], STRIDE
|
||||
vzip.u8 xreg1, xreg3
|
||||
vld1.32 {yacc2hi[0]}, [TMP2], STRIDE
|
||||
vzip.u8 xreg2, xreg4
|
||||
vld1.32 {yacc2lo[1]}, [TMP1]
|
||||
vzip.u8 xreg3, xreg4
|
||||
vld1.32 {yacc2hi[1]}, [TMP2]
|
||||
vzip.u8 xreg1, xreg2
|
||||
convert_0565_to_x888 yacc2, yreg3, yreg2, yreg1
|
||||
vmull.u8 xacc1, xreg1, d28
|
||||
vzip.u8 yreg1, yreg3
|
||||
vmlal.u8 xacc1, xreg2, d29
|
||||
vzip.u8 yreg2, yreg4
|
||||
vmull.u8 xacc2, xreg3, d28
|
||||
vzip.u8 yreg3, yreg4
|
||||
vmlal.u8 xacc2, xreg4, d29
|
||||
vzip.u8 yreg1, yreg2
|
||||
vmull.u8 yacc1, yreg1, d28
|
||||
vmlal.u8 yacc1, yreg2, d29
|
||||
vmull.u8 yacc2, yreg3, d28
|
||||
vmlal.u8 yacc2, yreg4, d29
|
||||
vld1.32 {\yacc2lo[0]}, [TMP1], STRIDE
|
||||
vzip.u8 \xreg1, \xreg3
|
||||
vld1.32 {\yacc2hi[0]}, [TMP2], STRIDE
|
||||
vzip.u8 \xreg2, \xreg4
|
||||
vld1.32 {\yacc2lo[1]}, [TMP1]
|
||||
vzip.u8 \xreg3, \xreg4
|
||||
vld1.32 {\yacc2hi[1]}, [TMP2]
|
||||
vzip.u8 \xreg1, \xreg2
|
||||
convert_0565_to_x888 \yacc2, \yreg3, \yreg2, \yreg1
|
||||
vmull.u8 \xacc1, \xreg1, d28
|
||||
vzip.u8 \yreg1, \yreg3
|
||||
vmlal.u8 \xacc1, \xreg2, d29
|
||||
vzip.u8 \yreg2, \yreg4
|
||||
vmull.u8 \xacc2, \xreg3, d28
|
||||
vzip.u8 \yreg3, \yreg4
|
||||
vmlal.u8 \xacc2, \xreg4, d29
|
||||
vzip.u8 \yreg1, \yreg2
|
||||
vmull.u8 \yacc1, \yreg1, d28
|
||||
vmlal.u8 \yacc1, \yreg2, d29
|
||||
vmull.u8 \yacc2, \yreg3, d28
|
||||
vmlal.u8 \yacc2, \yreg4, d29
|
||||
.endm
|
||||
|
||||
.macro bilinear_store_8888 numpix, tmp1, tmp2
|
||||
.if numpix == 4
|
||||
.if \numpix == 4
|
||||
vst1.32 {d0, d1}, [OUT]!
|
||||
.elseif numpix == 2
|
||||
.elseif \numpix == 2
|
||||
vst1.32 {d0}, [OUT]!
|
||||
.elseif numpix == 1
|
||||
.elseif \numpix == 1
|
||||
vst1.32 {d0[0]}, [OUT, :32]!
|
||||
.else
|
||||
.error bilinear_store_8888 numpix is unsupported
|
||||
@ -201,12 +203,12 @@
|
||||
vuzp.u8 d2, d3
|
||||
vuzp.u8 d1, d3
|
||||
vuzp.u8 d0, d2
|
||||
convert_8888_to_0565 d2, d1, d0, q1, tmp1, tmp2
|
||||
.if numpix == 4
|
||||
convert_8888_to_0565 d2, d1, d0, q1, \tmp1, \tmp2
|
||||
.if \numpix == 4
|
||||
vst1.16 {d2}, [OUT]!
|
||||
.elseif numpix == 2
|
||||
.elseif \numpix == 2
|
||||
vst1.32 {d2[0]}, [OUT]!
|
||||
.elseif numpix == 1
|
||||
.elseif \numpix == 1
|
||||
vst1.16 {d2[0]}, [OUT]!
|
||||
.else
|
||||
.error bilinear_store_0565 numpix is unsupported
|
||||
@ -222,20 +224,20 @@
|
||||
.endm
|
||||
|
||||
.macro bilinear_load_mask_8 numpix, mask
|
||||
.if numpix == 4
|
||||
vld1.32 {mask[0]}, [MASK]!
|
||||
.elseif numpix == 2
|
||||
vld1.16 {mask[0]}, [MASK]!
|
||||
.elseif numpix == 1
|
||||
vld1.8 {mask[0]}, [MASK]!
|
||||
.if \numpix == 4
|
||||
vld1.32 {\mask[0]}, [MASK]!
|
||||
.elseif \numpix == 2
|
||||
vld1.16 {\mask[0]}, [MASK]!
|
||||
.elseif \numpix == 1
|
||||
vld1.8 {\mask[0]}, [MASK]!
|
||||
.else
|
||||
.error bilinear_load_mask_8 numpix is unsupported
|
||||
.error bilinear_load_mask_8 \numpix is unsupported
|
||||
.endif
|
||||
pld [MASK, #prefetch_offset]
|
||||
.endm
|
||||
|
||||
.macro bilinear_load_mask mask_fmt, numpix, mask
|
||||
bilinear_load_mask_&mask_fmt numpix, mask
|
||||
bilinear_load_mask_\()\mask_fmt \numpix, \mask
|
||||
.endm
|
||||
|
||||
|
||||
@ -250,28 +252,28 @@
|
||||
.endm
|
||||
|
||||
.macro bilinear_load_dst_8888 numpix, dst0, dst1, dst01
|
||||
.if numpix == 4
|
||||
vld1.32 {dst0, dst1}, [OUT]
|
||||
.elseif numpix == 2
|
||||
vld1.32 {dst0}, [OUT]
|
||||
.elseif numpix == 1
|
||||
vld1.32 {dst0[0]}, [OUT]
|
||||
.if \numpix == 4
|
||||
vld1.32 {\dst0, \dst1}, [OUT]
|
||||
.elseif \numpix == 2
|
||||
vld1.32 {\dst0}, [OUT]
|
||||
.elseif \numpix == 1
|
||||
vld1.32 {\dst0[0]}, [OUT]
|
||||
.else
|
||||
.error bilinear_load_dst_8888 numpix is unsupported
|
||||
.error bilinear_load_dst_8888 \numpix is unsupported
|
||||
.endif
|
||||
pld [OUT, #(prefetch_offset * 4)]
|
||||
.endm
|
||||
|
||||
.macro bilinear_load_dst_8888_over numpix, dst0, dst1, dst01
|
||||
bilinear_load_dst_8888 numpix, dst0, dst1, dst01
|
||||
bilinear_load_dst_8888 \numpix, \dst0, \dst1, \dst01
|
||||
.endm
|
||||
|
||||
.macro bilinear_load_dst_8888_add numpix, dst0, dst1, dst01
|
||||
bilinear_load_dst_8888 numpix, dst0, dst1, dst01
|
||||
bilinear_load_dst_8888 \numpix, \dst0, \dst1, \dst01
|
||||
.endm
|
||||
|
||||
.macro bilinear_load_dst dst_fmt, op, numpix, dst0, dst1, dst01
|
||||
bilinear_load_dst_&dst_fmt&_&op numpix, dst0, dst1, dst01
|
||||
bilinear_load_dst_\()\dst_fmt\()_\()\op \numpix, \dst0, \dst1, \dst01
|
||||
.endm
|
||||
|
||||
/*
|
||||
@ -290,19 +292,19 @@
|
||||
.endm
|
||||
|
||||
.macro bilinear_duplicate_mask_8 numpix, mask
|
||||
.if numpix == 4
|
||||
vdup.32 mask, mask[0]
|
||||
.elseif numpix == 2
|
||||
vdup.16 mask, mask[0]
|
||||
.elseif numpix == 1
|
||||
vdup.8 mask, mask[0]
|
||||
.if \numpix == 4
|
||||
vdup.32 \mask, \mask[0]
|
||||
.elseif \numpix == 2
|
||||
vdup.16 \mask, \mask[0]
|
||||
.elseif \numpix == 1
|
||||
vdup.8 \mask, \mask[0]
|
||||
.else
|
||||
.error bilinear_duplicate_mask_8 is unsupported
|
||||
.endif
|
||||
.endm
|
||||
|
||||
.macro bilinear_duplicate_mask mask_fmt, numpix, mask
|
||||
bilinear_duplicate_mask_&mask_fmt numpix, mask
|
||||
bilinear_duplicate_mask_\()\mask_fmt \numpix, \mask
|
||||
.endm
|
||||
|
||||
/*
|
||||
@ -310,10 +312,10 @@
|
||||
* Interleave should be done when maks is enabled or operator is 'over'.
|
||||
*/
|
||||
.macro bilinear_interleave src0, src1, dst0, dst1
|
||||
vuzp.8 src0, src1
|
||||
vuzp.8 dst0, dst1
|
||||
vuzp.8 src0, src1
|
||||
vuzp.8 dst0, dst1
|
||||
vuzp.8 \src0, \src1
|
||||
vuzp.8 \dst0, \dst1
|
||||
vuzp.8 \src0, \src1
|
||||
vuzp.8 \dst0, \dst1
|
||||
.endm
|
||||
|
||||
.macro bilinear_interleave_src_dst_x_src \
|
||||
@ -323,7 +325,7 @@
|
||||
.macro bilinear_interleave_src_dst_x_over \
|
||||
numpix, src0, src1, src01, dst0, dst1, dst01
|
||||
|
||||
bilinear_interleave src0, src1, dst0, dst1
|
||||
bilinear_interleave \src0, \src1, \dst0, \dst1
|
||||
.endm
|
||||
|
||||
.macro bilinear_interleave_src_dst_x_add \
|
||||
@ -333,26 +335,26 @@
|
||||
.macro bilinear_interleave_src_dst_8_src \
|
||||
numpix, src0, src1, src01, dst0, dst1, dst01
|
||||
|
||||
bilinear_interleave src0, src1, dst0, dst1
|
||||
bilinear_interleave \src0, \src1, \dst0, \dst1
|
||||
.endm
|
||||
|
||||
.macro bilinear_interleave_src_dst_8_over \
|
||||
numpix, src0, src1, src01, dst0, dst1, dst01
|
||||
|
||||
bilinear_interleave src0, src1, dst0, dst1
|
||||
bilinear_interleave \src0, \src1, \dst0, \dst1
|
||||
.endm
|
||||
|
||||
.macro bilinear_interleave_src_dst_8_add \
|
||||
numpix, src0, src1, src01, dst0, dst1, dst01
|
||||
|
||||
bilinear_interleave src0, src1, dst0, dst1
|
||||
bilinear_interleave \src0, \src1, \dst0, \dst1
|
||||
.endm
|
||||
|
||||
.macro bilinear_interleave_src_dst \
|
||||
mask_fmt, op, numpix, src0, src1, src01, dst0, dst1, dst01
|
||||
|
||||
bilinear_interleave_src_dst_&mask_fmt&_&op \
|
||||
numpix, src0, src1, src01, dst0, dst1, dst01
|
||||
bilinear_interleave_src_dst_\()\mask_fmt\()_\()\op \
|
||||
\numpix, \src0, \src1, \src01, \dst0, \dst1, \dst01
|
||||
.endm
|
||||
|
||||
|
||||
@ -370,23 +372,23 @@
|
||||
numpix, src0, src1, src01, mask, \
|
||||
tmp01, tmp23, tmp45, tmp67
|
||||
|
||||
vmull.u8 tmp01, src0, mask
|
||||
vmull.u8 tmp23, src1, mask
|
||||
vmull.u8 \tmp01, \src0, \mask
|
||||
vmull.u8 \tmp23, \src1, \mask
|
||||
/* bubbles */
|
||||
vrshr.u16 tmp45, tmp01, #8
|
||||
vrshr.u16 tmp67, tmp23, #8
|
||||
vrshr.u16 \tmp45, \tmp01, #8
|
||||
vrshr.u16 \tmp67, \tmp23, #8
|
||||
/* bubbles */
|
||||
vraddhn.u16 src0, tmp45, tmp01
|
||||
vraddhn.u16 src1, tmp67, tmp23
|
||||
vraddhn.u16 \src0, \tmp45, \tmp01
|
||||
vraddhn.u16 \src1, \tmp67, \tmp23
|
||||
.endm
|
||||
|
||||
.macro bilinear_apply_mask_to_src \
|
||||
mask_fmt, numpix, src0, src1, src01, mask, \
|
||||
tmp01, tmp23, tmp45, tmp67
|
||||
|
||||
bilinear_apply_mask_to_src_&mask_fmt \
|
||||
numpix, src0, src1, src01, mask, \
|
||||
tmp01, tmp23, tmp45, tmp67
|
||||
bilinear_apply_mask_to_src_\()\mask_fmt \
|
||||
\numpix, \src0, \src1, \src01, \mask, \
|
||||
\tmp01, \tmp23, \tmp45, \tmp67
|
||||
.endm
|
||||
|
||||
|
||||
@ -403,79 +405,79 @@
|
||||
numpix, src0, src1, src01, dst0, dst1, dst01, \
|
||||
tmp01, tmp23, tmp45, tmp67, tmp8
|
||||
|
||||
vdup.32 tmp8, src1[1]
|
||||
vdup.32 \tmp8, \src1[1]
|
||||
/* bubbles */
|
||||
vmvn.8 tmp8, tmp8
|
||||
vmvn.8 \tmp8, \tmp8
|
||||
/* bubbles */
|
||||
vmull.u8 tmp01, dst0, tmp8
|
||||
vmull.u8 \tmp01, \dst0, \tmp8
|
||||
/* bubbles */
|
||||
vmull.u8 tmp23, dst1, tmp8
|
||||
vmull.u8 \tmp23, \dst1, \tmp8
|
||||
/* bubbles */
|
||||
vrshr.u16 tmp45, tmp01, #8
|
||||
vrshr.u16 tmp67, tmp23, #8
|
||||
vrshr.u16 \tmp45, \tmp01, #8
|
||||
vrshr.u16 \tmp67, \tmp23, #8
|
||||
/* bubbles */
|
||||
vraddhn.u16 dst0, tmp45, tmp01
|
||||
vraddhn.u16 dst1, tmp67, tmp23
|
||||
vraddhn.u16 \dst0, \tmp45, \tmp01
|
||||
vraddhn.u16 \dst1, \tmp67, \tmp23
|
||||
/* bubbles */
|
||||
vqadd.u8 src01, dst01, src01
|
||||
vqadd.u8 \src01, \dst01, \src01
|
||||
.endm
|
||||
|
||||
.macro bilinear_combine_add \
|
||||
numpix, src0, src1, src01, dst0, dst1, dst01, \
|
||||
tmp01, tmp23, tmp45, tmp67, tmp8
|
||||
|
||||
vqadd.u8 src01, dst01, src01
|
||||
vqadd.u8 \src01, \dst01, \src01
|
||||
.endm
|
||||
|
||||
.macro bilinear_combine \
|
||||
op, numpix, src0, src1, src01, dst0, dst1, dst01, \
|
||||
tmp01, tmp23, tmp45, tmp67, tmp8
|
||||
|
||||
bilinear_combine_&op \
|
||||
numpix, src0, src1, src01, dst0, dst1, dst01, \
|
||||
tmp01, tmp23, tmp45, tmp67, tmp8
|
||||
bilinear_combine_\()\op \
|
||||
\numpix, \src0, \src1, \src01, \dst0, \dst1, \dst01, \
|
||||
\tmp01, \tmp23, \tmp45, \tmp67, \tmp8
|
||||
.endm
|
||||
|
||||
/*
|
||||
* Macros for final deinterleaving of destination pixels if needed.
|
||||
*/
|
||||
.macro bilinear_deinterleave numpix, dst0, dst1, dst01
|
||||
vuzp.8 dst0, dst1
|
||||
vuzp.8 \dst0, \dst1
|
||||
/* bubbles */
|
||||
vuzp.8 dst0, dst1
|
||||
vuzp.8 \dst0, \dst1
|
||||
.endm
|
||||
|
||||
.macro bilinear_deinterleave_dst_x_src numpix, dst0, dst1, dst01
|
||||
.endm
|
||||
|
||||
.macro bilinear_deinterleave_dst_x_over numpix, dst0, dst1, dst01
|
||||
bilinear_deinterleave numpix, dst0, dst1, dst01
|
||||
bilinear_deinterleave \numpix, \dst0, \dst1, \dst01
|
||||
.endm
|
||||
|
||||
.macro bilinear_deinterleave_dst_x_add numpix, dst0, dst1, dst01
|
||||
.endm
|
||||
|
||||
.macro bilinear_deinterleave_dst_8_src numpix, dst0, dst1, dst01
|
||||
bilinear_deinterleave numpix, dst0, dst1, dst01
|
||||
bilinear_deinterleave \numpix, \dst0, \dst1, \dst01
|
||||
.endm
|
||||
|
||||
.macro bilinear_deinterleave_dst_8_over numpix, dst0, dst1, dst01
|
||||
bilinear_deinterleave numpix, dst0, dst1, dst01
|
||||
bilinear_deinterleave \numpix, \dst0, \dst1, \dst01
|
||||
.endm
|
||||
|
||||
.macro bilinear_deinterleave_dst_8_add numpix, dst0, dst1, dst01
|
||||
bilinear_deinterleave numpix, dst0, dst1, dst01
|
||||
bilinear_deinterleave \numpix, \dst0, \dst1, \dst01
|
||||
.endm
|
||||
|
||||
.macro bilinear_deinterleave_dst mask_fmt, op, numpix, dst0, dst1, dst01
|
||||
bilinear_deinterleave_dst_&mask_fmt&_&op numpix, dst0, dst1, dst01
|
||||
bilinear_deinterleave_dst_\()\mask_fmt\()_\()\op \numpix, \dst0, \dst1, \dst01
|
||||
.endm
|
||||
|
||||
|
||||
.macro bilinear_interpolate_last_pixel src_fmt, mask_fmt, dst_fmt, op
|
||||
bilinear_load_&src_fmt d0, d1, d2
|
||||
bilinear_load_mask mask_fmt, 1, d4
|
||||
bilinear_load_dst dst_fmt, op, 1, d18, d19, q9
|
||||
bilinear_load_\()\src_fmt d0, d1, d2
|
||||
bilinear_load_mask \mask_fmt, 1, d4
|
||||
bilinear_load_dst \dst_fmt, \op, 1, d18, d19, q9
|
||||
vmull.u8 q1, d0, d28
|
||||
vmlal.u8 q1, d1, d29
|
||||
/* 5 cycles bubble */
|
||||
@ -483,28 +485,28 @@
|
||||
vmlsl.u16 q0, d2, d30
|
||||
vmlal.u16 q0, d3, d30
|
||||
/* 5 cycles bubble */
|
||||
bilinear_duplicate_mask mask_fmt, 1, d4
|
||||
bilinear_duplicate_mask \mask_fmt, 1, d4
|
||||
vshrn.u32 d0, q0, #(2 * BILINEAR_INTERPOLATION_BITS)
|
||||
/* 3 cycles bubble */
|
||||
vmovn.u16 d0, q0
|
||||
/* 1 cycle bubble */
|
||||
bilinear_interleave_src_dst \
|
||||
mask_fmt, op, 1, d0, d1, q0, d18, d19, q9
|
||||
\mask_fmt, \op, 1, d0, d1, q0, d18, d19, q9
|
||||
bilinear_apply_mask_to_src \
|
||||
mask_fmt, 1, d0, d1, q0, d4, \
|
||||
\mask_fmt, 1, d0, d1, q0, d4, \
|
||||
q3, q8, q10, q11
|
||||
bilinear_combine \
|
||||
op, 1, d0, d1, q0, d18, d19, q9, \
|
||||
\op, 1, d0, d1, q0, d18, d19, q9, \
|
||||
q3, q8, q10, q11, d5
|
||||
bilinear_deinterleave_dst mask_fmt, op, 1, d0, d1, q0
|
||||
bilinear_store_&dst_fmt 1, q2, q3
|
||||
bilinear_deinterleave_dst \mask_fmt, \op, 1, d0, d1, q0
|
||||
bilinear_store_\()\dst_fmt 1, q2, q3
|
||||
.endm
|
||||
|
||||
.macro bilinear_interpolate_two_pixels src_fmt, mask_fmt, dst_fmt, op
|
||||
bilinear_load_and_vertical_interpolate_two_&src_fmt \
|
||||
bilinear_load_and_vertical_interpolate_two_\()\src_fmt \
|
||||
q1, q11, d0, d1, d20, d21, d22, d23
|
||||
bilinear_load_mask mask_fmt, 2, d4
|
||||
bilinear_load_dst dst_fmt, op, 2, d18, d19, q9
|
||||
bilinear_load_mask \mask_fmt, 2, d4
|
||||
bilinear_load_dst \dst_fmt, \op, 2, d18, d19, q9
|
||||
vshll.u16 q0, d2, #BILINEAR_INTERPOLATION_BITS
|
||||
vmlsl.u16 q0, d2, d30
|
||||
vmlal.u16 q0, d3, d30
|
||||
@ -513,24 +515,24 @@
|
||||
vmlal.u16 q10, d23, d31
|
||||
vshrn.u32 d0, q0, #(2 * BILINEAR_INTERPOLATION_BITS)
|
||||
vshrn.u32 d1, q10, #(2 * BILINEAR_INTERPOLATION_BITS)
|
||||
bilinear_duplicate_mask mask_fmt, 2, d4
|
||||
bilinear_duplicate_mask \mask_fmt, 2, d4
|
||||
vshr.u16 q15, q12, #(16 - BILINEAR_INTERPOLATION_BITS)
|
||||
vadd.u16 q12, q12, q13
|
||||
vmovn.u16 d0, q0
|
||||
bilinear_interleave_src_dst \
|
||||
mask_fmt, op, 2, d0, d1, q0, d18, d19, q9
|
||||
\mask_fmt, \op, 2, d0, d1, q0, d18, d19, q9
|
||||
bilinear_apply_mask_to_src \
|
||||
mask_fmt, 2, d0, d1, q0, d4, \
|
||||
\mask_fmt, 2, d0, d1, q0, d4, \
|
||||
q3, q8, q10, q11
|
||||
bilinear_combine \
|
||||
op, 2, d0, d1, q0, d18, d19, q9, \
|
||||
\op, 2, d0, d1, q0, d18, d19, q9, \
|
||||
q3, q8, q10, q11, d5
|
||||
bilinear_deinterleave_dst mask_fmt, op, 2, d0, d1, q0
|
||||
bilinear_store_&dst_fmt 2, q2, q3
|
||||
bilinear_deinterleave_dst \mask_fmt, \op, 2, d0, d1, q0
|
||||
bilinear_store_\()\dst_fmt 2, q2, q3
|
||||
.endm
|
||||
|
||||
.macro bilinear_interpolate_four_pixels src_fmt, mask_fmt, dst_fmt, op
|
||||
bilinear_load_and_vertical_interpolate_four_&src_fmt \
|
||||
bilinear_load_and_vertical_interpolate_four_\()\src_fmt \
|
||||
q1, q11, d0, d1, d20, d21, d22, d23 \
|
||||
q3, q9, d4, d5, d16, d17, d18, d19
|
||||
pld [TMP1, PF_OFFS]
|
||||
@ -546,8 +548,8 @@
|
||||
vmlsl.u16 q2, d6, d30
|
||||
vmlal.u16 q2, d7, d30
|
||||
vshll.u16 q8, d18, #BILINEAR_INTERPOLATION_BITS
|
||||
bilinear_load_mask mask_fmt, 4, d22
|
||||
bilinear_load_dst dst_fmt, op, 4, d2, d3, q1
|
||||
bilinear_load_mask \mask_fmt, 4, d22
|
||||
bilinear_load_dst \dst_fmt, \op, 4, d2, d3, q1
|
||||
pld [TMP1, PF_OFFS]
|
||||
vmlsl.u16 q8, d18, d31
|
||||
vmlal.u16 q8, d19, d31
|
||||
@ -556,21 +558,21 @@
|
||||
vshrn.u32 d1, q10, #(2 * BILINEAR_INTERPOLATION_BITS)
|
||||
vshrn.u32 d4, q2, #(2 * BILINEAR_INTERPOLATION_BITS)
|
||||
vshrn.u32 d5, q8, #(2 * BILINEAR_INTERPOLATION_BITS)
|
||||
bilinear_duplicate_mask mask_fmt, 4, d22
|
||||
bilinear_duplicate_mask \mask_fmt, 4, d22
|
||||
vshr.u16 q15, q12, #(16 - BILINEAR_INTERPOLATION_BITS)
|
||||
vmovn.u16 d0, q0
|
||||
vmovn.u16 d1, q2
|
||||
vadd.u16 q12, q12, q13
|
||||
bilinear_interleave_src_dst \
|
||||
mask_fmt, op, 4, d0, d1, q0, d2, d3, q1
|
||||
\mask_fmt, \op, 4, d0, d1, q0, d2, d3, q1
|
||||
bilinear_apply_mask_to_src \
|
||||
mask_fmt, 4, d0, d1, q0, d22, \
|
||||
\mask_fmt, 4, d0, d1, q0, d22, \
|
||||
q3, q8, q9, q10
|
||||
bilinear_combine \
|
||||
op, 4, d0, d1, q0, d2, d3, q1, \
|
||||
\op, 4, d0, d1, q0, d2, d3, q1, \
|
||||
q3, q8, q9, q10, d23
|
||||
bilinear_deinterleave_dst mask_fmt, op, 4, d0, d1, q0
|
||||
bilinear_store_&dst_fmt 4, q2, q3
|
||||
bilinear_deinterleave_dst \mask_fmt, \op, 4, d0, d1, q0
|
||||
bilinear_store_\()\dst_fmt 4, q2, q3
|
||||
.endm
|
||||
|
||||
.set BILINEAR_FLAG_USE_MASK, 1
|
||||
@ -610,14 +612,14 @@
|
||||
prefetch_distance, \
|
||||
flags
|
||||
|
||||
pixman_asm_function fname
|
||||
.if pixblock_size == 8
|
||||
.elseif pixblock_size == 4
|
||||
pixman_asm_function \fname
|
||||
.if \pixblock_size == 8
|
||||
.elseif \pixblock_size == 4
|
||||
.else
|
||||
.error unsupported pixblock size
|
||||
.endif
|
||||
|
||||
.if ((flags) & BILINEAR_FLAG_USE_MASK) == 0
|
||||
.if ((\flags) & BILINEAR_FLAG_USE_MASK) == 0
|
||||
OUT .req r0
|
||||
TOP .req r1
|
||||
BOTTOM .req r2
|
||||
@ -635,7 +637,7 @@ pixman_asm_function fname
|
||||
|
||||
mov ip, sp
|
||||
push {r4, r5, r6, r7, r8, r9}
|
||||
mov PF_OFFS, #prefetch_distance
|
||||
mov PF_OFFS, #\prefetch_distance
|
||||
ldmia ip, {WB, X, UX, WIDTH}
|
||||
.else
|
||||
OUT .req r0
|
||||
@ -654,17 +656,17 @@ pixman_asm_function fname
|
||||
TMP4 .req r10
|
||||
STRIDE .req r3
|
||||
|
||||
.set prefetch_offset, prefetch_distance
|
||||
.set prefetch_offset, \prefetch_distance
|
||||
|
||||
mov ip, sp
|
||||
push {r4, r5, r6, r7, r8, r9, r10, ip}
|
||||
mov PF_OFFS, #prefetch_distance
|
||||
mov PF_OFFS, #\prefetch_distance
|
||||
ldmia ip, {WT, WB, X, UX, WIDTH}
|
||||
.endif
|
||||
|
||||
mul PF_OFFS, PF_OFFS, UX
|
||||
|
||||
.if ((flags) & BILINEAR_FLAG_USE_ALL_NEON_REGS) != 0
|
||||
.if ((\flags) & BILINEAR_FLAG_USE_ALL_NEON_REGS) != 0
|
||||
vpush {d8-d15}
|
||||
.endif
|
||||
|
||||
@ -683,11 +685,11 @@ pixman_asm_function fname
|
||||
/* ensure good destination alignment */
|
||||
cmp WIDTH, #1
|
||||
blt 0f
|
||||
tst OUT, #(1 << dst_bpp_shift)
|
||||
tst OUT, #(1 << \dst_bpp_shift)
|
||||
beq 0f
|
||||
vshr.u16 q15, q12, #(16 - BILINEAR_INTERPOLATION_BITS)
|
||||
vadd.u16 q12, q12, q13
|
||||
bilinear_process_last_pixel
|
||||
\bilinear_process_last_pixel
|
||||
sub WIDTH, WIDTH, #1
|
||||
0:
|
||||
vadd.u16 q13, q13, q13
|
||||
@ -696,53 +698,53 @@ pixman_asm_function fname
|
||||
|
||||
cmp WIDTH, #2
|
||||
blt 0f
|
||||
tst OUT, #(1 << (dst_bpp_shift + 1))
|
||||
tst OUT, #(1 << (\dst_bpp_shift + 1))
|
||||
beq 0f
|
||||
bilinear_process_two_pixels
|
||||
\bilinear_process_two_pixels
|
||||
sub WIDTH, WIDTH, #2
|
||||
0:
|
||||
.if pixblock_size == 8
|
||||
.if \pixblock_size == 8
|
||||
cmp WIDTH, #4
|
||||
blt 0f
|
||||
tst OUT, #(1 << (dst_bpp_shift + 2))
|
||||
tst OUT, #(1 << (\dst_bpp_shift + 2))
|
||||
beq 0f
|
||||
bilinear_process_four_pixels
|
||||
\bilinear_process_four_pixels
|
||||
sub WIDTH, WIDTH, #4
|
||||
0:
|
||||
.endif
|
||||
subs WIDTH, WIDTH, #pixblock_size
|
||||
subs WIDTH, WIDTH, #\pixblock_size
|
||||
blt 1f
|
||||
mov PF_OFFS, PF_OFFS, asr #(16 - src_bpp_shift)
|
||||
bilinear_process_pixblock_head
|
||||
subs WIDTH, WIDTH, #pixblock_size
|
||||
mov PF_OFFS, PF_OFFS, asr #(16 - \src_bpp_shift)
|
||||
\bilinear_process_pixblock_head
|
||||
subs WIDTH, WIDTH, #\pixblock_size
|
||||
blt 5f
|
||||
0:
|
||||
bilinear_process_pixblock_tail_head
|
||||
subs WIDTH, WIDTH, #pixblock_size
|
||||
\bilinear_process_pixblock_tail_head
|
||||
subs WIDTH, WIDTH, #\pixblock_size
|
||||
bge 0b
|
||||
5:
|
||||
bilinear_process_pixblock_tail
|
||||
\bilinear_process_pixblock_tail
|
||||
1:
|
||||
.if pixblock_size == 8
|
||||
.if \pixblock_size == 8
|
||||
tst WIDTH, #4
|
||||
beq 2f
|
||||
bilinear_process_four_pixels
|
||||
\bilinear_process_four_pixels
|
||||
2:
|
||||
.endif
|
||||
/* handle the remaining trailing pixels */
|
||||
tst WIDTH, #2
|
||||
beq 2f
|
||||
bilinear_process_two_pixels
|
||||
\bilinear_process_two_pixels
|
||||
2:
|
||||
tst WIDTH, #1
|
||||
beq 3f
|
||||
bilinear_process_last_pixel
|
||||
\bilinear_process_last_pixel
|
||||
3:
|
||||
.if ((flags) & BILINEAR_FLAG_USE_ALL_NEON_REGS) != 0
|
||||
.if ((\flags) & BILINEAR_FLAG_USE_ALL_NEON_REGS) != 0
|
||||
vpop {d8-d15}
|
||||
.endif
|
||||
|
||||
.if ((flags) & BILINEAR_FLAG_USE_MASK) == 0
|
||||
.if ((\flags) & BILINEAR_FLAG_USE_MASK) == 0
|
||||
pop {r4, r5, r6, r7, r8, r9}
|
||||
.else
|
||||
pop {r4, r5, r6, r7, r8, r9, r10, ip}
|
||||
@ -762,11 +764,11 @@ pixman_asm_function fname
|
||||
.unreq TMP3
|
||||
.unreq TMP4
|
||||
.unreq STRIDE
|
||||
.if ((flags) & BILINEAR_FLAG_USE_MASK) != 0
|
||||
.if ((\flags) & BILINEAR_FLAG_USE_MASK) != 0
|
||||
.unreq MASK
|
||||
.endif
|
||||
|
||||
.endfunc
|
||||
pixman_end_asm_function
|
||||
|
||||
.endm
|
||||
|
||||
|
@ -53,6 +53,8 @@
|
||||
#include "pixman-arm-asm.h"
|
||||
#include "pixman-arm-neon-asm.h"
|
||||
|
||||
pixman_syntax_unified
|
||||
|
||||
/* Global configuration options and preferences */
|
||||
|
||||
/*
|
||||
@ -260,13 +262,13 @@
|
||||
vshrn.u16 d7, q2, #3
|
||||
vsli.u16 q2, q2, #5
|
||||
vshll.u8 q14, d16, #8
|
||||
PF add PF_X, PF_X, #8
|
||||
PF add, PF_X, PF_X, #8
|
||||
vshll.u8 q8, d19, #8
|
||||
PF tst PF_CTL, #0xF
|
||||
PF tst, PF_CTL, #0xF
|
||||
vsri.u8 d6, d6, #5
|
||||
PF addne PF_X, PF_X, #8
|
||||
PF addne, PF_X, PF_X, #8
|
||||
vmvn.8 d3, d3
|
||||
PF subne PF_CTL, PF_CTL, #1
|
||||
PF subne, PF_CTL, PF_CTL, #1
|
||||
vsri.u8 d7, d7, #6
|
||||
vshrn.u16 d30, q2, #2
|
||||
vmull.u8 q10, d3, d6
|
||||
@ -275,18 +277,18 @@
|
||||
vmull.u8 q12, d3, d30
|
||||
PF pld, [PF_DST, PF_X, lsl #dst_bpp_shift]
|
||||
vsri.u16 q14, q8, #5
|
||||
PF cmp PF_X, ORIG_W
|
||||
PF cmp, PF_X, ORIG_W
|
||||
vshll.u8 q9, d18, #8
|
||||
vrshr.u16 q13, q10, #8
|
||||
PF subge PF_X, PF_X, ORIG_W
|
||||
PF subge, PF_X, PF_X, ORIG_W
|
||||
vrshr.u16 q3, q11, #8
|
||||
vrshr.u16 q15, q12, #8
|
||||
PF subges PF_CTL, PF_CTL, #0x10
|
||||
PF subsge, PF_CTL, PF_CTL, #0x10
|
||||
vsri.u16 q14, q9, #11
|
||||
PF ldrgeb DUMMY, [PF_SRC, SRC_STRIDE, lsl #src_bpp_shift]!
|
||||
PF ldrbge, DUMMY, [PF_SRC, SRC_STRIDE, lsl #src_bpp_shift]!
|
||||
vraddhn.u16 d20, q10, q13
|
||||
vraddhn.u16 d23, q11, q3
|
||||
PF ldrgeb DUMMY, [PF_DST, DST_STRIDE, lsl #dst_bpp_shift]!
|
||||
PF ldrbge, DUMMY, [PF_DST, DST_STRIDE, lsl #dst_bpp_shift]!
|
||||
vraddhn.u16 d22, q12, q15
|
||||
vst1.16 {d28, d29}, [DST_W, :128]!
|
||||
.endm
|
||||
@ -434,20 +436,20 @@ generate_composite_function \
|
||||
|
||||
.macro pixman_composite_src_8888_0565_process_pixblock_tail_head
|
||||
vsri.u16 q14, q8, #5
|
||||
PF add PF_X, PF_X, #8
|
||||
PF tst PF_CTL, #0xF
|
||||
PF add, PF_X, PF_X, #8
|
||||
PF tst, PF_CTL, #0xF
|
||||
fetch_src_pixblock
|
||||
PF addne PF_X, PF_X, #8
|
||||
PF subne PF_CTL, PF_CTL, #1
|
||||
PF addne, PF_X, PF_X, #8
|
||||
PF subne, PF_CTL, PF_CTL, #1
|
||||
vsri.u16 q14, q9, #11
|
||||
PF cmp PF_X, ORIG_W
|
||||
PF cmp, PF_X, ORIG_W
|
||||
PF pld, [PF_SRC, PF_X, lsl #src_bpp_shift]
|
||||
vshll.u8 q8, d1, #8
|
||||
vst1.16 {d28, d29}, [DST_W, :128]!
|
||||
PF subge PF_X, PF_X, ORIG_W
|
||||
PF subges PF_CTL, PF_CTL, #0x10
|
||||
PF subge, PF_X, PF_X, ORIG_W
|
||||
PF subsge, PF_CTL, PF_CTL, #0x10
|
||||
vshll.u8 q14, d2, #8
|
||||
PF ldrgeb DUMMY, [PF_SRC, SRC_STRIDE, lsl #src_bpp_shift]!
|
||||
PF ldrbge, DUMMY, [PF_SRC, SRC_STRIDE, lsl #src_bpp_shift]!
|
||||
vshll.u8 q9, d0, #8
|
||||
.endm
|
||||
|
||||
@ -509,20 +511,20 @@ generate_composite_function \
|
||||
|
||||
.macro pixman_composite_add_8_8_process_pixblock_tail_head
|
||||
fetch_src_pixblock
|
||||
PF add PF_X, PF_X, #32
|
||||
PF tst PF_CTL, #0xF
|
||||
PF add, PF_X, PF_X, #32
|
||||
PF tst, PF_CTL, #0xF
|
||||
vld1.8 {d4, d5, d6, d7}, [DST_R, :128]!
|
||||
PF addne PF_X, PF_X, #32
|
||||
PF subne PF_CTL, PF_CTL, #1
|
||||
PF addne, PF_X, PF_X, #32
|
||||
PF subne, PF_CTL, PF_CTL, #1
|
||||
vst1.8 {d28, d29, d30, d31}, [DST_W, :128]!
|
||||
PF cmp PF_X, ORIG_W
|
||||
PF cmp, PF_X, ORIG_W
|
||||
PF pld, [PF_SRC, PF_X, lsl #src_bpp_shift]
|
||||
PF pld, [PF_DST, PF_X, lsl #dst_bpp_shift]
|
||||
PF subge PF_X, PF_X, ORIG_W
|
||||
PF subges PF_CTL, PF_CTL, #0x10
|
||||
PF subge, PF_X, PF_X, ORIG_W
|
||||
PF subsge, PF_CTL, PF_CTL, #0x10
|
||||
vqadd.u8 q14, q0, q2
|
||||
PF ldrgeb DUMMY, [PF_SRC, SRC_STRIDE, lsl #src_bpp_shift]!
|
||||
PF ldrgeb DUMMY, [PF_DST, DST_STRIDE, lsl #dst_bpp_shift]!
|
||||
PF ldrbge, DUMMY, [PF_SRC, SRC_STRIDE, lsl #src_bpp_shift]!
|
||||
PF ldrbge, DUMMY, [PF_DST, DST_STRIDE, lsl #dst_bpp_shift]!
|
||||
vqadd.u8 q15, q1, q3
|
||||
.endm
|
||||
|
||||
@ -541,20 +543,20 @@ generate_composite_function \
|
||||
|
||||
.macro pixman_composite_add_8888_8888_process_pixblock_tail_head
|
||||
fetch_src_pixblock
|
||||
PF add PF_X, PF_X, #8
|
||||
PF tst PF_CTL, #0xF
|
||||
PF add, PF_X, PF_X, #8
|
||||
PF tst, PF_CTL, #0xF
|
||||
vld1.32 {d4, d5, d6, d7}, [DST_R, :128]!
|
||||
PF addne PF_X, PF_X, #8
|
||||
PF subne PF_CTL, PF_CTL, #1
|
||||
PF addne, PF_X, PF_X, #8
|
||||
PF subne, PF_CTL, PF_CTL, #1
|
||||
vst1.32 {d28, d29, d30, d31}, [DST_W, :128]!
|
||||
PF cmp PF_X, ORIG_W
|
||||
PF cmp, PF_X, ORIG_W
|
||||
PF pld, [PF_SRC, PF_X, lsl #src_bpp_shift]
|
||||
PF pld, [PF_DST, PF_X, lsl #dst_bpp_shift]
|
||||
PF subge PF_X, PF_X, ORIG_W
|
||||
PF subges PF_CTL, PF_CTL, #0x10
|
||||
PF subge, PF_X, PF_X, ORIG_W
|
||||
PF subsge, PF_CTL, PF_CTL, #0x10
|
||||
vqadd.u8 q14, q0, q2
|
||||
PF ldrgeb DUMMY, [PF_SRC, SRC_STRIDE, lsl #src_bpp_shift]!
|
||||
PF ldrgeb DUMMY, [PF_DST, DST_STRIDE, lsl #dst_bpp_shift]!
|
||||
PF ldrbge, DUMMY, [PF_SRC, SRC_STRIDE, lsl #src_bpp_shift]!
|
||||
PF ldrbge, DUMMY, [PF_DST, DST_STRIDE, lsl #dst_bpp_shift]!
|
||||
vqadd.u8 q15, q1, q3
|
||||
.endm
|
||||
|
||||
@ -604,16 +606,16 @@ generate_composite_function_single_scanline \
|
||||
.macro pixman_composite_out_reverse_8888_8888_process_pixblock_tail_head
|
||||
vld4.8 {d4, d5, d6, d7}, [DST_R, :128]!
|
||||
vrshr.u16 q14, q8, #8
|
||||
PF add PF_X, PF_X, #8
|
||||
PF tst PF_CTL, #0xF
|
||||
PF add, PF_X, PF_X, #8
|
||||
PF tst, PF_CTL, #0xF
|
||||
vrshr.u16 q15, q9, #8
|
||||
vrshr.u16 q12, q10, #8
|
||||
vrshr.u16 q13, q11, #8
|
||||
PF addne PF_X, PF_X, #8
|
||||
PF subne PF_CTL, PF_CTL, #1
|
||||
PF addne, PF_X, PF_X, #8
|
||||
PF subne, PF_CTL, PF_CTL, #1
|
||||
vraddhn.u16 d28, q14, q8
|
||||
vraddhn.u16 d29, q15, q9
|
||||
PF cmp PF_X, ORIG_W
|
||||
PF cmp, PF_X, ORIG_W
|
||||
vraddhn.u16 d30, q12, q10
|
||||
vraddhn.u16 d31, q13, q11
|
||||
fetch_src_pixblock
|
||||
@ -621,13 +623,13 @@ generate_composite_function_single_scanline \
|
||||
vmvn.8 d22, d3
|
||||
PF pld, [PF_DST, PF_X, lsl #dst_bpp_shift]
|
||||
vst4.8 {d28, d29, d30, d31}, [DST_W, :128]!
|
||||
PF subge PF_X, PF_X, ORIG_W
|
||||
PF subge, PF_X, PF_X, ORIG_W
|
||||
vmull.u8 q8, d22, d4
|
||||
PF subges PF_CTL, PF_CTL, #0x10
|
||||
PF subsge, PF_CTL, PF_CTL, #0x10
|
||||
vmull.u8 q9, d22, d5
|
||||
PF ldrgeb DUMMY, [PF_SRC, SRC_STRIDE, lsl #src_bpp_shift]!
|
||||
PF ldrbge, DUMMY, [PF_SRC, SRC_STRIDE, lsl #src_bpp_shift]!
|
||||
vmull.u8 q10, d22, d6
|
||||
PF ldrgeb DUMMY, [PF_DST, DST_STRIDE, lsl #dst_bpp_shift]!
|
||||
PF ldrbge, DUMMY, [PF_DST, DST_STRIDE, lsl #dst_bpp_shift]!
|
||||
vmull.u8 q11, d22, d7
|
||||
.endm
|
||||
|
||||
@ -656,16 +658,16 @@ generate_composite_function_single_scanline \
|
||||
.macro pixman_composite_over_8888_8888_process_pixblock_tail_head
|
||||
vld4.8 {d4, d5, d6, d7}, [DST_R, :128]!
|
||||
vrshr.u16 q14, q8, #8
|
||||
PF add PF_X, PF_X, #8
|
||||
PF tst PF_CTL, #0xF
|
||||
PF add, PF_X, PF_X, #8
|
||||
PF tst, PF_CTL, #0xF
|
||||
vrshr.u16 q15, q9, #8
|
||||
vrshr.u16 q12, q10, #8
|
||||
vrshr.u16 q13, q11, #8
|
||||
PF addne PF_X, PF_X, #8
|
||||
PF subne PF_CTL, PF_CTL, #1
|
||||
PF addne, PF_X, PF_X, #8
|
||||
PF subne, PF_CTL, PF_CTL, #1
|
||||
vraddhn.u16 d28, q14, q8
|
||||
vraddhn.u16 d29, q15, q9
|
||||
PF cmp PF_X, ORIG_W
|
||||
PF cmp, PF_X, ORIG_W
|
||||
vraddhn.u16 d30, q12, q10
|
||||
vraddhn.u16 d31, q13, q11
|
||||
vqadd.u8 q14, q0, q14
|
||||
@ -675,13 +677,13 @@ generate_composite_function_single_scanline \
|
||||
vmvn.8 d22, d3
|
||||
PF pld, [PF_DST, PF_X, lsl #dst_bpp_shift]
|
||||
vst4.8 {d28, d29, d30, d31}, [DST_W, :128]!
|
||||
PF subge PF_X, PF_X, ORIG_W
|
||||
PF subge, PF_X, PF_X, ORIG_W
|
||||
vmull.u8 q8, d22, d4
|
||||
PF subges PF_CTL, PF_CTL, #0x10
|
||||
PF subsge, PF_CTL, PF_CTL, #0x10
|
||||
vmull.u8 q9, d22, d5
|
||||
PF ldrgeb DUMMY, [PF_SRC, SRC_STRIDE, lsl #src_bpp_shift]!
|
||||
PF ldrbge, DUMMY, [PF_SRC, SRC_STRIDE, lsl #src_bpp_shift]!
|
||||
vmull.u8 q10, d22, d6
|
||||
PF ldrgeb DUMMY, [PF_DST, DST_STRIDE, lsl #dst_bpp_shift]!
|
||||
PF ldrbge, DUMMY, [PF_DST, DST_STRIDE, lsl #dst_bpp_shift]!
|
||||
vmull.u8 q11, d22, d7
|
||||
.endm
|
||||
|
||||
@ -742,20 +744,20 @@ generate_composite_function_single_scanline \
|
||||
vraddhn.u16 d31, q3, q11
|
||||
vld4.8 {d4, d5, d6, d7}, [DST_R, :128]!
|
||||
vqadd.u8 q14, q0, q14
|
||||
PF add PF_X, PF_X, #8
|
||||
PF tst PF_CTL, #0x0F
|
||||
PF addne PF_X, PF_X, #8
|
||||
PF subne PF_CTL, PF_CTL, #1
|
||||
PF add, PF_X, PF_X, #8
|
||||
PF tst, PF_CTL, #0x0F
|
||||
PF addne, PF_X, PF_X, #8
|
||||
PF subne, PF_CTL, PF_CTL, #1
|
||||
vqadd.u8 q15, q1, q15
|
||||
PF cmp PF_X, ORIG_W
|
||||
PF cmp, PF_X, ORIG_W
|
||||
vmull.u8 q8, d24, d4
|
||||
PF pld, [PF_DST, PF_X, lsl #dst_bpp_shift]
|
||||
vmull.u8 q9, d24, d5
|
||||
PF subge PF_X, PF_X, ORIG_W
|
||||
PF subge, PF_X, PF_X, ORIG_W
|
||||
vmull.u8 q10, d24, d6
|
||||
PF subges PF_CTL, PF_CTL, #0x10
|
||||
PF subsge, PF_CTL, PF_CTL, #0x10
|
||||
vmull.u8 q11, d24, d7
|
||||
PF ldrgeb DUMMY, [PF_DST, DST_STRIDE, lsl #dst_bpp_shift]!
|
||||
PF ldrbge, DUMMY, [PF_DST, DST_STRIDE, lsl #dst_bpp_shift]!
|
||||
vst4.8 {d28, d29, d30, d31}, [DST_W, :128]!
|
||||
.endm
|
||||
|
||||
@ -784,16 +786,16 @@ generate_composite_function \
|
||||
|
||||
.macro pixman_composite_over_reverse_n_8888_process_pixblock_tail_head
|
||||
vrshr.u16 q14, q8, #8
|
||||
PF add PF_X, PF_X, #8
|
||||
PF tst PF_CTL, #0xF
|
||||
PF add, PF_X, PF_X, #8
|
||||
PF tst, PF_CTL, #0xF
|
||||
vrshr.u16 q15, q9, #8
|
||||
vrshr.u16 q12, q10, #8
|
||||
vrshr.u16 q13, q11, #8
|
||||
PF addne PF_X, PF_X, #8
|
||||
PF subne PF_CTL, PF_CTL, #1
|
||||
PF addne, PF_X, PF_X, #8
|
||||
PF subne, PF_CTL, PF_CTL, #1
|
||||
vraddhn.u16 d28, q14, q8
|
||||
vraddhn.u16 d29, q15, q9
|
||||
PF cmp PF_X, ORIG_W
|
||||
PF cmp, PF_X, ORIG_W
|
||||
vraddhn.u16 d30, q12, q10
|
||||
vraddhn.u16 d31, q13, q11
|
||||
vqadd.u8 q14, q0, q14
|
||||
@ -802,12 +804,12 @@ generate_composite_function \
|
||||
vmvn.8 d22, d3
|
||||
PF pld, [PF_DST, PF_X, lsl #dst_bpp_shift]
|
||||
vst4.8 {d28, d29, d30, d31}, [DST_W, :128]!
|
||||
PF subge PF_X, PF_X, ORIG_W
|
||||
PF subge, PF_X, PF_X, ORIG_W
|
||||
vmull.u8 q8, d22, d4
|
||||
PF subges PF_CTL, PF_CTL, #0x10
|
||||
PF subsge, PF_CTL, PF_CTL, #0x10
|
||||
vmull.u8 q9, d22, d5
|
||||
vmull.u8 q10, d22, d6
|
||||
PF ldrgeb DUMMY, [PF_DST, DST_STRIDE, lsl #dst_bpp_shift]!
|
||||
PF ldrbge, DUMMY, [PF_DST, DST_STRIDE, lsl #dst_bpp_shift]!
|
||||
vmull.u8 q11, d22, d7
|
||||
.endm
|
||||
|
||||
@ -1245,23 +1247,23 @@ generate_composite_function \
|
||||
|
||||
.macro pixman_composite_src_n_8_8888_process_pixblock_tail_head
|
||||
fetch_mask_pixblock
|
||||
PF add PF_X, PF_X, #8
|
||||
PF add, PF_X, PF_X, #8
|
||||
vrshrn.u16 d28, q8, #8
|
||||
PF tst PF_CTL, #0x0F
|
||||
PF tst, PF_CTL, #0x0F
|
||||
vrshrn.u16 d29, q9, #8
|
||||
PF addne PF_X, PF_X, #8
|
||||
PF addne, PF_X, PF_X, #8
|
||||
vrshrn.u16 d30, q10, #8
|
||||
PF subne PF_CTL, PF_CTL, #1
|
||||
PF subne, PF_CTL, PF_CTL, #1
|
||||
vrshrn.u16 d31, q11, #8
|
||||
PF cmp PF_X, ORIG_W
|
||||
PF cmp, PF_X, ORIG_W
|
||||
vmull.u8 q8, d24, d0
|
||||
PF pld, [PF_MASK, PF_X, lsl #mask_bpp_shift]
|
||||
vmull.u8 q9, d24, d1
|
||||
PF subge PF_X, PF_X, ORIG_W
|
||||
PF subge, PF_X, PF_X, ORIG_W
|
||||
vmull.u8 q10, d24, d2
|
||||
PF subges PF_CTL, PF_CTL, #0x10
|
||||
PF subsge, PF_CTL, PF_CTL, #0x10
|
||||
vmull.u8 q11, d24, d3
|
||||
PF ldrgeb DUMMY, [PF_MASK, MASK_STRIDE, lsl #mask_bpp_shift]!
|
||||
PF ldrbge, DUMMY, [PF_MASK, MASK_STRIDE, lsl #mask_bpp_shift]!
|
||||
vst4.8 {d28, d29, d30, d31}, [DST_W, :128]!
|
||||
vrsra.u16 q8, q8, #8
|
||||
vrsra.u16 q9, q9, #8
|
||||
@ -1314,23 +1316,23 @@ generate_composite_function \
|
||||
|
||||
.macro pixman_composite_src_n_8_8_process_pixblock_tail_head
|
||||
fetch_mask_pixblock
|
||||
PF add PF_X, PF_X, #8
|
||||
PF add, PF_X, PF_X, #8
|
||||
vrshrn.u16 d28, q0, #8
|
||||
PF tst PF_CTL, #0x0F
|
||||
PF tst, PF_CTL, #0x0F
|
||||
vrshrn.u16 d29, q1, #8
|
||||
PF addne PF_X, PF_X, #8
|
||||
PF addne, PF_X, PF_X, #8
|
||||
vrshrn.u16 d30, q2, #8
|
||||
PF subne PF_CTL, PF_CTL, #1
|
||||
PF subne, PF_CTL, PF_CTL, #1
|
||||
vrshrn.u16 d31, q3, #8
|
||||
PF cmp PF_X, ORIG_W
|
||||
PF cmp, PF_X, ORIG_W
|
||||
vmull.u8 q0, d24, d16
|
||||
PF pld, [PF_MASK, PF_X, lsl #mask_bpp_shift]
|
||||
vmull.u8 q1, d25, d16
|
||||
PF subge PF_X, PF_X, ORIG_W
|
||||
PF subge, PF_X, PF_X, ORIG_W
|
||||
vmull.u8 q2, d26, d16
|
||||
PF subges PF_CTL, PF_CTL, #0x10
|
||||
PF subsge, PF_CTL, PF_CTL, #0x10
|
||||
vmull.u8 q3, d27, d16
|
||||
PF ldrgeb DUMMY, [PF_MASK, MASK_STRIDE, lsl #mask_bpp_shift]!
|
||||
PF ldrbge, DUMMY, [PF_MASK, MASK_STRIDE, lsl #mask_bpp_shift]!
|
||||
vst1.8 {d28, d29, d30, d31}, [DST_W, :128]!
|
||||
vrsra.u16 q0, q0, #8
|
||||
vrsra.u16 q1, q1, #8
|
||||
@ -1408,27 +1410,27 @@ generate_composite_function \
|
||||
vrshr.u16 q15, q9, #8
|
||||
fetch_mask_pixblock
|
||||
vrshr.u16 q6, q10, #8
|
||||
PF add PF_X, PF_X, #8
|
||||
PF add, PF_X, PF_X, #8
|
||||
vrshr.u16 q7, q11, #8
|
||||
PF tst PF_CTL, #0x0F
|
||||
PF tst, PF_CTL, #0x0F
|
||||
vraddhn.u16 d28, q14, q8
|
||||
PF addne PF_X, PF_X, #8
|
||||
PF addne, PF_X, PF_X, #8
|
||||
vraddhn.u16 d29, q15, q9
|
||||
PF subne PF_CTL, PF_CTL, #1
|
||||
PF subne, PF_CTL, PF_CTL, #1
|
||||
vraddhn.u16 d30, q6, q10
|
||||
PF cmp PF_X, ORIG_W
|
||||
PF cmp, PF_X, ORIG_W
|
||||
vraddhn.u16 d31, q7, q11
|
||||
PF pld, [PF_DST, PF_X, lsl #dst_bpp_shift]
|
||||
vmull.u8 q6, d24, d8
|
||||
PF pld, [PF_MASK, PF_X, lsl #mask_bpp_shift]
|
||||
vmull.u8 q7, d24, d9
|
||||
PF subge PF_X, PF_X, ORIG_W
|
||||
PF subge, PF_X, PF_X, ORIG_W
|
||||
vmull.u8 q8, d24, d10
|
||||
PF subges PF_CTL, PF_CTL, #0x10
|
||||
PF subsge, PF_CTL, PF_CTL, #0x10
|
||||
vmull.u8 q9, d24, d11
|
||||
PF ldrgeb DUMMY, [PF_DST, DST_STRIDE, lsl #dst_bpp_shift]!
|
||||
PF ldrbge, DUMMY, [PF_DST, DST_STRIDE, lsl #dst_bpp_shift]!
|
||||
vqadd.u8 q14, q0, q14
|
||||
PF ldrgeb DUMMY, [PF_MASK, MASK_STRIDE, lsl #mask_bpp_shift]!
|
||||
PF ldrbge, DUMMY, [PF_MASK, MASK_STRIDE, lsl #mask_bpp_shift]!
|
||||
vqadd.u8 q15, q1, q15
|
||||
vrshr.u16 q10, q6, #8
|
||||
vrshr.u16 q11, q7, #8
|
||||
@ -2425,21 +2427,21 @@ generate_composite_function \
|
||||
vrshr.u16 q13, q10, #8
|
||||
fetch_src_pixblock
|
||||
vraddhn.u16 d30, q11, q8
|
||||
PF add PF_X, PF_X, #8
|
||||
PF tst PF_CTL, #0xF
|
||||
PF addne PF_X, PF_X, #8
|
||||
PF subne PF_CTL, PF_CTL, #1
|
||||
PF add, PF_X, PF_X, #8
|
||||
PF tst, PF_CTL, #0xF
|
||||
PF addne, PF_X, PF_X, #8
|
||||
PF subne, PF_CTL, PF_CTL, #1
|
||||
vraddhn.u16 d29, q12, q9
|
||||
vraddhn.u16 d28, q13, q10
|
||||
vmull.u8 q8, d3, d0
|
||||
vmull.u8 q9, d3, d1
|
||||
vmull.u8 q10, d3, d2
|
||||
vst4.8 {d28, d29, d30, d31}, [DST_W, :128]!
|
||||
PF cmp PF_X, ORIG_W
|
||||
PF cmp, PF_X, ORIG_W
|
||||
PF pld, [PF_SRC, PF_X, lsl #src_bpp_shift]
|
||||
PF subge PF_X, PF_X, ORIG_W
|
||||
PF subges PF_CTL, PF_CTL, #0x10
|
||||
PF ldrgeb DUMMY, [PF_SRC, SRC_STRIDE, lsl #src_bpp_shift]!
|
||||
PF subge, PF_X, PF_X, ORIG_W
|
||||
PF subsge, PF_CTL, PF_CTL, #0x10
|
||||
PF ldrbge, DUMMY, [PF_SRC, SRC_STRIDE, lsl #src_bpp_shift]!
|
||||
.endm
|
||||
|
||||
generate_composite_function \
|
||||
@ -2482,21 +2484,21 @@ generate_composite_function \
|
||||
vrshr.u16 q13, q10, #8
|
||||
fetch_src_pixblock
|
||||
vraddhn.u16 d28, q11, q8
|
||||
PF add PF_X, PF_X, #8
|
||||
PF tst PF_CTL, #0xF
|
||||
PF addne PF_X, PF_X, #8
|
||||
PF subne PF_CTL, PF_CTL, #1
|
||||
PF add, PF_X, PF_X, #8
|
||||
PF tst, PF_CTL, #0xF
|
||||
PF addne, PF_X, PF_X, #8
|
||||
PF subne, PF_CTL, PF_CTL, #1
|
||||
vraddhn.u16 d29, q12, q9
|
||||
vraddhn.u16 d30, q13, q10
|
||||
vmull.u8 q8, d3, d0
|
||||
vmull.u8 q9, d3, d1
|
||||
vmull.u8 q10, d3, d2
|
||||
vst4.8 {d28, d29, d30, d31}, [DST_W, :128]!
|
||||
PF cmp PF_X, ORIG_W
|
||||
PF cmp, PF_X, ORIG_W
|
||||
PF pld, [PF_SRC, PF_X, lsl #src_bpp_shift]
|
||||
PF subge PF_X, PF_X, ORIG_W
|
||||
PF subges PF_CTL, PF_CTL, #0x10
|
||||
PF ldrgeb DUMMY, [PF_SRC, SRC_STRIDE, lsl #src_bpp_shift]!
|
||||
PF subge, PF_X, PF_X, ORIG_W
|
||||
PF subsge, PF_CTL, PF_CTL, #0x10
|
||||
PF ldrbge, DUMMY, [PF_SRC, SRC_STRIDE, lsl #src_bpp_shift]!
|
||||
.endm
|
||||
|
||||
generate_composite_function \
|
||||
@ -2841,28 +2843,28 @@ generate_composite_function_nearest_scanline \
|
||||
mov TMP1, X, asr #16
|
||||
add X, X, UX
|
||||
add TMP1, TOP, TMP1, asl #2
|
||||
vld1.32 {reg1}, [TMP1], STRIDE
|
||||
vld1.32 {reg2}, [TMP1]
|
||||
vld1.32 {\reg1}, [TMP1], STRIDE
|
||||
vld1.32 {\reg2}, [TMP1]
|
||||
.endm
|
||||
|
||||
.macro bilinear_load_0565 reg1, reg2, tmp
|
||||
mov TMP1, X, asr #16
|
||||
add X, X, UX
|
||||
add TMP1, TOP, TMP1, asl #1
|
||||
vld1.32 {reg2[0]}, [TMP1], STRIDE
|
||||
vld1.32 {reg2[1]}, [TMP1]
|
||||
convert_four_0565_to_x888_packed reg2, reg1, reg2, tmp
|
||||
vld1.32 {\reg2[0]}, [TMP1], STRIDE
|
||||
vld1.32 {\reg2[1]}, [TMP1]
|
||||
convert_four_0565_to_x888_packed \reg2, \reg1, \reg2, \tmp
|
||||
.endm
|
||||
|
||||
.macro bilinear_load_and_vertical_interpolate_two_8888 \
|
||||
acc1, acc2, reg1, reg2, reg3, reg4, tmp1, tmp2
|
||||
|
||||
bilinear_load_8888 reg1, reg2, tmp1
|
||||
vmull.u8 acc1, reg1, d28
|
||||
vmlal.u8 acc1, reg2, d29
|
||||
bilinear_load_8888 reg3, reg4, tmp2
|
||||
vmull.u8 acc2, reg3, d28
|
||||
vmlal.u8 acc2, reg4, d29
|
||||
bilinear_load_8888 \reg1, \reg2, \tmp1
|
||||
vmull.u8 \acc1, \reg1, d28
|
||||
vmlal.u8 \acc1, \reg2, d29
|
||||
bilinear_load_8888 \reg3, \reg4, \tmp2
|
||||
vmull.u8 \acc2, \reg3, d28
|
||||
vmlal.u8 \acc2, \reg4, d29
|
||||
.endm
|
||||
|
||||
.macro bilinear_load_and_vertical_interpolate_four_8888 \
|
||||
@ -2870,9 +2872,9 @@ generate_composite_function_nearest_scanline \
|
||||
yacc1, yacc2, yreg1, yreg2, yreg3, yreg4, yacc2lo, yacc2hi
|
||||
|
||||
bilinear_load_and_vertical_interpolate_two_8888 \
|
||||
xacc1, xacc2, xreg1, xreg2, xreg3, xreg4, xacc2lo, xacc2hi
|
||||
\xacc1, \xacc2, \xreg1, \xreg2, \xreg3, \xreg4, \xacc2lo, \xacc2hi
|
||||
bilinear_load_and_vertical_interpolate_two_8888 \
|
||||
yacc1, yacc2, yreg1, yreg2, yreg3, yreg4, yacc2lo, yacc2hi
|
||||
\yacc1, \yacc2, \yreg1, \yreg2, \yreg3, \yreg4, \yacc2lo, \yacc2hi
|
||||
.endm
|
||||
|
||||
.macro bilinear_load_and_vertical_interpolate_two_0565 \
|
||||
@ -2884,19 +2886,19 @@ generate_composite_function_nearest_scanline \
|
||||
mov TMP2, X, asr #16
|
||||
add X, X, UX
|
||||
add TMP2, TOP, TMP2, asl #1
|
||||
vld1.32 {acc2lo[0]}, [TMP1], STRIDE
|
||||
vld1.32 {acc2hi[0]}, [TMP2], STRIDE
|
||||
vld1.32 {acc2lo[1]}, [TMP1]
|
||||
vld1.32 {acc2hi[1]}, [TMP2]
|
||||
convert_0565_to_x888 acc2, reg3, reg2, reg1
|
||||
vzip.u8 reg1, reg3
|
||||
vzip.u8 reg2, reg4
|
||||
vzip.u8 reg3, reg4
|
||||
vzip.u8 reg1, reg2
|
||||
vmull.u8 acc1, reg1, d28
|
||||
vmlal.u8 acc1, reg2, d29
|
||||
vmull.u8 acc2, reg3, d28
|
||||
vmlal.u8 acc2, reg4, d29
|
||||
vld1.32 {\acc2lo[0]}, [TMP1], STRIDE
|
||||
vld1.32 {\acc2hi[0]}, [TMP2], STRIDE
|
||||
vld1.32 {\acc2lo[1]}, [TMP1]
|
||||
vld1.32 {\acc2hi[1]}, [TMP2]
|
||||
convert_0565_to_x888 \acc2, \reg3, \reg2, \reg1
|
||||
vzip.u8 \reg1, \reg3
|
||||
vzip.u8 \reg2, \reg4
|
||||
vzip.u8 \reg3, \reg4
|
||||
vzip.u8 \reg1, \reg2
|
||||
vmull.u8 \acc1, \reg1, d28
|
||||
vmlal.u8 \acc1, \reg2, d29
|
||||
vmull.u8 \acc2, \reg3, d28
|
||||
vmlal.u8 \acc2, \reg4, d29
|
||||
.endm
|
||||
|
||||
.macro bilinear_load_and_vertical_interpolate_four_0565 \
|
||||
@ -2909,49 +2911,49 @@ generate_composite_function_nearest_scanline \
|
||||
mov TMP2, X, asr #16
|
||||
add X, X, UX
|
||||
add TMP2, TOP, TMP2, asl #1
|
||||
vld1.32 {xacc2lo[0]}, [TMP1], STRIDE
|
||||
vld1.32 {xacc2hi[0]}, [TMP2], STRIDE
|
||||
vld1.32 {xacc2lo[1]}, [TMP1]
|
||||
vld1.32 {xacc2hi[1]}, [TMP2]
|
||||
convert_0565_to_x888 xacc2, xreg3, xreg2, xreg1
|
||||
vld1.32 {\xacc2lo[0]}, [TMP1], STRIDE
|
||||
vld1.32 {\xacc2hi[0]}, [TMP2], STRIDE
|
||||
vld1.32 {\xacc2lo[1]}, [TMP1]
|
||||
vld1.32 {\xacc2hi[1]}, [TMP2]
|
||||
convert_0565_to_x888 \xacc2, \xreg3, \xreg2, \xreg1
|
||||
mov TMP1, X, asr #16
|
||||
add X, X, UX
|
||||
add TMP1, TOP, TMP1, asl #1
|
||||
mov TMP2, X, asr #16
|
||||
add X, X, UX
|
||||
add TMP2, TOP, TMP2, asl #1
|
||||
vld1.32 {yacc2lo[0]}, [TMP1], STRIDE
|
||||
vzip.u8 xreg1, xreg3
|
||||
vld1.32 {yacc2hi[0]}, [TMP2], STRIDE
|
||||
vzip.u8 xreg2, xreg4
|
||||
vld1.32 {yacc2lo[1]}, [TMP1]
|
||||
vzip.u8 xreg3, xreg4
|
||||
vld1.32 {yacc2hi[1]}, [TMP2]
|
||||
vzip.u8 xreg1, xreg2
|
||||
convert_0565_to_x888 yacc2, yreg3, yreg2, yreg1
|
||||
vmull.u8 xacc1, xreg1, d28
|
||||
vzip.u8 yreg1, yreg3
|
||||
vmlal.u8 xacc1, xreg2, d29
|
||||
vzip.u8 yreg2, yreg4
|
||||
vmull.u8 xacc2, xreg3, d28
|
||||
vzip.u8 yreg3, yreg4
|
||||
vmlal.u8 xacc2, xreg4, d29
|
||||
vzip.u8 yreg1, yreg2
|
||||
vmull.u8 yacc1, yreg1, d28
|
||||
vmlal.u8 yacc1, yreg2, d29
|
||||
vmull.u8 yacc2, yreg3, d28
|
||||
vmlal.u8 yacc2, yreg4, d29
|
||||
vld1.32 {\yacc2lo[0]}, [TMP1], STRIDE
|
||||
vzip.u8 \xreg1, \xreg3
|
||||
vld1.32 {\yacc2hi[0]}, [TMP2], STRIDE
|
||||
vzip.u8 \xreg2, \xreg4
|
||||
vld1.32 {\yacc2lo[1]}, [TMP1]
|
||||
vzip.u8 \xreg3, \xreg4
|
||||
vld1.32 {\yacc2hi[1]}, [TMP2]
|
||||
vzip.u8 \xreg1, \xreg2
|
||||
convert_0565_to_x888 \yacc2, \yreg3, \yreg2, \yreg1
|
||||
vmull.u8 \xacc1, \xreg1, d28
|
||||
vzip.u8 \yreg1, \yreg3
|
||||
vmlal.u8 \xacc1, \xreg2, d29
|
||||
vzip.u8 \yreg2, \yreg4
|
||||
vmull.u8 \xacc2, \xreg3, d28
|
||||
vzip.u8 \yreg3, \yreg4
|
||||
vmlal.u8 \xacc2, \xreg4, d29
|
||||
vzip.u8 \yreg1, \yreg2
|
||||
vmull.u8 \yacc1, \yreg1, d28
|
||||
vmlal.u8 \yacc1, \yreg2, d29
|
||||
vmull.u8 \yacc2, \yreg3, d28
|
||||
vmlal.u8 \yacc2, \yreg4, d29
|
||||
.endm
|
||||
|
||||
.macro bilinear_store_8888 numpix, tmp1, tmp2
|
||||
.if numpix == 4
|
||||
.if \numpix == 4
|
||||
vst1.32 {d0, d1}, [OUT, :128]!
|
||||
.elseif numpix == 2
|
||||
.elseif \numpix == 2
|
||||
vst1.32 {d0}, [OUT, :64]!
|
||||
.elseif numpix == 1
|
||||
.elseif \numpix == 1
|
||||
vst1.32 {d0[0]}, [OUT, :32]!
|
||||
.else
|
||||
.error bilinear_store_8888 numpix is unsupported
|
||||
.error bilinear_store_8888 \numpix is unsupported
|
||||
.endif
|
||||
.endm
|
||||
|
||||
@ -2960,20 +2962,20 @@ generate_composite_function_nearest_scanline \
|
||||
vuzp.u8 d2, d3
|
||||
vuzp.u8 d1, d3
|
||||
vuzp.u8 d0, d2
|
||||
convert_8888_to_0565 d2, d1, d0, q1, tmp1, tmp2
|
||||
.if numpix == 4
|
||||
convert_8888_to_0565 d2, d1, d0, q1, \tmp1, \tmp2
|
||||
.if \numpix == 4
|
||||
vst1.16 {d2}, [OUT, :64]!
|
||||
.elseif numpix == 2
|
||||
.elseif \numpix == 2
|
||||
vst1.32 {d2[0]}, [OUT, :32]!
|
||||
.elseif numpix == 1
|
||||
.elseif \numpix == 1
|
||||
vst1.16 {d2[0]}, [OUT, :16]!
|
||||
.else
|
||||
.error bilinear_store_0565 numpix is unsupported
|
||||
.error bilinear_store_0565 \numpix is unsupported
|
||||
.endif
|
||||
.endm
|
||||
|
||||
.macro bilinear_interpolate_last_pixel src_fmt, dst_fmt
|
||||
bilinear_load_&src_fmt d0, d1, d2
|
||||
bilinear_load_\()\src_fmt d0, d1, d2
|
||||
vmull.u8 q1, d0, d28
|
||||
vmlal.u8 q1, d1, d29
|
||||
/* 5 cycles bubble */
|
||||
@ -2985,11 +2987,11 @@ generate_composite_function_nearest_scanline \
|
||||
/* 3 cycles bubble */
|
||||
vmovn.u16 d0, q0
|
||||
/* 1 cycle bubble */
|
||||
bilinear_store_&dst_fmt 1, q2, q3
|
||||
bilinear_store_\()\dst_fmt 1, q2, q3
|
||||
.endm
|
||||
|
||||
.macro bilinear_interpolate_two_pixels src_fmt, dst_fmt
|
||||
bilinear_load_and_vertical_interpolate_two_&src_fmt \
|
||||
bilinear_load_and_vertical_interpolate_two_\()\src_fmt \
|
||||
q1, q11, d0, d1, d20, d21, d22, d23
|
||||
vshll.u16 q0, d2, #BILINEAR_INTERPOLATION_BITS
|
||||
vmlsl.u16 q0, d2, d30
|
||||
@ -3002,11 +3004,11 @@ generate_composite_function_nearest_scanline \
|
||||
vshr.u16 q15, q12, #(16 - BILINEAR_INTERPOLATION_BITS)
|
||||
vadd.u16 q12, q12, q13
|
||||
vmovn.u16 d0, q0
|
||||
bilinear_store_&dst_fmt 2, q2, q3
|
||||
bilinear_store_\()\dst_fmt 2, q2, q3
|
||||
.endm
|
||||
|
||||
.macro bilinear_interpolate_four_pixels src_fmt, dst_fmt
|
||||
bilinear_load_and_vertical_interpolate_four_&src_fmt \
|
||||
bilinear_load_and_vertical_interpolate_four_\()\src_fmt \
|
||||
q1, q11, d0, d1, d20, d21, d22, d23 \
|
||||
q3, q9, d4, d5, d16, d17, d18, d19
|
||||
pld [TMP1, PF_OFFS]
|
||||
@ -3034,54 +3036,54 @@ generate_composite_function_nearest_scanline \
|
||||
vmovn.u16 d0, q0
|
||||
vmovn.u16 d1, q2
|
||||
vadd.u16 q12, q12, q13
|
||||
bilinear_store_&dst_fmt 4, q2, q3
|
||||
bilinear_store_\()\dst_fmt 4, q2, q3
|
||||
.endm
|
||||
|
||||
.macro bilinear_interpolate_four_pixels_head src_fmt, dst_fmt
|
||||
.ifdef have_bilinear_interpolate_four_pixels_&src_fmt&_&dst_fmt
|
||||
bilinear_interpolate_four_pixels_&src_fmt&_&dst_fmt&_head
|
||||
.ifdef have_bilinear_interpolate_four_pixels_\()\src_fmt\()_\()\dst_fmt
|
||||
bilinear_interpolate_four_pixels_\()\src_fmt\()_\()\dst_fmt\()_head
|
||||
.else
|
||||
bilinear_interpolate_four_pixels src_fmt, dst_fmt
|
||||
bilinear_interpolate_four_pixels \src_fmt, \dst_fmt
|
||||
.endif
|
||||
.endm
|
||||
|
||||
.macro bilinear_interpolate_four_pixels_tail src_fmt, dst_fmt
|
||||
.ifdef have_bilinear_interpolate_four_pixels_&src_fmt&_&dst_fmt
|
||||
bilinear_interpolate_four_pixels_&src_fmt&_&dst_fmt&_tail
|
||||
.ifdef have_bilinear_interpolate_four_pixels_\()\src_fmt\()_\()\dst_fmt
|
||||
bilinear_interpolate_four_pixels_\()\src_fmt\()_\()\dst_fmt\()_tail
|
||||
.endif
|
||||
.endm
|
||||
|
||||
.macro bilinear_interpolate_four_pixels_tail_head src_fmt, dst_fmt
|
||||
.ifdef have_bilinear_interpolate_four_pixels_&src_fmt&_&dst_fmt
|
||||
bilinear_interpolate_four_pixels_&src_fmt&_&dst_fmt&_tail_head
|
||||
.ifdef have_bilinear_interpolate_four_pixels_\()\src_fmt\()_\()\dst_fmt
|
||||
bilinear_interpolate_four_pixels_\()\src_fmt\()_\()\dst_fmt\()_tail_head
|
||||
.else
|
||||
bilinear_interpolate_four_pixels src_fmt, dst_fmt
|
||||
bilinear_interpolate_four_pixels \src_fmt, \dst_fmt
|
||||
.endif
|
||||
.endm
|
||||
|
||||
.macro bilinear_interpolate_eight_pixels_head src_fmt, dst_fmt
|
||||
.ifdef have_bilinear_interpolate_eight_pixels_&src_fmt&_&dst_fmt
|
||||
bilinear_interpolate_eight_pixels_&src_fmt&_&dst_fmt&_head
|
||||
.ifdef have_bilinear_interpolate_eight_pixels_\()\src_fmt\()_\()\dst_fmt
|
||||
bilinear_interpolate_eight_pixels_\()\src_fmt\()_\()\dst_fmt\()_head
|
||||
.else
|
||||
bilinear_interpolate_four_pixels_head src_fmt, dst_fmt
|
||||
bilinear_interpolate_four_pixels_tail_head src_fmt, dst_fmt
|
||||
bilinear_interpolate_four_pixels_head \src_fmt, \dst_fmt
|
||||
bilinear_interpolate_four_pixels_tail_head \src_fmt, \dst_fmt
|
||||
.endif
|
||||
.endm
|
||||
|
||||
.macro bilinear_interpolate_eight_pixels_tail src_fmt, dst_fmt
|
||||
.ifdef have_bilinear_interpolate_eight_pixels_&src_fmt&_&dst_fmt
|
||||
bilinear_interpolate_eight_pixels_&src_fmt&_&dst_fmt&_tail
|
||||
.ifdef have_bilinear_interpolate_eight_pixels_\()\src_fmt\()_\()\dst_fmt
|
||||
bilinear_interpolate_eight_pixels_\()\src_fmt\()_\()\dst_fmt\()_tail
|
||||
.else
|
||||
bilinear_interpolate_four_pixels_tail src_fmt, dst_fmt
|
||||
bilinear_interpolate_four_pixels_tail \src_fmt, \dst_fmt
|
||||
.endif
|
||||
.endm
|
||||
|
||||
.macro bilinear_interpolate_eight_pixels_tail_head src_fmt, dst_fmt
|
||||
.ifdef have_bilinear_interpolate_eight_pixels_&src_fmt&_&dst_fmt
|
||||
bilinear_interpolate_eight_pixels_&src_fmt&_&dst_fmt&_tail_head
|
||||
.ifdef have_bilinear_interpolate_eight_pixels_\()\src_fmt\()_\()\dst_fmt
|
||||
bilinear_interpolate_eight_pixels_\()\src_fmt\()_\()\dst_fmt\()_tail_head
|
||||
.else
|
||||
bilinear_interpolate_four_pixels_tail_head src_fmt, dst_fmt
|
||||
bilinear_interpolate_four_pixels_tail_head src_fmt, dst_fmt
|
||||
bilinear_interpolate_four_pixels_tail_head \src_fmt, \dst_fmt
|
||||
bilinear_interpolate_four_pixels_tail_head \src_fmt, \dst_fmt
|
||||
.endif
|
||||
.endm
|
||||
|
||||
@ -3106,7 +3108,7 @@ generate_composite_function_nearest_scanline \
|
||||
src_bpp_shift, dst_bpp_shift, \
|
||||
prefetch_distance, flags
|
||||
|
||||
pixman_asm_function fname
|
||||
pixman_asm_function \fname
|
||||
OUT .req r0
|
||||
TOP .req r1
|
||||
BOTTOM .req r2
|
||||
@ -3124,11 +3126,11 @@ pixman_asm_function fname
|
||||
|
||||
mov ip, sp
|
||||
push {r4, r5, r6, r7, r8, r9}
|
||||
mov PF_OFFS, #prefetch_distance
|
||||
mov PF_OFFS, #\prefetch_distance
|
||||
ldmia ip, {WB, X, UX, WIDTH}
|
||||
mul PF_OFFS, PF_OFFS, UX
|
||||
|
||||
.if ((flags) & BILINEAR_FLAG_USE_ALL_NEON_REGS) != 0
|
||||
.if ((\flags) & BILINEAR_FLAG_USE_ALL_NEON_REGS) != 0
|
||||
vpush {d8-d15}
|
||||
.endif
|
||||
|
||||
@ -3147,11 +3149,11 @@ pixman_asm_function fname
|
||||
/* ensure good destination alignment */
|
||||
cmp WIDTH, #1
|
||||
blt 0f
|
||||
tst OUT, #(1 << dst_bpp_shift)
|
||||
tst OUT, #(1 << \dst_bpp_shift)
|
||||
beq 0f
|
||||
vshr.u16 q15, q12, #(16 - BILINEAR_INTERPOLATION_BITS)
|
||||
vadd.u16 q12, q12, q13
|
||||
bilinear_interpolate_last_pixel src_fmt, dst_fmt
|
||||
bilinear_interpolate_last_pixel \src_fmt, \dst_fmt
|
||||
sub WIDTH, WIDTH, #1
|
||||
0:
|
||||
vadd.u16 q13, q13, q13
|
||||
@ -3160,64 +3162,64 @@ pixman_asm_function fname
|
||||
|
||||
cmp WIDTH, #2
|
||||
blt 0f
|
||||
tst OUT, #(1 << (dst_bpp_shift + 1))
|
||||
tst OUT, #(1 << (\dst_bpp_shift + 1))
|
||||
beq 0f
|
||||
bilinear_interpolate_two_pixels src_fmt, dst_fmt
|
||||
bilinear_interpolate_two_pixels \src_fmt, \dst_fmt
|
||||
sub WIDTH, WIDTH, #2
|
||||
0:
|
||||
.if ((flags) & BILINEAR_FLAG_UNROLL_8) != 0
|
||||
.if ((\flags) & BILINEAR_FLAG_UNROLL_8) != 0
|
||||
/*********** 8 pixels per iteration *****************/
|
||||
cmp WIDTH, #4
|
||||
blt 0f
|
||||
tst OUT, #(1 << (dst_bpp_shift + 2))
|
||||
tst OUT, #(1 << (\dst_bpp_shift + 2))
|
||||
beq 0f
|
||||
bilinear_interpolate_four_pixels src_fmt, dst_fmt
|
||||
bilinear_interpolate_four_pixels \src_fmt, \dst_fmt
|
||||
sub WIDTH, WIDTH, #4
|
||||
0:
|
||||
subs WIDTH, WIDTH, #8
|
||||
blt 1f
|
||||
mov PF_OFFS, PF_OFFS, asr #(16 - src_bpp_shift)
|
||||
bilinear_interpolate_eight_pixels_head src_fmt, dst_fmt
|
||||
bilinear_interpolate_eight_pixels_head \src_fmt, \dst_fmt
|
||||
subs WIDTH, WIDTH, #8
|
||||
blt 5f
|
||||
0:
|
||||
bilinear_interpolate_eight_pixels_tail_head src_fmt, dst_fmt
|
||||
bilinear_interpolate_eight_pixels_tail_head \src_fmt, \dst_fmt
|
||||
subs WIDTH, WIDTH, #8
|
||||
bge 0b
|
||||
5:
|
||||
bilinear_interpolate_eight_pixels_tail src_fmt, dst_fmt
|
||||
bilinear_interpolate_eight_pixels_tail \src_fmt, \dst_fmt
|
||||
1:
|
||||
tst WIDTH, #4
|
||||
beq 2f
|
||||
bilinear_interpolate_four_pixels src_fmt, dst_fmt
|
||||
bilinear_interpolate_four_pixels \src_fmt, \dst_fmt
|
||||
2:
|
||||
.else
|
||||
/*********** 4 pixels per iteration *****************/
|
||||
subs WIDTH, WIDTH, #4
|
||||
blt 1f
|
||||
mov PF_OFFS, PF_OFFS, asr #(16 - src_bpp_shift)
|
||||
bilinear_interpolate_four_pixels_head src_fmt, dst_fmt
|
||||
bilinear_interpolate_four_pixels_head \src_fmt, \dst_fmt
|
||||
subs WIDTH, WIDTH, #4
|
||||
blt 5f
|
||||
0:
|
||||
bilinear_interpolate_four_pixels_tail_head src_fmt, dst_fmt
|
||||
bilinear_interpolate_four_pixels_tail_head \src_fmt, \dst_fmt
|
||||
subs WIDTH, WIDTH, #4
|
||||
bge 0b
|
||||
5:
|
||||
bilinear_interpolate_four_pixels_tail src_fmt, dst_fmt
|
||||
bilinear_interpolate_four_pixels_tail \src_fmt, \dst_fmt
|
||||
1:
|
||||
/****************************************************/
|
||||
.endif
|
||||
/* handle the remaining trailing pixels */
|
||||
tst WIDTH, #2
|
||||
beq 2f
|
||||
bilinear_interpolate_two_pixels src_fmt, dst_fmt
|
||||
bilinear_interpolate_two_pixels \src_fmt, \dst_fmt
|
||||
2:
|
||||
tst WIDTH, #1
|
||||
beq 3f
|
||||
bilinear_interpolate_last_pixel src_fmt, dst_fmt
|
||||
bilinear_interpolate_last_pixel \src_fmt, \dst_fmt
|
||||
3:
|
||||
.if ((flags) & BILINEAR_FLAG_USE_ALL_NEON_REGS) != 0
|
||||
.if ((\flags) & BILINEAR_FLAG_USE_ALL_NEON_REGS) != 0
|
||||
vpop {d8-d15}
|
||||
.endif
|
||||
pop {r4, r5, r6, r7, r8, r9}
|
||||
@ -3236,7 +3238,7 @@ pixman_asm_function fname
|
||||
.unreq TMP3
|
||||
.unreq TMP4
|
||||
.unreq STRIDE
|
||||
.endfunc
|
||||
pixman_end_asm_function
|
||||
|
||||
.endm
|
||||
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user