Skip to content

Add dcomp on windows #7550

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

Open
wants to merge 12 commits into
base: trunk
Choose a base branch
from

Conversation

n1ght-hunter
Copy link

@n1ght-hunter n1ght-hunter commented Apr 16, 2025

Connections
#3486
#7108
#5150

Description
This adds dcomp support to the dx12 backend.
My main goal for this was to get window transparency to work on windows

Testing
Tested using a basic wgpu app with transparency

Squash or Rebase?
Squash

Checklist

  • Run cargo fmt.
  • Run taplo format.
  • Run cargo clippy --tests. If applicable, add:
    • --target wasm32-unknown-unknown
  • Run cargo xtask test to run tests.
  • If this contains user-facing changes, add a CHANGELOG.md entry.

I dont know if its normal or not but when running cargo xtask test i had 201 tests fail with code 0xc0000005: Invalid access to memory location. (os error 998) this is run on windows 10

@n1ght-hunter n1ght-hunter requested review from crowlKats and a team as code owners April 16, 2025 06:17
Copy link
Member

@cwfitzgerald cwfitzgerald left a comment

Choose a reason for hiding this comment

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

Generally looking good, some comments.

VisualFromWndHandle {
handle: Foundation::HWND,
dcomp_state: RwLock<Option<DCompState>>,
},
Visual(DirectComposition::IDCompositionVisual),
Copy link
Member

Choose a reason for hiding this comment

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

Should we be combining these enums?

Copy link
Author

Choose a reason for hiding this comment

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

honestly i dont know enough about it to say. i think what maybe would make sense is to have a Visual Enum one variant that just has Dcomp Visual and one that has the handle and other state needed

@cwfitzgerald cwfitzgerald self-assigned this Apr 16, 2025
@n1ght-hunter
Copy link
Author

n1ght-hunter commented Apr 17, 2025

will get to this in the next day or two

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