mirror of
https://github.com/emilk/egui.git
synced 2026-06-26 14:49:06 -04:00
Update wgpu to 0.19 (#3824)
* Closes https://github.com/emilk/egui/issues/3675 --------- Co-authored-by: Andreas Reich <r_andreas2@web.de> Co-authored-by: Mingun <Alexander_Sergey@mail.ru>
This commit is contained in:
@@ -18,7 +18,7 @@ OPEN=false
|
||||
OPTIMIZE=false
|
||||
BUILD=debug
|
||||
BUILD_FLAGS=""
|
||||
WEB_GPU=false
|
||||
WGPU=false
|
||||
WASM_OPT_FLAGS="-O2 --fast-math"
|
||||
|
||||
while test $# -gt 0; do
|
||||
@@ -34,15 +34,15 @@ while test $# -gt 0; do
|
||||
echo " --release: Build with --release, and then run wasm-opt."
|
||||
echo " NOTE: --release also removes debug symbols, unless you also use -g."
|
||||
echo ""
|
||||
echo " --webgpu: Build a binary for WebGPU instead of WebGL."
|
||||
echo " Note that the resulting wasm will ONLY work on browsers with WebGPU."
|
||||
echo " --wgpu: Build a binary using wgpu instead of glow/webgl."
|
||||
echo " The resulting binary will automatically use WebGPU if available and"
|
||||
echo " fall back to a WebGL emulation layer otherwise."
|
||||
exit 0
|
||||
;;
|
||||
|
||||
-g)
|
||||
shift
|
||||
WASM_OPT_FLAGS="${WASM_OPT_FLAGS} -g"
|
||||
echo "'${WASM_OPT_FLAGS}'"
|
||||
;;
|
||||
|
||||
--open)
|
||||
@@ -57,9 +57,9 @@ while test $# -gt 0; do
|
||||
BUILD_FLAGS="--release"
|
||||
;;
|
||||
|
||||
--webgpu)
|
||||
--wgpu)
|
||||
shift
|
||||
WEB_GPU=true
|
||||
WGPU=true
|
||||
;;
|
||||
|
||||
*)
|
||||
@@ -71,7 +71,7 @@ done
|
||||
|
||||
OUT_FILE_NAME="egui_demo_app"
|
||||
|
||||
if [[ "${WEB_GPU}" == true ]]; then
|
||||
if [[ "${WGPU}" == true ]]; then
|
||||
FEATURES="${FEATURES},wgpu"
|
||||
else
|
||||
FEATURES="${FEATURES},glow"
|
||||
@@ -87,6 +87,7 @@ echo "Building rust…"
|
||||
(cd crates/$CRATE_NAME &&
|
||||
cargo build \
|
||||
${BUILD_FLAGS} \
|
||||
--quiet \
|
||||
--lib \
|
||||
--target wasm32-unknown-unknown \
|
||||
--no-default-features \
|
||||
|
||||
@@ -34,28 +34,28 @@ cargo check --quiet -p egui_demo_app --lib --target wasm32-unknown-unknown --al
|
||||
cargo test --quiet --all-targets --all-features
|
||||
cargo test --quiet --doc # slow - checks all doc-tests
|
||||
|
||||
(cd crates/eframe && cargo check --quiet --no-default-features --features "glow")
|
||||
(cd crates/eframe && cargo check --quiet --no-default-features --features "wgpu")
|
||||
(cd crates/egui && cargo check --quiet --no-default-features --features "serde")
|
||||
(cd crates/egui_demo_app && cargo check --quiet --no-default-features --features "glow")
|
||||
(cd crates/egui_demo_app && cargo check --quiet --no-default-features --features "wgpu")
|
||||
(cd crates/egui_demo_lib && cargo check --quiet --no-default-features)
|
||||
(cd crates/egui_extras && cargo check --quiet --no-default-features)
|
||||
(cd crates/egui_glow && cargo check --quiet --no-default-features)
|
||||
(cd crates/egui-winit && cargo check --quiet --no-default-features --features "wayland")
|
||||
(cd crates/egui-winit && cargo check --quiet --no-default-features --features "x11")
|
||||
(cd crates/emath && cargo check --quiet --no-default-features)
|
||||
(cd crates/epaint && cargo check --quiet --no-default-features --release)
|
||||
(cd crates/epaint && cargo check --quiet --no-default-features)
|
||||
cargo check --quiet -p eframe --no-default-features --features "glow"
|
||||
cargo check --quiet -p eframe --no-default-features --features "wgpu"
|
||||
cargo check --quiet -p egui --no-default-features --features "serde"
|
||||
cargo check --quiet -p egui_demo_app --no-default-features --features "glow"
|
||||
cargo check --quiet -p egui_demo_app --no-default-features --features "wgpu"
|
||||
cargo check --quiet -p egui_demo_lib --no-default-features
|
||||
cargo check --quiet -p egui_extras --no-default-features
|
||||
cargo check --quiet -p egui_glow --no-default-features
|
||||
cargo check --quiet -p egui-winit --no-default-features --features "wayland"
|
||||
cargo check --quiet -p egui-winit --no-default-features --features "x11"
|
||||
cargo check --quiet -p emath --no-default-features
|
||||
cargo check --quiet -p epaint --no-default-features --release
|
||||
cargo check --quiet -p epaint --no-default-features
|
||||
|
||||
(cd crates/eframe && cargo check --quiet --all-features)
|
||||
(cd crates/egui && cargo check --quiet --all-features)
|
||||
(cd crates/egui_demo_app && cargo check --quiet --all-features)
|
||||
(cd crates/egui_extras && cargo check --quiet --all-features)
|
||||
(cd crates/egui_glow && cargo check --quiet --all-features)
|
||||
(cd crates/egui-winit && cargo check --quiet --all-features)
|
||||
(cd crates/emath && cargo check --quiet --all-features)
|
||||
(cd crates/epaint && cargo check --quiet --all-features)
|
||||
cargo check --quiet -p eframe --all-features
|
||||
cargo check --quiet -p egui --all-features
|
||||
cargo check --quiet -p egui_demo_app --all-features
|
||||
cargo check --quiet -p egui_extras --all-features
|
||||
cargo check --quiet -p egui_glow --all-features
|
||||
cargo check --quiet -p egui-winit --all-features
|
||||
cargo check --quiet -p emath --all-features
|
||||
cargo check --quiet -p epaint --all-features
|
||||
|
||||
./scripts/wasm_bindgen_check.sh
|
||||
|
||||
|
||||
@@ -45,5 +45,7 @@ disallowed-types = [
|
||||
doc-valid-idents = [
|
||||
# You must also update the same list in the root `clippy.toml`!
|
||||
"AccessKit",
|
||||
"WebGL",
|
||||
"WebGPU",
|
||||
"..",
|
||||
]
|
||||
|
||||
@@ -7,4 +7,4 @@ cd "$script_path/.."
|
||||
rustup target add wasm32-unknown-unknown
|
||||
|
||||
# For generating JS bindings:
|
||||
cargo install --quiet wasm-bindgen-cli --version 0.2.89
|
||||
cargo install --quiet wasm-bindgen-cli --version 0.2.90
|
||||
|
||||
@@ -24,6 +24,7 @@ BUILD=debug # debug builds are faster
|
||||
|
||||
(cd crates/$CRATE_NAME &&
|
||||
cargo build \
|
||||
--quiet \
|
||||
--lib \
|
||||
--target wasm32-unknown-unknown \
|
||||
--no-default-features \
|
||||
|
||||
Reference in New Issue
Block a user