qt5base-lts/src
Laszlo Agocs 8a175f4ae2 rhi: d3d11: Revive non-flip swapchain model support
Make the QT_D3D_NO_FLIP env.var. have an effect again.

This env.var. has the following effects:

- SwapEffect is set to DXGI_SWAP_EFFECT_DISCARD

- Scaling is set to DXGI_SCALING_STRETCH (no other option with the
  blitting legacy model)

- Alpha works without having to deal with DirectComposition, the dcomp
  code path is therefore skipped completely in legacy mode

- Requesting a HDR mode behaves incorrectly (there's an unwanted
  conversion to SDR or something like that)

- Different window resizing artifacts. Instead of the big black/white
  bars, that is typical with the modern, efficient flip swapchains in
  non-Qt applications as well, there is a bit of shimmering on the
  right side esp. when resizing on the left side. The option of using
  the legacy is model provided mainly for users where this is
  important.

- Reduced performance due the using the old blitting model, although
  that probably won't be visible for many typical Qt applications on
  desktop PCs.

Only for D3D11, because D3D12 does not support non-flip swapchains.

Note: this is incompatible with QT_QPA_DISABLE_REDIRECTION_SURFACE.

The reason to reintroduce this option is to provide a way, even if
just as a developer-focused environment variable, to get a behavior
that is identical to other frameworks and non-Qt applications that
still use D3D11 with the legacy swapchain modes in their rendering
engines. This applies first and foremost to window resizing, where
the visual artifacts common with flip model swapchains may be
misunderstood to be caused by Qt. Having a way to opt-in to the
legacy model allows avoiding/clarifying Apples-to-Oranges
comparisons.

Pick-to: 6.6 6.5
Change-Id: I04e46f71a96fa56cace38703e0e9b93b43bfebc7
Reviewed-by: Christian Strømme <christian.stromme@qt.io>
2023-10-16 18:43:16 +02:00
..
3rdparty Remove 'SecurityCritical' attribute for psl-data 2023-10-04 18:36:53 +00:00
android Android: Simplify Qt for Android hierarchy, less Java reflection! 2023-10-12 19:16:47 +03:00
assets Add XDG theme file for example icons 2023-06-26 17:32:10 +00:00
concurrent Doc: Fix warnings and linking issues 2023-10-09 17:24:07 +00:00
corelib Add missing | operator for QRegularExpression::WildcardConversionOptions 2023-10-16 18:43:16 +02:00
dbus Doc: Add missing return type to QDBusReply::value 2023-10-13 18:00:37 +02:00
entrypoint src: Remove remains of qmake conversion from CMakeLists.txt files 2023-02-10 23:36:51 +01:00
gui rhi: d3d11: Revive non-flip swapchain model support 2023-10-16 18:43:16 +02:00
network QNonContigByteDeviceThreadForwardImpl: NSDMI 2023-10-13 11:58:51 +02:00
opengl Include what you need: <QPointer> 2023-10-12 21:38:54 +02:00
openglwidgets QOpenGLWidget: Call glClear in the default paintGL implementation 2023-09-04 11:46:29 +02:00
platformsupport Include what you need: <QPointer> 2023-10-12 21:38:54 +02:00
plugins QNetworkInfo[NetworkManager]: Avoid creating temporary QStrings 2023-10-16 17:41:21 +02:00
printsupport Include what you need: <QPointer> 2023-10-12 21:38:54 +02:00
sql QSqlDatabase: check if QCoreApplication::instance() exists 2023-10-12 06:16:46 +02:00
testlib Doc: Fix warnings and linking issues 2023-10-09 17:24:07 +00:00
tools windeployqt: Don't copy files from unneeded QML modules 2023-10-10 13:19:34 +02:00
widgets Fusion style/QProgressBar: fix High-DPI issues 2023-10-13 18:23:44 +02:00
xml Doc: Fix warnings and linking issues 2023-10-09 17:24:07 +00:00
CMakeLists.txt Add Qt icon library for examples 2023-04-22 18:14:38 +03:00