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 should let app wait until SurfaceTexture presentation is complete #2650

Closed
jimblandy opened this issue May 9, 2022 · 3 comments
Closed
Labels
area: api Issues related to API surface type: enhancement New feature or request

Comments

@jimblandy
Copy link
Member

jimblandy commented May 9, 2022

Is your feature request related to a problem? Please describe.
There's no way to tell when a particular SurfaceTexture is done being presented. This makes it hard for programs to match the frame rate of the swapchain.

Describe the solution you'd like
wgpu should offer a blocking function or future so that the user can wait until it's worth rendering another frame.

Describe alternatives you've considered
The examples hard-code 60Hz, which is unsatisfying. You could present as fast as possible, but in Mailbox mode this will use the full CPU.

Additional context
Possibly relevant:

@jimblandy jimblandy added type: enhancement New feature or request area: api Issues related to API surface labels May 9, 2022
@cwfitzgerald
Copy link
Member

Is this covered by #2700?

@jimblandy
Copy link
Member Author

No, that doesn't have any interaction with presentation that I'm aware of. Surface texture::present doesn't return a Submission index.

Also, what (I think) we want to know is, when has a texture been presented, or perhaps, when is it done being presented? Neither of those correspond to queue activity.

@cwfitzgerald
Copy link
Member

Superseded by 2869

@cwfitzgerald cwfitzgerald closed this as not planned Won't fix, can't repro, duplicate, stale Nov 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: api Issues related to API surface type: enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants