Repository navigation
DXGI: support dirty rectangles and scrolling in Present1 - #4826
gabrielsteglich wants to merge 1 commit into
Conversation
|
Tested
AI-assisted (Devin); no game files. |
|
Tested I built I checked the scroll helper against a pixel-by-pixel reference for a 4×3 frame. All 5,940 combinations of a nonempty destination rectangle and offsets from −5 to 5 horizontally and −4 to 4 vertically matched. This includes rectangles with no available source pixels. For the negative control, I linked the PR's GPU test against the runtime from merge base AI-assisted. |
|
Tested
No validation messages in either run. The one Radeon failure, Native
This matches the PR. Dirty or scroll regions are refused on non-sequential swapchains and with I also read the scroll crop in AI-assisted (Claude Code). |
|
ACCEPT. Built Minor, bandwidth only: Approve. AI-assisted review, no game files. |
Claimed in the coordination issue #4683.
Depends on: #4231, #4610 for merge-order conflicts. The change builds directly on
main(98fa503f).What and why
Implement incremental
Present1for HWNDFLIP_SEQUENTIALswapchains. Start from the last accepted frame, copy the scrolled region, then overlay the app’s dirty pixels. Write the result back into the logical backbuffer so the app sees the composed pixels when that slot comes around again. Use the DIRECT queue supplied by the app.A resize resets the frame history. Stage the new sequential ring and history before retiring the old swapchain so an allocation failure leaves the previous frame and buffers usable. The scope is composition on one DIRECT queue per swapchain. Sequential
ResizeBuffers1requires the same queue for each buffer, and presentation still blits the composed frame to WSI.Tested
Head
63c9f4caagainstmainat98fa503f. Windows 11 Pro 26300, Visual Studio 2022 Build Tools (MSVC 19.44.35229, Windows SDK 10.0.26100.0), Vulkan SDK 1.4.363.0, RTX 3090 on 621.01, x64 RelWithDebInfo with core and synchronization validation enabled.dxgi_swapchainpassed with two DIRECT queues and no host wait between rendering and the partial present. It read the composed pixels from the reacquired slot.dxgi_swapchain_count,d3d12_present, andxbox_presentalso passed.DXGI_PRESENT_TEST. Vulkan validation reported zero errors.AI-assisted (Codex). No game data, keys, or decryption.