Repository navigation
dxgi: CheckFeatureSupport answers a wrong size or an unknown feature with DXGI_ERROR_INVALID_CALL, as the host does (new RT item) - #8023
Open
AirKyzzZ wants to merge 1 commit into
Conversation
…with DXGI_ERROR_INVALID_CALL, as the host does Signed-off-by: Maxime Mansiet <AirKyzzZ@users.noreply.github.com>
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.
Claimed in the coordination issue as: new RT item (claim)
What and why
The layer's
IDXGIFactory5::CheckFeatureSupportansweredE_INVALIDARGfor a wrong size and for any feature other thanDXGI_FEATURE_PRESENT_ALLOW_TEARING. Measured on the host dxgi.dll here: a size of 0, 2 or 8 forALLOW_TEARING, and an unknown feature (1, 99, -1), areDXGI_ERROR_INVALID_CALLwith the data left untouched, also when the data pointer is null. The layer now checks the feature and size first and answersDXGI_ERROR_INVALID_CALL. A null data pointer with the right size crashes the host (it writes through it), so the layer keepsE_INVALIDARGthere, anddxgi_swapchain_testkeeps checking that while its wrong-size check now expectsDXGI_ERROR_INVALID_CALL.Independent of #7999 (same file, lines apart, the two merge cleanly in either order).
Tested
Windows 10 22H2 (19045), RTX 2060 / NVIDIA 566.14, Ryzen 5 2600X, clang-cl 23.1.6 + lld-link, Windows SDK 10.0.26100, Ninja, on
df5ed873e, over SSH:dxgi_device_test: 3 backend(s) passed. The new checks run on the factory of the host WARP adapter, of the host RTX 2060 adapter and of the layer's adapter on the Vulkan device, so the host answers are checked again on every run. Withdxgi_com.cppfrommainboth host legs pass and the Vulkan leg fails atCheckFeatureSupport(DXGI_FEATURE_PRESENT_ALLOW_TEARING, &tearing, size) == DXGI_ERROR_INVALID_CALL(line 134).xbox_present,dxgi_swapchain_count: pass.dxgi_swapchainbuilds and skips over SSH (no interactive window station), so its changed check was not run here.No game files. AI-assisted: yes (Claude Code).
@ItsNotRexed: an exe/recomp PR, as you asked.
Checklist
docs/design.md, with how it was confirmed. (no translator change)