diff options
author | Laszlo Agocs <laszlo.agocs@qt.io> | 2022-01-02 19:35:31 +0100 |
---|---|---|
committer | Laszlo Agocs <laszlo.agocs@qt.io> | 2022-01-13 10:59:18 +0100 |
commit | 30ea5317a8d4dfd09b4bb6b6c34e36003ca3057b (patch) | |
tree | e386b71224d277bf5538a1e01ebf666a001531e2 /src/quick/scenegraph/qsgthreadedrenderloop.cpp | |
parent | 8ef13f73ded11e19d85182f63a98414e098048d2 (diff) |
scenegraph: Allow requesting a HDR swapchain
...with an environment variable for now, to enable development and
testing.
Setting QSG_RHI_HDR to scrgb (or extendedsrgblinear) will request an
scRGB+RGBA16F swapchain. Setting it to hdr10 requests
HDR10(PQ)+A2RGB/BGR10. Otherwise the format stays the default SDR
RGBA/BGRA8.
When something is requested and is not supported for the window, print
a helpful message in the logs with QSG_INFO=1. When supported, the logs
will contain a Creating scRGB/HDR10 swapchain message.
In multi-screen configuration it is important to remember that the
position of the window may be important, depending on the windowing
system. Just having one HDR-enabled display does not mean the
application will launch with the requested HDR format - it may only be
successful if the window is positioned on that particular screen upon
startup. When in doubt, disable all non-HDR screens and try running with
the single HDR-enabled one.
Change-Id: Icf4994d86e39d0fafb3b1321229fc7be1500b372
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
Diffstat (limited to 'src/quick/scenegraph/qsgthreadedrenderloop.cpp')
-rw-r--r-- | src/quick/scenegraph/qsgthreadedrenderloop.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/quick/scenegraph/qsgthreadedrenderloop.cpp b/src/quick/scenegraph/qsgthreadedrenderloop.cpp index 985fd7fe0a..7311c77a6f 100644 --- a/src/quick/scenegraph/qsgthreadedrenderloop.cpp +++ b/src/quick/scenegraph/qsgthreadedrenderloop.cpp @@ -947,6 +947,7 @@ void QSGRenderThread::ensureRhi() cd->swapchain->setDepthStencil(cd->depthStencilForSwapchain); } cd->swapchain->setWindow(window); + QSGRhiSupport::instance()->applySwapChainFormat(cd->swapchain); qCDebug(QSG_LOG_INFO, "MSAA sample count for the swapchain is %d. Alpha channel requested = %s.", rhiSampleCount, alpha ? "yes" : "no"); cd->swapchain->setSampleCount(rhiSampleCount); |