1
0
mirror of https://github.com/emilk/egui.git synced 2026-06-26 22:53:14 -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:
Emil Ernerfeldt
2024-01-19 10:14:13 +01:00
committed by GitHub
parent 7733d1d87c
commit b766a48fa7
27 changed files with 578 additions and 344 deletions

View File

@@ -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 \