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

Move to the new gfx-rs swapchain API #317

Closed
kvark opened this issue Oct 3, 2019 · 4 comments
Closed

Move to the new gfx-rs swapchain API #317

kvark opened this issue Oct 3, 2019 · 4 comments
Assignees

Comments

@kvark
Copy link

kvark commented Oct 3, 2019

See https://gfx-rs.github.io/2019/10/01/update.html

Quad example update - gfx-rs/gfx@40a905f#diff-3396f7c6f19ad0882c9d181e08c8c702

@zakorgy zakorgy self-assigned this Oct 7, 2019
@zakorgy
Copy link

zakorgy commented Oct 7, 2019

With the new swapchain API we can't directly access the frame images. Steps needs to be done before we can move to the new API:

  • Replace pipeline barriers on frame images with render passes.
  • Make a workaround for blitting from/to frame images. (using shaders?)
  • Rework the read_pixel logic which we use in wrench, because we can't directly read the frame image content into a buffer. Instead we render to a different image which we can read back and copy the result from that image to the screen.

@kvark
Copy link
Author

kvark commented Oct 7, 2019

You are right that we can't have this new swapchain model for as long as we need to blit back from the screen :/ And I think it's only the MixBlend mode (with Readback task) that actually needs to blit from the screen. There are two ways to solve this that I could see:

  1. reword the new swapchain model to allow more usages and expose images... this means we'll have to request the ability to read images back in WR unconditionally, which potentially comes at a cost.
  2. in WR force the surface allocated if we see a MixBlend mode. That means that any readbacks would only need to be done from a render target.

@kvark
Copy link
Author

kvark commented Oct 17, 2019

More stuff to read about (1) - gpuweb/gpuweb#437

@zakorgy
Copy link

zakorgy commented Nov 21, 2019

Fixed in #331

@zakorgy zakorgy closed this as completed Nov 21, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants