chromium/third_party/angle/src/tests/test_expectations/GPUTestConfig.cpp


// Copyright 2019 The ANGLE Project Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
//

#include "GPUTestConfig.h"

#include <stdint.h>
#include <iostream>

#include "common/angleutils.h"
#include "common/debug.h"
#include "common/platform_helpers.h"
#include "common/string_utils.h"
#include "gpu_info_util/SystemInfo.h"

#if defined(ANGLE_PLATFORM_APPLE)
#    include "GPUTestConfig_mac.h"
#endif

namespace angle
{

namespace
{

#if defined(ANGLE_PLATFORM_MACOS)
// Generic function call to get the OS version information from any platform
// defined below. This function will also cache the OS version info in static
// variables.
inline bool OperatingSystemVersionNumbers(int32_t *majorVersion, int32_t *minorVersion)
{
    static int32_t sSavedMajorVersion = -1;
    static int32_t sSavedMinorVersion = -1;
    bool ret                          = false;
    if (sSavedMajorVersion == -1 || sSavedMinorVersion == -1)
    {
        GetOperatingSystemVersionNumbers(&sSavedMajorVersion, &sSavedMinorVersion);
        *majorVersion = sSavedMajorVersion;
        *minorVersion = sSavedMinorVersion;
        ret           = true;
    }
    else
    {
        ret = true;
    }
    *majorVersion = sSavedMajorVersion;
    *minorVersion = sSavedMinorVersion;
    return ret;
}
#endif

// Check if the OS is a specific major and minor version of OSX
inline bool IsMacVersion(const int32_t majorVersion, const int32_t minorVersion)
{}

// Check if the OS is OSX Leopard
inline bool IsMacLeopard()
{}

// Check if the OS is OSX Snow Leopard
inline bool IsMacSnowLeopard()
{}

// Check if the OS is OSX Lion
inline bool IsMacLion()
{}

// Check if the OS is OSX Mountain Lion
inline bool IsMacMountainLion()
{}

// Check if the OS is OSX Mavericks
inline bool IsMacMavericks()
{}

// Check if the OS is OSX Yosemite
inline bool IsMacYosemite()
{}

// Check if the OS is OSX El Capitan
inline bool IsMacElCapitan()
{}

// Check if the OS is OSX Sierra
inline bool IsMacSierra()
{}

// Check if the OS is OSX High Sierra
inline bool IsMacHighSierra()
{}

// Check if the OS is OSX Mojave
inline bool IsMacMojave()
{}

// Generic function call to populate the SystemInfo struct. This function will
// also cache the SystemInfo struct for future calls. Returns false if the
// struct was not fully populated. Guaranteed to set sysInfo to a valid pointer
inline bool GetGPUTestSystemInfo(SystemInfo **sysInfo)
{}

// Get the active GPUDeviceInfo from the SystemInfo struct.
// Returns false if devInfo is not guaranteed to be set to the active device.
inline bool GetActiveGPU(GPUDeviceInfo **devInfo)
{}

// Get the vendor ID of the active GPU from the SystemInfo struct.
// Returns 0 if there is an error.
inline VendorID GetActiveGPUVendorID()
{}

// Get the device ID of the active GPU from the SystemInfo struct.
// Returns 0 if there is an error.
inline DeviceID GetActiveGPUDeviceID()
{}

// Check whether the active GPU is NVIDIA.
inline bool IsNVIDIA()
{}

// Check whether the active GPU is AMD.
inline bool IsAMD()
{}

// Check whether the active GPU is Intel.
inline bool IsIntel()
{}

// Check whether the active GPU is VMWare.
inline bool IsVMWare()
{}

// Check whether the active GPU is Apple.
inline bool IsAppleGPU()
{}

// Check whether this is a debug build.
inline bool IsDebug()
{}

// Check whether this is a release build.
inline bool IsRelease()
{}

// Check whether the system is a specific Android device based on the name.
inline bool IsAndroidDevice(const std::string &deviceName)
{}

// Check whether the system is a Nexus 5X device.
inline bool IsNexus5X()
{}

// Check whether the system is a Pixel 2 device.
inline bool IsPixel2()
{}

// Check whether the system is a Pixel 2XL device.
inline bool IsPixel2XL()
{}

inline bool IsPixel4()
{}

inline bool IsPixel4XL()
{}

inline bool IsPixel6()
{}

inline bool IsPixel7()
{}

inline bool IsOppoFlipN2()
{}

inline bool IsMaliG710()
{}

inline bool IsGalaxyA23()
{}

inline bool IsGalaxyA34()
{}

inline bool IsGalaxyA54()
{}

inline bool IsGalaxyS22()
{}

inline bool IsGalaxyS23()
{}

inline bool IsGalaxyS24()
{}

inline bool IsGalaxyQualcomm()
{}

inline bool IsFindX6()
{}

inline bool IsPineapple()
{}

// Check whether the active GPU is a specific device based on the string device ID.
inline bool IsDeviceIdGPU(const std::string &gpuDeviceId)
{}

// Check whether the active GPU is a NVIDIA Quadro P400
inline bool IsNVIDIAQuadroP400()
{}

// Check whether the active GPU is a NVIDIA GTX 1660
inline bool IsNVIDIAGTX1660()
{}

// Check whether the backend API has been set to D3D9 in the constructor
inline bool IsD3D9(const GPUTestConfig::API &api)
{}

// Check whether the backend API has been set to D3D11 in the constructor
inline bool IsD3D11(const GPUTestConfig::API &api)
{}

// Check whether the backend API has been set to OpenGL in the constructor
inline bool IsGLDesktop(const GPUTestConfig::API &api)
{}

// Check whether the backend API has been set to OpenGLES in the constructor
inline bool IsGLES(const GPUTestConfig::API &api)
{}

// Check whether the backend API has been set to Vulkan in the constructor
inline bool IsVulkan(const GPUTestConfig::API &api)
{}

inline bool IsSwiftShader(const GPUTestConfig::API &api)
{}

// Check whether the backend API has been set to Metal in the constructor
inline bool IsMetal(const GPUTestConfig::API &api)
{}

inline bool IsWgpu(const GPUTestConfig::API &api)
{}

}  // anonymous namespace

// Load all conditions in the constructor since this data will not change during a test set.
GPUTestConfig::GPUTestConfig() :{}

GPUTestConfig::GPUTestConfig(bool isSwiftShader)
{}

// If the constructor is passed an API, load those conditions as well
GPUTestConfig::GPUTestConfig(const API &api, uint32_t preRotation)
    :{}

// Return a const reference to the list of all pre-calculated conditions.
const GPUTestConfig::ConditionArray &GPUTestConfig::getConditions() const
{}

}  // namespace angle