Bug 1661117 - Switch to Mesa 20 r=gw,kats

updates to https://github.com/servo/osmesa-src PRs: 40, 41, 42

Differential Revision: https://phabricator.services.mozilla.com/D88448
This commit is contained in:
Dzmitry Malyshau 2020-09-11 20:16:56 +00:00
Родитель d5b3bf63f9
Коммит b343cb50cf
7 изменённых файлов: 27 добавлений и 12 удалений

8
gfx/wr/Cargo.lock сгенерированный
Просмотреть файл

@ -1109,8 +1109,8 @@ dependencies = [
[[package]]
name = "osmesa-src"
version = "0.1.1"
source = "git+https://github.com/servo/osmesa-src#1a9519c3675ebc1117cbb18ed6db420b5941cb8b"
version = "0.2.0"
source = "git+https://github.com/servo/osmesa-src#12f7370163712ea8706499b3128b5c6bab1d8d60"
[[package]]
name = "osmesa-sys"
@ -1973,7 +1973,7 @@ dependencies = [
"image 0.23.3 (registry+https://github.com/rust-lang/crates.io-index)",
"log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)",
"mozangle 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)",
"osmesa-src 0.1.1 (git+https://github.com/servo/osmesa-src)",
"osmesa-src 0.2.0 (git+https://github.com/servo/osmesa-src)",
"osmesa-sys 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
"semver 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)",
"serde 1.0.106 (registry+https://github.com/rust-lang/crates.io-index)",
@ -2174,7 +2174,7 @@ dependencies = [
"checksum objc 0.2.7 (registry+https://github.com/rust-lang/crates.io-index)" = "915b1b472bc21c53464d6c8461c9d3af805ba1ef837e1cac254428f4a77177b1"
"checksum opaque-debug 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "2839e79665f131bdb5782e51f2c6c9599c133c6098982a54c794358bf432529c"
"checksum ordered-float 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "18869315e81473c951eb56ad5558bbc56978562d3ecfb87abb7a1e944cea4518"
"checksum osmesa-src 0.1.1 (git+https://github.com/servo/osmesa-src)" = "<none>"
"checksum osmesa-src 0.2.0 (git+https://github.com/servo/osmesa-src)" = "<none>"
"checksum osmesa-sys 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "88cfece6e95d2e717e0872a7f53a8684712ad13822a7979bc760b9c77ec0013b"
"checksum parking_lot 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)" = "f842b1982eb6c2fe34036a4fbfb06dd185a3f5c8edfaacdf7d1ea10b07de6252"
"checksum parking_lot_core 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)" = "b876b1b9e7ac6e1a74a6da34d25c42e17e8862aa409cbbbdcfc8d86c6f3bc62b"

Просмотреть файл

@ -14,15 +14,18 @@ test "$(whoami)" == 'root'
# Install stuff we need
apt-get -y update
apt-get install -y \
bison \
bzip2 \
cmake \
curl \
flex \
gcc \
git \
g++ \
libfontconfig1-dev \
libgl1-mesa-dev \
libx11-dev \
ninja-build \
openjdk-8-jdk \
pkg-config \
python \
@ -31,6 +34,8 @@ apt-get install -y \
python-setuptools \
python-voluptuous \
python-yaml \
python3-pip \
python3-mako \
software-properties-common
# Other stuff we need

Просмотреть файл

@ -19,7 +19,7 @@ time = "0.1"
chrono = "0.2"
crossbeam = "0.2"
osmesa-sys = { version = "0.1.2", optional = true }
osmesa-src = { git = "https://github.com/servo/osmesa-src", optional = true }
osmesa-src = { version = "0.2", git = "https://github.com/servo/osmesa-src", optional = true }
webrender = { path = "../webrender", features = ["capture", "replay", "debugger", "png", "profiler", "no_static_freetype", "leak_checks"] }
winit = "0.19"
serde = { version = "1.0", features = ["derive"] }

Просмотреть файл

@ -95,6 +95,7 @@ def optimized_build():
def set_osmesa_env(bin_path):
# TODO: switch to `llvmpipe` for faster tests
"""Set proper LD_LIBRARY_PATH and DRIVE for software rendering on Linux and OSX"""
if is_linux():
osmesa_path = path.join(find_dep_path_newest('osmesa-src', bin_path), "out", "lib", "gallium")
@ -103,9 +104,9 @@ def set_osmesa_env(bin_path):
os.environ["GALLIUM_DRIVER"] = "softpipe"
elif is_macos():
osmesa_path = path.join(find_dep_path_newest('osmesa-src', bin_path),
"out", "src", "gallium", "targets", "osmesa", ".libs")
"out", "mesa", "src", "gallium", "targets", "osmesa")
glapi_path = path.join(find_dep_path_newest('osmesa-src', bin_path),
"out", "src", "mapi", "shared-glapi", ".libs")
"out", "mesa", "src", "mapi", "shared-glapi")
os.environ["DYLD_LIBRARY_PATH"] = osmesa_path + ":" + glapi_path
os.environ["GALLIUM_DRIVER"] = "softpipe"

Просмотреть файл

@ -38,7 +38,7 @@ popd
# reason we need to add clang/bin to the path here, we should be able to
# instead set LLVM_CONFIG=no to disable llvmpipe, but that might impact
# other parts of the build.
export PATH="${MOZ_FETCHES_DIR}/rustc/bin:${MOZ_FETCHES_DIR}/cctools/bin:${MOZ_FETCHES_DIR}/llvm-dsymutil/bin:${PATH}"
export PATH="${MOZ_FETCHES_DIR}/rustc/bin:${MOZ_FETCHES_DIR}/cctools/bin:${MOZ_FETCHES_DIR}/llvm-dsymutil/bin:${MOZ_FETCHES_DIR}/wrench-deps/meson/bin:${PATH}"
# The x86_64-darwin11-ld linker from cctools requires libraries provided
# by clang, so we need to set LD_LIBRARY_PATH for that to work.

Просмотреть файл

@ -7,6 +7,7 @@ set -x -e -v
# these dependencies on every test job that uses `wrench`.
UPLOAD_DIR=$HOME/artifacts
MESON_VER=0.55.1
cd $GECKO_PATH
export PATH=$PATH:$MOZ_FETCHES_DIR/rustc/bin:$HOME/.cargo/bin
@ -20,7 +21,14 @@ mkdir wrench-deps/cargo-apk
# https://github.com/rust-windowing/android-rs-glue/pull/223, we need to use
# an unpublished version.
cargo install --path $MOZ_FETCHES_DIR/android-rs-glue/cargo-apk --root wrench-deps/cargo-apk cargo-apk
tar caf wrench-deps.tar.bz2 wrench-deps
curl -L https://github.com/mesonbuild/meson/releases/download/$MESON_VER/meson-${MESON_VER}.tar.gz -o meson.tar.gz
tar -xf meson.tar.gz
mv meson-${MESON_VER} wrench-deps/meson
pushd wrench-deps/meson
mkdir bin
ln -s ../meson.py bin/meson
popd
mkdir -p $UPLOAD_DIR
mv wrench-deps.tar.bz2 $UPLOAD_DIR/
tar caf $UPLOAD_DIR/wrench-deps.tar.bz2 wrench-deps

Просмотреть файл

@ -39,12 +39,13 @@ pushd "${GECKO_PATH}/gfx/wr/wrench"
cargo build --release -vv --frozen --target=${TARGET_TRIPLE} --features headless
# Package up the wrench binary and some libraries that we will need
cd "../target/${TARGET_TRIPLE}"
mkdir wrench-macos-headless
mv release wrench-macos-headless/
tar cjf wrench-macos-headless.tar.bz2 \
wrench-macos-headless/release/wrench \
wrench-macos-headless/release/build/osmesa-src*/out/src/gallium/targets/osmesa/.libs \
wrench-macos-headless/release/build/osmesa-src*/out/src/mapi/shared-glapi/.libs
wrench-macos-headless/release/build/osmesa-src*/out/mesa/src/gallium/targets/osmesa \
wrench-macos-headless/release/build/osmesa-src*/out/mesa/src/mapi/shared-glapi
mv wrench-macos-headless.tar.bz2 "${UPLOAD_DIR}"
# Clean the build
cd "${GECKO_PATH}/gfx/wr"