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

Flush on submit in GL when there are no sync capabilities #2893

Merged
merged 1 commit into from
Jul 8, 2019

Conversation

hecrj
Copy link
Contributor

@hecrj hecrj commented Jul 7, 2019

Currently, when there are no sync capabilites, the GL backend returns an unsignaled fence on submit which only changes to signaled if wait_for_fence is called. This behavior causes memory to never be freed when using WebGL2 on wgpu.

The changes here flush immediately on submit in this case, and return an already signaled fence. I am not sure if this is the correct way to fix this. Let me know how to proceed.

PR checklist:

  • make succeeds (on *nix)
  • make reftests succeeds
  • tested examples with the following backends:
  • rustfmt run on changed code

Also return an already signaled fence. This allows
memory to be freed when used in `wgpu` without sync
capabilities.
@hecrj hecrj mentioned this pull request Jul 7, 2019
26 tasks
Copy link
Member

@kvark kvark left a comment

Choose a reason for hiding this comment

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

I'm not entirely sure this would be correct, but I don't have a better suggestion at the moment :)
bors r+

bors bot added a commit that referenced this pull request Jul 8, 2019
2893: Flush on `submit` in GL when there are no sync capabilities r=kvark a=hecrj

Currently, when there are no sync capabilites, the GL backend returns an unsignaled fence on `submit` which only changes to signaled if `wait_for_fence` is called. This behavior causes memory to _never_ be freed when using WebGL2 on `wgpu`.

The changes here flush immediately on `submit` in this case, and return an already signaled fence. I am not sure if this is the correct way to fix this. Let me know how to proceed.

PR checklist:
- [x] `make` succeeds (on *nix)
- [x] `make reftests` succeeds
- [ ] tested examples with the following backends:
- [ ] `rustfmt` run on changed code

Co-authored-by: Héctor Ramón Jiménez <[email protected]>
@bors
Copy link
Contributor

bors bot commented Jul 8, 2019

Build succeeded

@bors bors bot merged commit bcd6996 into gfx-rs:master Jul 8, 2019
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