iced-rs/iced

Antialiasing in Wasm through `wgpu` is broken

Open

#1,241 创建于 2022年2月9日

在 GitHub 查看
 (1 评论) (0 反应) (0 负责人)Rust (30,491 star) (1,572 fork)batch import
bughelp wantedrenderingwebwgpu

描述

Is there an existing issue for this?

  • I have searched the existing issues.

Is this issue related to iced?

  • My hardware is compatible and my graphics drivers are up-to-date.

What happened?

If we try to run any of the examples that set the Settings::antialiasing flag to true, the example will compile but it won't display anything when opened in the browser!

The developer console shows a warning that most likely indicates the culprit:

WebGL: INVALID_OPERATION: copyBufferSubData: Cannot copy into an element buffer destination from a non-element buffer source

If we set the Settings::antialiasing flag to false, the example works as expected.

What is the expected behavior?

The example should render correctly when the Settings::antialiasing flag is enabled, without warnings or errors.

Version

master

Operative System

Linux

Do you have any log output?

WebGL: INVALID_OPERATION: copyBufferSubData: Cannot copy into an element buffer destination from a non-element buffer source
imports.wbg.__wbg_copyBufferSubData_7add8f2532e724b2	@	index-d0b6f44571feb9b8.js:463
$web_sys::features::gen_WebGl2RenderingContext::WebGl2RenderingContext::copy_buffer_sub_data_with_i32_and_i32_and_i32::h25c4b101b935d181	@	index-d0b6f44571feb9b8_bg.wasm:0x7aeb13
$<glow::web::Context as glow::HasContext>::copy_buffer_sub_data::he7beaffaa0e89d52	@	index-d0b6f44571feb9b8_bg.wasm:0x75046d
$wgpu_hal::gles::queue::<impl wgpu_hal::gles::Queue>::process::h5085a48d03945b9f	@	index-d0b6f44571feb9b8_bg.wasm:0x10a191
$wgpu_hal::gles::queue::<impl wgpu_hal::Queue<wgpu_hal::gles::Api> for wgpu_hal::gles::Queue>::submit::h2c991e09b1159817	@	index-d0b6f44571feb9b8_bg.wasm:0x377c81
$wgpu_core::device::queue::<impl wgpu_core::hub::Global<G>>::queue_submit::hbb3204750f30d0bd	@	index-d0b6f44571feb9b8_bg.wasm:0x11a54b
$<wgpu::backend::direct::Context as wgpu::Context>::queue_submit::h5b61448fc01bbded	@	index-d0b6f44571feb9b8_bg.wasm:0x41dbb6
$wgpu::Queue::submit::h7c5be47984e889dd	@	index-d0b6f44571feb9b8_bg.wasm:0x7cec50
$<iced_wgpu::window::compositor::Compositor as iced_graphics::window::compositor::Compositor>::present::h4858edf5a3daad1f	@	index-d0b6f44571feb9b8_bg.wasm:0x26fd00
$iced_winit::application::run_instance::{{closure}}::h7a314f3971959754	@	index-d0b6f44571feb9b8_bg.wasm:0x172f03
$<core::future::from_generator::GenFuture<T> as core::future::future::Future>::poll::hf3cf1b948b92e6e4	@	index-d0b6f44571feb9b8_bg.wasm:0x788f31
$iced_winit::application::run::{{closure}}::h54f70409ef7559e2	@	index-d0b6f44571feb9b8_bg.wasm:0x34d15c
$winit::platform_impl::platform::event_loop::EventLoop<T>::run::{{closure}}::h268c305c19315d9a	@	index-d0b6f44571feb9b8_bg.wasm:0x79cd3f
$<alloc::boxed::Box<F,A> as core::ops::function::FnMut<Args>>::call_mut::h4675c30a102c2e0b	@	index-d0b6f44571feb9b8_bg.wasm:0x77cac2
$winit::platform_impl::platform::event_loop::runner::Runner<T>::handle_single_event::hdeb1c185f6b23809	@	index-d0b6f44571feb9b8_bg.wasm:0x60d85a
$winit::platform_impl::platform::event_loop::runner::Shared<T>::handle_event::h4811f9990ff52b02	@	index-d0b6f44571feb9b8_bg.wasm:0x3353f0
$winit::platform_impl::platform::event_loop::runner::Shared<T>::run_until_cleared::h8caa938ebef53322	@	index-d0b6f44571feb9b8_bg.wasm:0x353c46
$winit::platform_impl::platform::event_loop::runner::Shared<T>::send_events::h1adabd7601571c63	@	index-d0b6f44571feb9b8_bg.wasm:0x2bd0c5
$winit::platform_impl::platform::event_loop::runner::Shared<T>::send_event::h378403f44042f883	@	index-d0b6f44571feb9b8_bg.wasm:0x7f7ff2
$winit::platform_impl::platform::event_loop::proxy::Proxy<T>::send_event::hbf7aaa45a4e1630f	@	index-d0b6f44571feb9b8_bg.wasm:0x824fb8
$winit::event_loop::EventLoopProxy<T>::send_event::h4fbd1c5094468810	@	index-d0b6f44571feb9b8_bg.wasm:0x905eb4
$<iced_winit::proxy::Proxy<Message> as futures_sink::Sink<Message>>::start_send::hb55008b85166aeac	@	index-d0b6f44571feb9b8_bg.wasm:0x851efb
$<futures_util::stream::stream::forward::Forward<St,Si,Item> as core::future::future::Future>::poll::h23f7b3f96161cd0b	@	index-d0b6f44571feb9b8_bg.wasm:0x2f5528
$<futures_util::stream::stream::Forward<St,Si> as core::future::future::Future>::poll::h17e0fffb2f33fb7d	@	index-d0b6f44571feb9b8_bg.wasm:0x96dab1
$futures_util::future::future::FutureExt::poll_unpin::hdaa3e94ee71f5e65	@	index-d0b6f44571feb9b8_bg.wasm:0x8f7e84
$<futures_util::future::select::Select<A,B> as core::future::future::Future>::poll::h4769db96703b96b4	@	index-d0b6f44571feb9b8_bg.wasm:0x29ee4c
$<futures_util::future::future::map::Map<Fut,F> as core::future::future::Future>::poll::hd5e74b8c75bd7624	@	index-d0b6f44571feb9b8_bg.wasm:0x390e59
$<futures_util::future::future::Map<Fut,F> as core::future::future::Future>::poll::h90f7b49b821b00ad	@	index-d0b6f44571feb9b8_bg.wasm:0x91bc60
$<core::pin::Pin<P> as core::future::future::Future>::poll::h35203ffb270495b0	@	index-d0b6f44571feb9b8_bg.wasm:0x7c1f91
$wasm_bindgen_futures::task::singlethread::Task::run::h17defc56263507db	@	index-d0b6f44571feb9b8_bg.wasm:0x4f8efd
$wasm_bindgen_futures::queue::QueueState::run_all::h9a957c137758543c	@	index-d0b6f44571feb9b8_bg.wasm:0x5508cd
$wasm_bindgen_futures::queue::Queue::new::{{closure}}::h37289b0a9d01dce5	@	index-d0b6f44571feb9b8_bg.wasm:0x8bf87a
$<dyn core::ops::function::FnMut<(A,)>+Output = R as wasm_bindgen::closure::WasmClosure>::describe::invoke::h46d0ffe3a96f9375	@	index-d0b6f44571feb9b8_bg.wasm:0x74cd8a
__wbg_adapter_57	@	index-d0b6f44571feb9b8.js:250
real	@	index-d0b6f44571feb9b8.js:199
Promise.then (async)		
imports.wbg.__wbg_then_a6860c82b90816ca	@	index-d0b6f44571feb9b8.js:1357
$js_sys::Promise::then::h0343e7e8728a672e	@	index-d0b6f44571feb9b8_bg.wasm:0x8a7ac8
$wasm_bindgen_futures::queue::Queue::push_task::hbb307fbad7a31946	@	index-d0b6f44571feb9b8_bg.wasm:0x600285
$wasm_bindgen_futures::task::singlethread::Task::wake_by_ref::{{closure}}::h3051e6f8a32b88bc	@	index-d0b6f44571feb9b8_bg.wasm:0x96c658
$std::thread::local::LocalKey<T>::try_with::h7864360eb05558e6	@	index-d0b6f44571feb9b8_bg.wasm:0x7494f0
$std::thread::local::LocalKey<T>::with::h1f74c7486057c637	@	index-d0b6f44571feb9b8_bg.wasm:0x89a806
$wasm_bindgen_futures::task::singlethread::Task::wake_by_ref::h1e8c399b039d45d2	@	index-d0b6f44571feb9b8_bg.wasm:0x7a1c77
$wasm_bindgen_futures::task::singlethread::Task::into_raw_waker::raw_wake::h8c8825950b1c27d5	@	index-d0b6f44571feb9b8_bg.wasm:0x8a7910
$core::task::wake::Waker::wake::h4372c2f237fccb25	@	index-d0b6f44571feb9b8_bg.wasm:0x91a9d2
$futures_core::task::__internal::atomic_waker::AtomicWaker::wake::he0052a70b7a36d70	@	index-d0b6f44571feb9b8_bg.wasm:0x5a546d
$wasm_timer::timer::Timer::advance_to::h6dfa85074ef19195	@	index-d0b6f44571feb9b8_bg.wasm:0x436de6
$wasm_timer::timer::global::platform::schedule_callback::{{closure}}::h12d94938e113dfb1	@	index-d0b6f44571feb9b8_bg.wasm:0x45c757
$<T as wasm_bindgen::closure::WasmClosureFnOnce<(),R>>::into_js_function::{{closure}}::h2a1572775c470aa7	@	index-d0b6f44571feb9b8_bg.wasm:0x4a129e
$<dyn core::ops::function::FnMut<()>+Output = R as wasm_bindgen::closure::WasmClosure>::describe::invoke::ha304115288214b3b	@	index-d0b6f44571feb9b8_bg.wasm:0x7a5a9b
__wbg_adapter_54	@	index-d0b6f44571feb9b8.js:246
real	@	index-d0b6f44571feb9b8.js:199
setTimeout (async)		
(anonymous)	@	index-d0b6f44571feb9b8.js:830
handleError	@	index-d0b6f44571feb9b8.js:255
imports.wbg.__wbg_setTimeout_1c75092906446b91	@	index-d0b6f44571feb9b8.js:829
$web_sys::features::gen_Window::Window::set_timeout_with_callback_and_timeout_and_arguments_0::h8e23050f3925d1c6	@	index-d0b6f44571feb9b8_bg.wasm:0x64816b
$wasm_timer::timer::global::platform::schedule_callback::h968023838bb9f554	@	index-d0b6f44571feb9b8_bg.wasm:0x567478
$wasm_timer::timer::global::platform::run::haa17e186521ae937	@	index-d0b6f44571feb9b8_bg.wasm:0x5e8b6f
$<wasm_timer::timer::TimerHandle as core::default::Default>::default::hbd7cdfa15dd01b30	@	index-d0b6f44571feb9b8_bg.wasm:0x552417
$wasm_timer::timer::delay::Delay::new_at::h507a40443500d705	@	index-d0b6f44571feb9b8_bg.wasm:0x8bf25e
$wasm_timer::timer::interval::Interval::new_at::hc0155e8a3d777a91	@	index-d0b6f44571feb9b8_bg.wasm:0x860e94
$wasm_timer::timer::interval::Interval::new::h292903f5b629a5b4	@	index-d0b6f44571feb9b8_bg.wasm:0x947b59
$<iced_futures::backend::wasm::wasm_bindgen::time::Every as iced_futures::subscription::Recipe<H,E>>::stream::h06eed493799cfcf7	@	index-d0b6f44571feb9b8_bg.wasm:0x6e1b79
$<iced_futures::subscription::Map<H,E,A,B> as iced_futures::subscription::Recipe<H,E>>::stream::h5d394a42bd4b73d6	@	index-d0b6f44571feb9b8_bg.wasm:0x6a41a0
$iced_futures::subscription::tracker::Tracker<Hasher,Event>::update::h0bdb304edf4a954c	@	index-d0b6f44571feb9b8_bg.wasm:0x2c3f21
$iced_futures::runtime::Runtime<Hasher,Event,Executor,Sender,Message>::track::{{closure}}::h90c0749e0c984ff4	@	index-d0b6f44571feb9b8_bg.wasm:0x7dbda7
$iced_futures::executor::Executor::enter::hd2f7561dcab76e22	@	index-d0b6f44571feb9b8_bg.wasm:0x7af47f
$iced_futures::runtime::Runtime<Hasher,Event,Executor,Sender,Message>::track::h29c1804124d9d89b	@	index-d0b6f44571feb9b8_bg.wasm:0x4db5e9
$iced_winit::application::run::h88fb4d112866a712	@	index-d0b6f44571feb9b8_bg.wasm:0x1bf046
$iced::application::Application::run::h099cec732df8a7b3	@	index-d0b6f44571feb9b8_bg.wasm:0x40dfc7
$solar_system::main::ha15ab1642e708b72	@	index-d0b6f44571feb9b8_bg.wasm:0x502b28
$core::ops::function::FnOnce::call_once::h8189fbbd28bdfb2a	@	index-d0b6f44571feb9b8_bg.wasm:0x9cff7a
$std::sys_common::backtrace::__rust_begin_short_backtrace::h1d80b3722f6ab582	@	index-d0b6f44571feb9b8_bg.wasm:0x9be97f
$std::rt::lang_start::{{closure}}::h7c4ab78706300fea	@	index-d0b6f44571feb9b8_bg.wasm:0x948c38
$std::rt::lang_start_internal::h7fe18c3b03c68b12	@	index-d0b6f44571feb9b8_bg.wasm:0x74cfe0
$std::rt::lang_start::he5f81571c0af71f4	@	index-d0b6f44571feb9b8_bg.wasm:0x836a69
$main	@	index-d0b6f44571feb9b8_bg.wasm:0xa2c370
$__wbindgen_start	@	index-d0b6f44571feb9b8_bg.wasm:0xa2dcc7
init	@	index-d0b6f44571feb9b8.js:1507
await in init (async)		
(anonymous)

贡献者指南