diff --git a/drivers/metal/pixel_formats.mm b/drivers/metal/pixel_formats.mm index ac737b3f0a0..36edbab99aa 100644 --- a/drivers/metal/pixel_formats.mm +++ b/drivers/metal/pixel_formats.mm @@ -1200,7 +1200,7 @@ void PixelFormats::modifyMTLFormatCapabilities(id p_device) { // Disable for iOS simulator last. #if TARGET_OS_SIMULATOR - if (![mtlDevice supportsFamily:MTLGPUFamilyApple5]) { + if (![p_device supportsFamily:MTLGPUFamilyApple5]) { disableAllMTLPixFmtCaps(R8Unorm_sRGB); disableAllMTLPixFmtCaps(RG8Unorm_sRGB); disableAllMTLPixFmtCaps(B5G6R5Unorm);