1 // 2 // Copyright 2020 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 7 #ifndef ANGLE_TESTS_ANGLE_TEST_PLATFORM_H_ 8 #define ANGLE_TESTS_ANGLE_TEST_PLATFORM_H_ 9 10 #include <string> 11 12 #include "util/util_gl.h" 13 14 // Driver vendors 15 bool IsAdreno(); 16 17 // Renderer back-ends 18 // Note: FL9_3 is explicitly *not* considered D3D11. 19 bool IsD3D11(); 20 bool IsD3D11_FL93(); 21 // Is a D3D9-class renderer. 22 bool IsD3D9(); 23 // Is D3D9 or SM9_3 renderer. 24 bool IsD3DSM3(); 25 bool IsDesktopOpenGL(); 26 bool IsOpenGLES(); 27 bool IsOpenGL(); 28 bool IsNULL(); 29 bool IsVulkan(); 30 bool IsMetal(); 31 bool IsD3D(); 32 33 // Debug/Release 34 bool IsDebug(); 35 bool IsRelease(); 36 37 bool EnsureGLExtensionEnabled(const std::string &extName); 38 bool IsEGLClientExtensionEnabled(const std::string &extName); 39 bool IsEGLDeviceExtensionEnabled(EGLDeviceEXT device, const std::string &extName); 40 bool IsEGLDisplayExtensionEnabled(EGLDisplay display, const std::string &extName); 41 bool IsGLExtensionEnabled(const std::string &extName); 42 bool IsGLExtensionRequestable(const std::string &extName); 43 44 #endif // ANGLE_TESTS_ANGLE_TEST_PLATFORM_H_ 45