Sync rhi backingstore d3d12 behavior with Quick
When adding the D3D12 code path in widgets it seems it was ignored that the retry-with-WARP logic was present both for D3D11 and 12 in Qt Quick. For consistency, the same logic must be used. Right now widgets only has the retry logic for D3D11. Pick-to: 6.6 Change-Id: I08d5728acfb9a68db7e0a4b0477050f08546ffac Reviewed-by: Christian Strømme <christian.stromme@qt.io>
This commit is contained in:
parent
08d642ed4e
commit
54816a8f9a
@ -85,7 +85,7 @@ bool QBackingStoreRhiSupport::create()
|
||||
params.enableDebugLayer = m_config.isDebugLayerEnabled();
|
||||
rhi = QRhi::create(QRhi::D3D11, ¶ms, flags);
|
||||
if (!rhi && !flags.testFlag(QRhi::PreferSoftwareRenderer)) {
|
||||
qCDebug(lcQpaBackingStore, "Failed to create a D3D device with default settings; "
|
||||
qCDebug(lcQpaBackingStore, "Failed to create a D3D11 device with default settings; "
|
||||
"attempting to get a software rasterizer backed device instead");
|
||||
flags |= QRhi::PreferSoftwareRenderer;
|
||||
rhi = QRhi::create(QRhi::D3D11, ¶ms, flags);
|
||||
@ -94,6 +94,12 @@ bool QBackingStoreRhiSupport::create()
|
||||
QRhiD3D12InitParams params;
|
||||
params.enableDebugLayer = m_config.isDebugLayerEnabled();
|
||||
rhi = QRhi::create(QRhi::D3D12, ¶ms, flags);
|
||||
if (!rhi && !flags.testFlag(QRhi::PreferSoftwareRenderer)) {
|
||||
qCDebug(lcQpaBackingStore, "Failed to create a D3D12 device with default settings; "
|
||||
"attempting to get a software rasterizer backed device instead");
|
||||
flags |= QRhi::PreferSoftwareRenderer;
|
||||
rhi = QRhi::create(QRhi::D3D12, ¶ms, flags);
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user