diff options
author | Laszlo Agocs <laszlo.agocs@qt.io> | 2019-12-09 15:05:28 +0100 |
---|---|---|
committer | Laszlo Agocs <laszlo.agocs@qt.io> | 2019-12-09 17:43:22 +0100 |
commit | 7be4bbcbc51f198cd1e1b40adaf310a04422ac1e (patch) | |
tree | f034582cde88eb1bee756c4dc20ce8fce4448991 /src/gui | |
parent | 4d391514b075c65b33f55b2d1900f66e9bce985f (diff) |
rhi: metal: Do not fail pipeline creation upon compiler warnings
Change-Id: I39384de56d74cf9f1d345a5d395cc07030c6a2ab
Fixes: QTBUG-80629
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
Diffstat (limited to 'src/gui')
-rw-r--r-- | src/gui/rhi/qrhimetal.mm | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/gui/rhi/qrhimetal.mm b/src/gui/rhi/qrhimetal.mm index 131b2da802..3ecc56d147 100644 --- a/src/gui/rhi/qrhimetal.mm +++ b/src/gui/rhi/qrhimetal.mm @@ -3149,7 +3149,10 @@ id<MTLLibrary> QRhiMetalData::createMetalLib(const QShader &shader, QShader::Var [opts release]; // src is autoreleased - if (err) { + // if lib is null and err is non-null, we had errors (fail) + // if lib is non-null and err is non-null, we had warnings (success) + // if lib is non-null and err is null, there were no errors or warnings (success) + if (!lib) { const QString msg = QString::fromNSString(err.localizedDescription); *error = msg; return nil; |