Draft: wined3d: Initial partial presentation implementation
Based on !9515 (this MR is a draft until the first part is accepted).
This is most of the logic of partial presentation. D3D11 only.
Remaining parts:
- Support for multiple rectangles. Requires changes to command stream and swapchain present op (GL, VK, GDI). I have it implemented, but I'm not confident in my implementation, so it must be a separate review. It is also less frequent: most apps that do partial presentation pass only 1 dirty rectangle in
Present1parameter. There is a subtle difference between dirty rectangles as inputs toPresent1and the actual dirty area with scroll, of course, but it is minor. - Scroll. Simple grep.app search shows very little use. Neither Firefox nor Chromium use that. Windows Terminal is the most prominent. So this is low priority (though I have it implemented, it's not very difficult).
- D3D12. I know of no apps that do partial presentation with D3D12. Most of my experience is with D2D & DComp, I barely have experience with D3D11, D3D12 is even more complicated, so I do not plan on implementing it.
- Other scaling modes (see TODO). I don't think Wine implements them for D3D11.
- Performance improvement? Right now dirty backbuffer regions are always tracked for correctness. I bet Windows does it better in the most common cases when there is no partial presentation.
Edited by Andrew Boyarshin