[d3d8/9] Adjust invalid viewport handling#5179
Merged
K0bin merged 2 commits intodoitsujin:masterfrom Sep 7, 2025
Merged
Conversation
Contributor
Author
|
Confirmed to behave the same on modern Windows, thanks to @Blisto91. |
Contributor
Author
|
Squeezed in a minor behavior correction due to an incomplete test. CheckDeviceMultiSampleType will only D3D_OK D3DMULTISAMPLE_NONE checks on NULL format, and will still return D3DERR_NOTAVAILABLE for anything else. Narrows down the behavior introduced in #5039. |
K0bin
approved these changes
Sep 7, 2025
Digger1955
added a commit
to Digger1955/dxvk-gplasync-lowlatency
that referenced
this pull request
Sep 13, 2025
[71ed2e6](doitsujin@71ed2e6) - [d3d8/9] Adjust invalid viewport handling - [[d3d8/9] Adjust invalid viewport handling](doitsujin#5179)
Digger1955
added a commit
to Digger1955/dxvk-gplasync-lowlatency
that referenced
this pull request
Sep 13, 2025
[71ed2e6](doitsujin@71ed2e6) - [d3d8/9] Adjust invalid viewport handling - [[d3d8/9] Adjust invalid viewport handling](doitsujin#5179)
Digger1955
added a commit
to Digger1955/dxvk-gplasync-lowlatency
that referenced
this pull request
Sep 13, 2025
[07084e1](doitsujin@07084e1) - [d3d9] Only D3D_OK D3DMULTISAMPLE_NONE checks for NULL format - [[d3d8/9] Adjust invalid viewport handling](doitsujin#5179)
This file contains hidden or 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
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.
Using a NULL pViewport in SetViewport() will crash the native runtime, but we should handle it a bit more gracefully and not dereference it in that case.
More interestingly, neither d3d8 or 9 will allow the viewport MaxZ to be smaller than or equal to MinZ, and will automatically set MaxZ to MinZ + 0.001f if that's the case.
Drafting until it's confirmed to behave the same on modern OSes, though I don't think there will be any surprises there.