#include "common/vulkan/vulkan_icd.h"
#include <functional>
#include <vector>
#include "common/Optional.h"
#include "common/bitset_utils.h"
#include "common/debug.h"
#include "common/system_utils.h"
namespace
{
void ResetEnvironmentVar(const char *variableName, const Optional<std::string> &value)
{ … }
}
namespace angle
{
namespace vk
{
namespace
{
[[maybe_unused]] const std::string WrapICDEnvironment(const char *icdEnvironment)
{ … }
[[maybe_unused]] constexpr char kLoaderLayersPathEnv[] = …;
[[maybe_unused]] constexpr char kLayerEnablesEnv[] = …;
constexpr char kLoaderICDFilenamesEnv[] = …;
constexpr char kANGLEPreferredDeviceEnv[] = …;
constexpr char kValidationLayersCustomSTypeListEnv[] = …;
constexpr char kNoDeviceSelect[] = …;
constexpr uint32_t kMockVendorID = …;
constexpr uint32_t kMockDeviceID = …;
constexpr char kMockDeviceName[] = …;
constexpr uint32_t kGoogleVendorID = …;
constexpr uint32_t kSwiftShaderDeviceID = …;
constexpr char kSwiftShaderDeviceName[] = …;
ICDFilterFunc;
ICDFilterFunc GetFilterForICD(vk::ICD preferredICD)
{ … }
}
ScopedVkLoaderEnvironment::ScopedVkLoaderEnvironment(bool enableDebugLayers, vk::ICD icd)
: … { … }
ScopedVkLoaderEnvironment::~ScopedVkLoaderEnvironment()
{ … }
bool ScopedVkLoaderEnvironment::setICDEnvironment(const char *icd)
{ … }
void ChoosePhysicalDevice(PFN_vkGetPhysicalDeviceProperties pGetPhysicalDeviceProperties,
const std::vector<VkPhysicalDevice> &physicalDevices,
vk::ICD preferredICD,
uint32_t preferredVendorID,
uint32_t preferredDeviceID,
VkPhysicalDevice *physicalDeviceOut,
VkPhysicalDeviceProperties *physicalDevicePropertiesOut)
{ … }
}
}