From 7be4bbcbc51f198cd1e1b40adaf310a04422ac1e Mon Sep 17 00:00:00 2001 From: Laszlo Agocs Date: Mon, 9 Dec 2019 15:05:28 +0100 Subject: [PATCH] rhi: metal: Do not fail pipeline creation upon compiler warnings Change-Id: I39384de56d74cf9f1d345a5d395cc07030c6a2ab Fixes: QTBUG-80629 Reviewed-by: Eirik Aavitsland --- src/gui/rhi/qrhimetal.mm | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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 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;