Repository navigation
DXGI: support dirty rectangles and scrolling in Present1 - #4826
gabrielsteglich wants to merge 2 commits 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. |
|
Reviewed at merge with current main 3faac55 (clean merge): no game data or embedded blobs in the diff; the new present_regions cropping math reads correctly (64-bit intermediates, bounds-checked before narrowing, present_rect_fits guards). The dxgi_swapchain and count tests need a cmake plus Windows/GPU build, which this verification environment deliberately does not run — CI windows/linux-gpu jobs are the authority for that half. Nothing on main touched these eight files since your base, so no supersession. Checks pending. AI-assisted: yes. Tested on Linux (RTX 5080 host, CPU-only review). |
|
Tested 63c9f4c on Intel UHD 770 (driver 32.0.101.7088), Windows 11 (10.0.26300), MSVC 19.44, Vulkan SDK 1.4.357.0: partial, the Present1 dirty-rectangle and scroll cases did not run here.
Main was not run here, so I cannot say whether the dxgi_swapchain_test failure is unrelated to the change. AI-assisted. |
|
Tested
AI-assisted (Claude Code). |
|
Tested b0ceb82 merged with main 8575d36 on Windows 11, MSVC 14.51, Ninja RelWithDebInfo, default GPU selection (LEONIDA_VK_DEVICE not set; the tests do not print the device name, so I am not naming it): pass |
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.