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

Support to create surface from visual on Windows #2434

Merged
merged 5 commits into from
Feb 7, 2022

Conversation

xiaopengli89
Copy link
Contributor

Description

  1. Support to create surface from DirectComposition visual
  2. Add MPO feature to AdapterInfo

Testing
Render content into DirectComposition visual to compose in a window.

Run water example with DX12 backend, AdapterInfo.mpo will show wether hardware supports multiplane overlays or not, if hardware supports MPO, surface will present independent with dwm, which means app's fps may be higher than dwm.

mpo
fps

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 think this is a good direction, thank you for hacking on this!
Just a couple of questions and a few stylistic notes.

wgpu-hal/src/dx12/adapter.rs Outdated Show resolved Hide resolved
wgpu-hal/src/dx12/adapter.rs Outdated Show resolved Hide resolved
wgpu-types/src/lib.rs Outdated Show resolved Hide resolved
wgpu-hal/src/dx12/mod.rs Outdated Show resolved Hide resolved
wgpu-hal/src/dx12/instance.rs Outdated Show resolved Hide resolved
wgpu-hal/src/dx12/adapter.rs Outdated Show resolved Hide resolved
@xiaopengli89
Copy link
Contributor Author

This image describes how MPO works.

@xiaopengli89 xiaopengli89 requested a review from kvark January 30, 2022 08:20
@xiaopengli89 xiaopengli89 changed the title Support to create surface from visual on Windows, add MPO feature to AdapterInfo Support to create surface from visual on Windows Feb 6, 2022
@kvark kvark merged commit 8c35197 into gfx-rs:master Feb 7, 2022
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