1// 2// Copyright 2019 The ANGLE Project Authors. All rights reserved. 3// Use of this source code is governed by a BSD-style license that can be 4// found in the LICENSE file. 5// 6// This file includes APIs to detect whether certain Apple renderer is available for testing. 7// 8 9#include "test_utils/angle_test_instantiate_apple.h" 10 11#include "common/apple_platform_utils.h" 12#include "test_utils/angle_test_instantiate.h" 13 14namespace angle 15{ 16 17bool IsMetalTextureSwizzleAvailable() 18{ 19#if ANGLE_PLATFORM_IOS_FAMILY_SIMULATOR 20 return false; 21#else 22 // All NVIDIA and older Intel don't support swizzle because they are GPU family 1. 23 // We don't have a way to detect Metal family here, so skip all Intel for now. 24 return !IsIntel() && !IsNVIDIA(); 25#endif 26} 27 28} // namespace angle 29