From 2ef4694c0aacdcff4bfa11ecc66a253197d3654c Mon Sep 17 00:00:00 2001 From: Laszlo Agocs Date: Wed, 7 Jun 2023 11:05:47 +0200 Subject: [PATCH] rhi: metal: Fix a leftover version check Change-Id: I907d4d312f03658d6f04a626a7df96f7e2b4955a Reviewed-by: Qt CI Bot Reviewed-by: Andy Nichols (cherry picked from commit dbaa4fd082cdf37a8fccee047113ed65a67c6c4c) Reviewed-by: Qt Cherry-pick Bot --- src/gui/rhi/qrhimetal.mm | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/gui/rhi/qrhimetal.mm b/src/gui/rhi/qrhimetal.mm index bbdd48318fb..5b8f890fb0c 100644 --- a/src/gui/rhi/qrhimetal.mm +++ b/src/gui/rhi/qrhimetal.mm @@ -3748,11 +3748,11 @@ bool QMetalTexture::create() desc.textureType = isArray ? MTLTextureType1DArray : MTLTextureType1D; } else if (isArray) { #ifdef Q_OS_IOS - if (samples > 1) { - // would be available on iOS 14.0+ but cannot test for that with a 13 SDK - qWarning("Multisample 2D texture array is not supported on iOS"); + if (@available(iOS 14, *)) { + desc.textureType = samples > 1 ? MTLTextureType2DMultisampleArray : MTLTextureType2DArray; + } else { + desc.textureType = MTLTextureType2DArray; } - desc.textureType = MTLTextureType2DArray; #else desc.textureType = samples > 1 ? MTLTextureType2DMultisampleArray : MTLTextureType2DArray; #endif