-
-
Notifications
You must be signed in to change notification settings - Fork 21.3k
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
Use direct composition for d3d12 backend #99387
Open
0x0ACB
wants to merge
1
commit into
godotengine:master
Choose a base branch
from
0x0ACB:direct_composition
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
+67
−8
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
0x0ACB
force-pushed
the
direct_composition
branch
from
November 18, 2024 10:58
47eb9ac
to
c9cf855
Compare
bruvzg
reviewed
Nov 18, 2024
0x0ACB
force-pushed
the
direct_composition
branch
4 times, most recently
from
November 18, 2024 13:02
ace4a14
to
8f968e3
Compare
bruvzg
approved these changes
Nov 19, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems good to me, transparency is working as expected.
0x0ACB
force-pushed
the
direct_composition
branch
from
November 24, 2024 07:51
8f968e3
to
09c56e6
Compare
Repiteo
approved these changes
Nov 25, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should be good to merge after @AThousandShips' suggestion is rebased
0x0ACB
force-pushed
the
direct_composition
branch
from
November 26, 2024 05:49
09c56e6
to
67ce8ea
Compare
0x0ACB
force-pushed
the
direct_composition
branch
from
November 26, 2024 09:28
67ce8ea
to
a8cd0e9
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR fixes #95630 and can be seen as a partial fix for #76167.
Update D3D12 Renderer to Use Direct Composition
This commit updates the D3D12 renderer to use
CreateSwapChainForComposition
instead ofCreateSwapChainForHwnd
, addressing the lack of alpha support in the latter (see #95630).Switching to direct composition is supposed to have additional benefits according to the Microsoft documentation and other online resources. Specifically, it eliminates the need to transfer the final image to the CPU for DWM composition, which is suggested to improve performance. While I have not empirically verified these performance claims, the explanation aligns with my own research into transparency issues and DWM behavior.
Compatibility Notes
This change requires Windows 8 or later. However, since D3D12 is unsupported on Windows 7 (now EOL for nearly five years), this should not pose a compatibility issue.