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

Update present_with_transaction #3111

Conversation

xiaopengli89
Copy link
Contributor

Checklist

  • Run cargo clippy.
  • Run RUSTFLAGS=--cfg=web_sys_unstable_apis cargo clippy --target wasm32-unknown-unknown if applicable.
  • Add change to CHANGELOG.md. See simple instructions inside file.

Description
Set present_with_transaction according to PresentMode.

@codecov-commenter
Copy link

codecov-commenter commented Oct 15, 2022

Codecov Report

Merging #3111 (c24d237) into master (ce08179) will increase coverage by 0.00%.
The diff coverage is n/a.

@@           Coverage Diff           @@
##           master    #3111   +/-   ##
=======================================
  Coverage   64.75%   64.75%           
=======================================
  Files          81       81           
  Lines       38711    38711           
=======================================
+ Hits        25066    25069    +3     
+ Misses      13645    13642    -3     
Impacted Files Coverage Δ
wgpu-hal/src/dx12/descriptor.rs 87.56% <0.00%> (-0.50%) ⬇️
wgpu-hal/src/gles/device.rs 80.12% <0.00%> (+0.42%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@cwfitzgerald
Copy link
Member

I don't think this is what we actually want. Presenting with transaction is a much more intense form of synchronization which synchronizes with CoreAnimation.

@xiaopengli89
Copy link
Contributor Author

xiaopengli89 commented Oct 16, 2022

Is there currently a way to configure wgpu to use CoreAnimation? Because I found that there is a memory leak problem here:

command_buffer.present_drawable(&texture.drawable);
it is likely to be a metal driver's bug. When there is no better solution, I hope I can somehow avoid using this api.

image

@grovesNL
Copy link
Collaborator

@xiaopengli89 does this leak happen in regular Metal Objective-C or Swift examples? It would be great to verify if this was a actually a Metal bug or if we're accidentally holding an extra reference somewhere (i.e., we have an auto release pool missing somewhere other than present_drawable)

@xiaopengli89 xiaopengli89 mentioned this pull request Oct 19, 2022
3 tasks
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.

4 participants