rhi: metal: Fix external MTLDevice import

Pick-to: 6.6 6.5 6.2
Fixes: QTBUG-115002
Change-Id: I57c12685f8451420c30c65a1a25064607b52e31c
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
This commit is contained in:
Laszlo Agocs 2023-07-03 15:36:07 +02:00
parent 6d9a99d6d8
commit e090853ad5

View File

@ -462,7 +462,7 @@ QRhiMetal::QRhiMetal(QRhiMetalInitParams *params, QRhiMetalNativeHandles *import
importedDevice = importDevice != nullptr; importedDevice = importDevice != nullptr;
if (importedDevice) { if (importedDevice) {
if (d->dev) { if (importDevice->dev) {
d->dev = (id<MTLDevice>) importDevice->dev; d->dev = (id<MTLDevice>) importDevice->dev;
importedCmdQueue = importDevice->cmdQueue != nullptr; importedCmdQueue = importDevice->cmdQueue != nullptr;
if (importedCmdQueue) if (importedCmdQueue)