diff options
author | Laszlo Agocs <laszlo.agocs@qt.io> | 2019-08-12 15:29:13 +0200 |
---|---|---|
committer | Laszlo Agocs <laszlo.agocs@qt.io> | 2019-08-14 15:59:28 +0200 |
commit | 88534c95375e9fdbf6d5411f07c78979fe1da825 (patch) | |
tree | 5c17cc300118b5a9b1b5784456cc42d3cf25a079 /src/quick/scenegraph/qsgrenderloop.cpp | |
parent | b70fcaa7ce9c9afa068679f67aa909c6de8992ff (diff) |
Enable threaded render loop for d3d11
Change-Id: I5772b38c59b8fe3f9a30f56d3a559f6161443562
Reviewed-by: Christian Strømme <christian.stromme@qt.io>
Diffstat (limited to 'src/quick/scenegraph/qsgrenderloop.cpp')
-rw-r--r-- | src/quick/scenegraph/qsgrenderloop.cpp | 23 |
1 files changed, 13 insertions, 10 deletions
diff --git a/src/quick/scenegraph/qsgrenderloop.cpp b/src/quick/scenegraph/qsgrenderloop.cpp index db657cd7df..58dfd97e03 100644 --- a/src/quick/scenegraph/qsgrenderloop.cpp +++ b/src/quick/scenegraph/qsgrenderloop.cpp @@ -244,25 +244,28 @@ QSGRenderLoop *QSGRenderLoop::instance() } if (rhiSupport->isRhiEnabled()) { - // no 'windows' because that's not yet ported to the rhi - if (loopType == WindowsRenderLoop) - loopType = BasicRenderLoop; - switch (rhiSupport->rhiBackend()) { - case QRhi::D3D11: - // D3D11 is forced to 'basic' always for now. The threaded loop's model may - // not be suitable for DXGI due to the possibility of having the main - // thread blocked while issuing a Present. To be investigated. + case QRhi::Null: loopType = BasicRenderLoop; break; - case QRhi::Null: - loopType = BasicRenderLoop; + case QRhi::D3D11: + // The threaded loop's model may not be suitable for DXGI + // due to the possibility of having the main thread (with + // the Windows message pump) blocked while issuing a + // Present on the render thread. However, according to the + // docs this can be a problem for fullscreen swapchains + // only. So leave threaded enabled by default for now and + // revisit later if there are problems. break; default: break; } + + // no 'windows' because that's not yet ported to the rhi + if (loopType == WindowsRenderLoop) + loopType = BasicRenderLoop; } // The environment variables can always override. This is good |