Skip to content

Use send wrapped BindGroupEntry Vec in prepare_mesh_view_bind_groups#24623

Open
beicause wants to merge 2 commits into
bevyengine:mainfrom
beicause:prepare_mesh_view_bind_groups_wasm32
Open

Use send wrapped BindGroupEntry Vec in prepare_mesh_view_bind_groups#24623
beicause wants to merge 2 commits into
bevyengine:mainfrom
beicause:prepare_mesh_view_bind_groups_wasm32

Conversation

@beicause

@beicause beicause commented Jun 14, 2026

Copy link
Copy Markdown
Member

Objective

Address the TODO in prepare_mesh_view_bind_groups

Solution

Use WgpuWrapper<Vec<BindGroupEntry<'static>>> instead of feature gate.

We already use WgpuWrapper for wgpu objects to make them Send on wasm with atomics so that the target compiles.

Testing

CI

@kfc35 kfc35 added A-Rendering Drawing game state to the screen S-Needs-Review Needs reviewer attention (from anyone!) to move forward labels Jun 14, 2026
@github-project-automation github-project-automation Bot moved this to Needs SME Triage in Rendering Jun 14, 2026
@kfc35 kfc35 added C-Performance A change motivated by improving speed, memory usage or compile times D-Straightforward Simple bug fixes and API improvements, docs, test and examples labels Jun 14, 2026

@kfc35 kfc35 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good to me

i tested building the 3d_scene for wasm with the atomics target-feature and ran it locally. I did not run into problems

RUSTFLAGS='-C target-feature=+atomics,+bulk-memory --cfg getrandom_backend="wasm_js"' cargo build --release --example 3d_scene --target wasm32-unknown-unknown

wasm-bindgen --out-name wasm_example \
  --out-dir examples/wasm/target \
  --target web target/wasm32-unknown-unknown/release/examples/3d_scene.wasm

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-Rendering Drawing game state to the screen C-Performance A change motivated by improving speed, memory usage or compile times D-Straightforward Simple bug fixes and API improvements, docs, test and examples S-Needs-Review Needs reviewer attention (from anyone!) to move forward

Projects

Status: Needs SME Triage

Development

Successfully merging this pull request may close these issues.

2 participants