jinleili / learn-wgpu-zh

Learn wgpu 中文版
https://jinleili.github.io/learn-wgpu-zh/
MIT License
351 stars 21 forks source link

执行cargo run --bin tutorial9-models,发现窗口拖动很卡 #21

Open qzd1989 opened 1 month ago

qzd1989 commented 1 month ago

CPU和内存都没满,拖动窗口栏时很卡顿。 命令行日志:

Using Apple M1 Max (Metal)
正在使用 Apple M1 Max, 后端图形接口为 Metal。

我的环境:

image
jinleili commented 1 month ago

https://github.com/gfx-rs/wgpu/issues/2852 winit 的的 event_loop 会一直霸占当前线程导致没法即时响应当前应用的其它系统级事件,有两种可选的解决路径: 1, 等 winit 解决相关 bug: https://github.com/rust-windowing/winit/issues?q=is%3Aissue+is%3Aopen+lag 2, 参考 wgpu-in-appbevy-in-web-worker 剔除对 winit 的依赖