-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Closed
Labels
backend: webgpuIssues with direct interface with WebGPUIssues with direct interface with WebGPUtype: bugSomething isn't workingSomething isn't working
Description
Description
I'm trying to use WebGPU in Bevy. This PR make some of the Bevy pipelines render in WebGPU, but still a lot of errors.
Some of those errors are fixed on wgpu trunk. This branch is updated to wgpu trunk: https://github.com/mockersf/bevy/tree/webgpu-support-not-async-wgpu-trunk. On commit cfc038a when I ran it.
Repro steps
Checking out the above branch
cargo run -p build-wasm-example -- --api webgpu load_gltf
and then serve the folder examples/wasm
Expected vs observed behavior
Only a black screen renders, with the following error in the console:
wasm_example.js:1132 Uncaught TypeError: Failed to execute 'beginRenderPass' on 'GPUCommandEncoder': Failed to read the 'depthStencilAttachment' property from 'GPURenderPassDescriptor': Failed to read the 'view' property from 'GPURenderPassDepthStencilAttachment': Required member is undefined.
at imports.wbg.__wbg_beginRenderPass_db57aa384a7aef06 (wasm_example.js:1132:37)
at web_sys::features::gen_GpuCommandEncoder::GpuCommandEncoder::begin_render_pass::hd5e58f25ad812db1 (wasm_example_bg.wasm:0xe64118)
at <wgpu::backend::web::Context as wgpu::context::Context>::command_encoder_begin_render_pass::hbdc8e17b1b349284 (wasm_example_bg.wasm:0xa5fbb8)
at <T as wgpu::context::DynContext>::command_encoder_begin_render_pass::h25d5e0611a50491f (wasm_example_bg.wasm:0xdf327c)
at wgpu::CommandEncoder::begin_render_pass::h70acf822126d6290 (wasm_example_bg.wasm:0xd68410)
at bevy_render::renderer::RenderContext::begin_tracked_render_pass::hd762be9423cd007e (wasm_example_bg.wasm:0xbf9476)
at <bevy_core_pipeline::core_3d::main_opaque_pass_3d_node::MainOpaquePass3dNode as bevy_render::render_graph::node::Node>::run::h2fabea3ed534a938 (wasm_example_bg.wasm:0x36ca75)
at bevy_render::renderer::graph_runner::RenderGraphRunner::run_graph::hbee3fc9f5504ca56 (wasm_example_bg.wasm:0x110105)
at bevy_render::renderer::graph_runner::RenderGraphRunner::run_graph::hbee3fc9f5504ca56 (wasm_example_bg.wasm:0x11029e)
at bevy_render::renderer::graph_runner::RenderGraphRunner::run::he524a0e8137aa4a9 (wasm_example_bg.wasm:0x6fa3ad)
Platform
macOS 13.3, chromium 114.0.5700.0
Metadata
Metadata
Assignees
Labels
backend: webgpuIssues with direct interface with WebGPUIssues with direct interface with WebGPUtype: bugSomething isn't workingSomething isn't working