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

wgpu-rs render backend #527

Merged
merged 16 commits into from
May 2, 2020
Merged

wgpu-rs render backend #527

merged 16 commits into from
May 2, 2020

Conversation

Dinnerbone
Copy link
Contributor

@Dinnerbone Dinnerbone commented Apr 27, 2020

This will solve #14, at least for desktop. It's structured similarly to #520 with the renderer pulled out into its own subcrate.

This provides a wgpu-rs backend for rendering, that is completely agnostic to web or desktop. It could in theory be used today on web, provided your browser has support for it and someone hooks the thing up to web...

The API is extremely similar to Vulkan and isn't very suited to the way that we render today. After we pull this in, I'd like to change our renderer API to work on a frame object so that we only need to do one renderpass per frame and not unlimited per frame. I don't want this PR to break API of other renderers though (especially as #520 is still WIP).

This is still a work in progress, opening a draft PR so it's visible for anyone who wants to see, and to track remaining progress.

Remaining tasks:

  • Bitmap object rendering (outside of shape rendering)
  • Mask support
  • Letterbox drawing
  • Add a feature flag for labeling all buffers/etc, for debugging & performance analysis
  • Split off into smaller files
  • Optimization pass

@Dinnerbone Dinnerbone marked this pull request as ready for review April 30, 2020 06:59
@Dinnerbone Dinnerbone changed the title [DRAFT] wgpu-rs render backend wgpu-rs render backend Apr 30, 2020
@Dinnerbone
Copy link
Contributor Author

I've done a basic look at optimising but unfortunately I think the render API needs to change to get any significant wins. I'll look into that after this PR. I'll count this as ready for review.

@Herschel
Copy link
Member

Herschel commented May 2, 2020

Looks great, thanks! I still think there is some benefit to putting some common things in common_tess, but this can wait until after other renderer improvements. It might also be useful to allow switching between the vulkan/metal/dx12 backends of wgpu (via feature/command line).

@Herschel Herschel merged commit 6339c74 into ruffle-rs:master May 2, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants