mirror of
https://github.com/bevyengine/bevy
synced 2024-09-20 06:22:01 +00:00
80f2ee2910
# Objective - Being able to build for WebGPU ``` error[E0061]: this function takes 1 argument but 3 arguments were supplied --> .cargo/registry/src/index.crates.io-6f17d22bba15001f/wgpu-0.19.1/src/backend/webgpu.rs:375:22 | 375 | let mut mapped = web_sys::GpuDepthStencilState::new( | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 376 | map_compare_function(desc.depth_compare), | ---------------------------------------- unexpected argument of type `GpuCompareFunction` 377 | desc.depth_write_enabled, | ------------------------ unexpected argument of type `bool` | note: associated function defined here --> .cargo/registry/src/index.crates.io-6f17d22bba15001f/web-sys-0.3.68/src/features/gen_GpuDepthStencilState.rs:27:12 | 27 | pub fn new(format: GpuTextureFormat) -> Self { | ^^^ help: remove the extra arguments | 376 - map_compare_function(desc.depth_compare), 376 + map_texture_format(desc.format), | error[E0061]: this function takes 1 argument but 2 arguments were supplied --> .cargo/registry/src/index.crates.io-6f17d22bba15001f/wgpu-0.19.1/src/backend/webgpu.rs:1693:13 | 1693 | web_sys::GpuVertexState::new(desc.vertex.entry_point, &module.0); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ------------------------- | | | unexpected argument of type `&str` | help: remove the extra argument | note: associated function defined here --> .cargo/registry/src/index.crates.io-6f17d22bba15001f/web-sys-0.3.68/src/features/gen_GpuVertexState.rs:27:12 | 27 | pub fn new(module: &GpuShaderModule) -> Self { | ^^^ error[E0061]: this function takes 2 arguments but 3 arguments were supplied --> .cargo/registry/src/index.crates.io-6f17d22bba15001f/wgpu-0.19.1/src/backend/webgpu.rs:1768:17 | 1768 | web_sys::GpuFragmentState::new(frag.entry_point, &module.0, &targets); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ---------------- -------- unexpected argument of type `&js_sys::Array` | | | expected `&GpuShaderModule`, found `&str` | = note: expected reference `&GpuShaderModule` found reference `&str` note: associated function defined here --> .cargo/registry/src/index.crates.io-6f17d22bba15001f/web-sys-0.3.68/src/features/gen_GpuFragmentState.rs:27:12 | 27 | pub fn new(module: &GpuShaderModule, targets: &::wasm_bindgen::JsValue) -> Self { | ^^^ help: remove the extra argument | 1768 - web_sys::GpuFragmentState::new(frag.entry_point, &module.0, &targets); 1768 + web_sys::GpuFragmentState::new(/* &GpuShaderModule */, &module.0); | error[E0061]: this function takes 1 argument but 2 arguments were supplied --> .cargo/registry/src/index.crates.io-6f17d22bba15001f/wgpu-0.19.1/src/backend/webgpu.rs:1793:13 | 1793 | web_sys::GpuProgrammableStage::new(desc.entry_point, &shader_module.0); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ------------------ | | | unexpected argument of type `&str` | help: remove the extra argument | note: associated function defined here --> .cargo/registry/src/index.crates.io-6f17d22bba15001f/web-sys-0.3.68/src/features/gen_GpuProgrammableStage.rs:27:12 | 27 | pub fn new(module: &GpuShaderModule) -> Self { | ^^^ error[E0599]: no method named `write_timestamp` found for struct `GpuCommandEncoder` in the current scope --> .cargo/registry/src/index.crates.io-6f17d22bba15001f/wgpu-0.19.1/src/backend/webgpu.rs:2505:14 | 2503 | / encoder_data 2504 | | .0 2505 | | .write_timestamp(&query_set_data.0, query_index); | | -^^^^^^^^^^^^^^^ method not found in `GpuCommandEncoder` | |_____________| | Some errors have detailed explanations: E0061, E0599. For more information about an error, try `rustc --explain E0061`. ``` ## Solution - `web-sys` doesn't follow semver for the WebGPU APIs as they are unstable. Force using a compatible version --------- Co-authored-by: Alice Cecile <alice.i.cecile@gmail.com> |
||
---|---|---|
.. | ||
bevy_a11y | ||
bevy_animation | ||
bevy_app | ||
bevy_asset | ||
bevy_audio | ||
bevy_core | ||
bevy_core_pipeline | ||
bevy_derive | ||
bevy_diagnostic | ||
bevy_dylib | ||
bevy_dynamic_plugin | ||
bevy_ecs | ||
bevy_ecs_compile_fail_tests | ||
bevy_encase_derive | ||
bevy_gilrs | ||
bevy_gizmos | ||
bevy_gltf | ||
bevy_hierarchy | ||
bevy_input | ||
bevy_internal | ||
bevy_log | ||
bevy_macro_utils | ||
bevy_macros_compile_fail_tests | ||
bevy_math | ||
bevy_mikktspace | ||
bevy_pbr | ||
bevy_ptr | ||
bevy_reflect | ||
bevy_reflect_compile_fail_tests | ||
bevy_render | ||
bevy_scene | ||
bevy_sprite | ||
bevy_tasks | ||
bevy_text | ||
bevy_time | ||
bevy_transform | ||
bevy_ui | ||
bevy_utils | ||
bevy_window | ||
bevy_winit |