Repository navigation
Core: validate DX11 display-composition back buffer - #211
Open
JohsonChou wants to merge 1 commit into
Open
JohsonChou wants to merge 1 commit into
JohsonChou wants to merge 1 commit into
Conversation
Use ReShade logical DX11 back-buffer indexing for display composition. Validate GetBuffer and Luma swapchain bookkeeping before accessing the texture or RTV. When resources are unavailable, skip only composition and continue normal end-of-frame cleanup.
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.
Context
With FINAL FANTASY VII REMAKE INTERGRADE running in DirectX 11, enabling NVIDIA Smooth Motion caused the game to crash during launch with Luma in the graphics stack. The same setup launched when Smooth Motion was disabled.
A report of a similar failure in another game pointed to Luma’s shared DX11 display-composition path: it involved the native swap-chain back-buffer index, a failed
GetBuffercall, and a null texture dereference. ReviewingOnPresentconfirmed that this path:IDXGISwapChain3::GetCurrentBackBufferIndex();GetBufferwithout checking the returnedHRESULT;ReShade’s DX11 backend exposes one logical back buffer, with its own logical current-buffer index. A native flip-model index can therefore disagree with the indexing used by Luma’s ReShade-side buffer and RTV bookkeeping. If retrieval fails or selects an untracked resource, the old path can dereference a null texture or index display-composition state with the wrong buffer.
Changes
swapchain->get_current_back_buffer_index()for the DX11 logical back-buffer index instead of querying the nativeIDXGISwapChain3index.GetBufferresult and returned texture before using it.What this fixes
This removes an unchecked null/resource-mismatch path from DX11 presentation. In the reported FF7R setup, the patched build launches and runs with NVIDIA Smooth Motion enabled instead of crashing during startup.
The validation also makes the same composition path fail safely if a presentation wrapper, swap-chain resize, or mode transition temporarily exposes a buffer that does not match Luma’s tracked DX11 state.
Validation
Publishing-Releasefor x64.Evidence scope
No matching crash dump was captured, so the exact faulting instruction in the original launch crash was not independently proven. The diagnosis is based on the reported reproduction, the analogous shared-code failure, inspection of the unsafe presentation path, and successful runtime testing of the patched build. This change does not alter DLSS, neural rendering, HDR policy, or auxiliary-swap-chain classification.