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:

  1. 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 Present1 parameter. There is a subtle difference between dirty rectangles as inputs to Present1 and the actual dirty area with scroll, of course, but it is minor.
  2. 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).
  3. 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.
  4. Other scaling modes (see TODO). I don't think Wine implements them for D3D11.
  5. 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

Merge request reports

Loading