Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove BlitPlugin and introduce TextureBlitter #17807

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

IceSentry
Copy link
Contributor

@IceSentry IceSentry commented Feb 11, 2025

Objective

wgpu 24 added a new TextureBlitter that handles doing blitting between 2 textures. Unfortunately, it's currently a bit limited but we will likely want to start use it once it has been updated to support the required features. It should be able to replace the need for the blit plugin and simplifies doing. a blit.

Solution

  • Remove the blit plugin
  • Copy the texture_blitter module from wgpu with some small modifications done for our use cases
  • Add the blit() function to the render graph context. This is needed because we need both the render device and the command encoder to do a blit.
  • Update the upscaling and msaa writeback node to use this new texture blitter.

Testing

Confirmed that msaa writeback still works with the split_screen example


Migration Guide

TODO explain how to use the new texture blitter

@IceSentry IceSentry added A-Rendering Drawing game state to the screen S-Needs-Review Needs reviewer attention (from anyone!) to move forward labels Feb 11, 2025
@IceSentry
Copy link
Contributor Author

IceSentry commented Feb 11, 2025

Oof, that doesn't work on wasm. Back to the drawing board. I'll probably need a cache stored in a resource or maybe just use the asset system.

@IceSentry IceSentry added S-Waiting-on-Author The author needs to make changes or address concerns before this can be merged and removed S-Needs-Review Needs reviewer attention (from anyone!) to move forward labels Feb 11, 2025
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 S-Waiting-on-Author The author needs to make changes or address concerns before this can be merged
Projects
Status: No status
Development

Successfully merging this pull request may close these issues.

1 participant