Skip to content

turn more types into wgpu wrappers - #25660

Open
laundmo wants to merge 1 commit into
bevyengine:mainfrom
laundmo:more-wgpu-wrappers
Open

turn more types into wgpu wrappers#25660
laundmo wants to merge 1 commit into
bevyengine:mainfrom
laundmo:more-wgpu-wrappers

Conversation

@laundmo

@laundmo laundmo commented Sep 2, 2026

Copy link
Copy Markdown
Contributor

Continuation of #25512

improves bevy_render compile times by another ~1s for me

Testing

  • check
  • ran pan_orbit_camera_cad example

@laundmo laundmo added A-Rendering Drawing game state to the screen C-Performance A change motivated by improving speed, memory usage or compile times D-Modest A "normal" level of difficulty; suitable for simple features or challenging fixes labels Sep 2, 2026
@github-project-automation github-project-automation Bot moved this to Needs SME Triage in Rendering Sep 2, 2026
@alice-i-cecile
alice-i-cecile requested review from stuartparmenter and tychedelia and removed request for tychedelia September 2, 2026 21:04
@alice-i-cecile

Copy link
Copy Markdown
Member

@SkiFire13 want to review this one too? (once it's green)

@alice-i-cecile alice-i-cecile added X-Uncontroversial This work is generally agreed upon S-Waiting-on-Author The author needs to make changes or address concerns before this can be merged labels Sep 2, 2026
@laundmo laundmo added the S-Adopt-Me The original PR author has no intent to complete this work. Pick me up! label Sep 6, 2026
Comment on lines +27 to +28
wgpu_wrapper!(pub struct WgpuCommandBuffer(wgpu::CommandBuffer));
wgpu_wrapper!(pub struct WgpuCommandEncoder(wgpu::CommandEncoder));

@beicause beicause Sep 8, 2026

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Using wgpu_wrapper! is only to allow wasm32 + atomics to make !Send wgpu resources compile. There is no need here because RenderContextState is already wrapped. Also, I don't see the reason why this would reduce compile time, ~1s could be noise.

And this leads to using into_inner() everywhere which seems bad to me.

@stuartparmenter stuartparmenter 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.

This still needs work -- CI fixes, missed callers (DLSS, etc), migration guide, etc. I like faster compile times, and am supportive of the work, but I don't love needing to sprinkle into_inner().finish() everywhere.

Happy to review when it is ready to be reviewed.

@alice-i-cecile alice-i-cecile added M-Migration-Guide A breaking change to Bevy's public API that needs to be noted in a migration guide and removed S-Waiting-on-Author The author needs to make changes or address concerns before this can be merged labels Sep 8, 2026
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-Modest A "normal" level of difficulty; suitable for simple features or challenging fixes M-Migration-Guide A breaking change to Bevy's public API that needs to be noted in a migration guide S-Adopt-Me The original PR author has no intent to complete this work. Pick me up! X-Uncontroversial This work is generally agreed upon

Projects

Status: Needs SME Triage

Development

Successfully merging this pull request may close these issues.

4 participants