Skip to content

Commit

Permalink
Bug 1661117 - Switch to Mesa 20 r=gw,kats
Browse files Browse the repository at this point in the history
  • Loading branch information
kvark committed Sep 15, 2020
1 parent ba73734 commit d027c5b
Show file tree
Hide file tree
Showing 8 changed files with 32 additions and 19 deletions.
8 changes: 4 additions & 4 deletions gfx/wr/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions gfx/wr/ci-scripts/docker-image/setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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 \
Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion gfx/wr/wrench/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"] }
Expand Down
13 changes: 6 additions & 7 deletions gfx/wr/wrench/script/headless.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,18 +96,17 @@ def optimized_build():

def set_osmesa_env(bin_path):
"""Set proper LD_LIBRARY_PATH and DRIVE for software rendering on Linux and OSX"""
base = find_dep_path_newest('osmesa-src', bin_path)
osmesa_path = path.join(base, "out", "mesa", "src", "gallium", "targets", "osmesa")
# TODO: switch to `llvmpipe` for faster tests
os.environ["GALLIUM_DRIVER"] = "softpipe"
if is_linux():
osmesa_path = path.join(find_dep_path_newest('osmesa-src', bin_path), "out", "lib", "gallium")
print(osmesa_path)
os.environ["LD_LIBRARY_PATH"] = osmesa_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")
glapi_path = path.join(find_dep_path_newest('osmesa-src', bin_path),
"out", "src", "mapi", "shared-glapi", ".libs")
osmesa_path = path.join(base, "out", "mesa", "src", "gallium", "targets", "osmesa")
glapi_path = path.join(base, "out", "mesa", "src", "mapi", "shared-glapi")
os.environ["DYLD_LIBRARY_PATH"] = osmesa_path + ":" + glapi_path
os.environ["GALLIUM_DRIVER"] = "softpipe"


extra_flags = os.getenv('CARGOFLAGS', None)
Expand Down
4 changes: 2 additions & 2 deletions taskcluster/ci/webrender/kind.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ jobs:
run:
using: run-task
command: >-
export PATH=$PATH:$MOZ_FETCHES_DIR/rustc/bin &&
export PATH=$PATH:$MOZ_FETCHES_DIR/rustc/bin:${MOZ_FETCHES_DIR}/wrench-deps/meson/bin &&
cd $HOME/checkouts/gecko/gfx/wr &&
mv $MOZ_FETCHES_DIR/wrench-deps/{vendor,.cargo} ./ &&
CARGOFLAGS="--verbose --frozen" ci-scripts/linux-release-tests.sh
Expand All @@ -81,7 +81,7 @@ jobs:
run:
using: run-task
command: >-
export PATH=$PATH:$MOZ_FETCHES_DIR/rustc/bin &&
export PATH=$PATH:$MOZ_FETCHES_DIR/rustc/bin:${MOZ_FETCHES_DIR}/wrench-deps/meson/bin &&
cd $HOME/checkouts/gecko/gfx/wr &&
mv $MOZ_FETCHES_DIR/wrench-deps/{vendor,.cargo} ./ &&
CARGOFLAGS="--verbose --frozen" ci-scripts/linux-debug-tests.sh
Expand Down
2 changes: 1 addition & 1 deletion taskcluster/scripts/misc/wr-macos-cross-build-setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
12 changes: 10 additions & 2 deletions taskcluster/scripts/misc/wrench-deps-vendoring.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
5 changes: 3 additions & 2 deletions taskcluster/scripts/misc/wrench-macos-build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit d027c5b

Please sign in to comment.