21 static constexpr const char* kSwiftShaderICDJSON =
"vk_swiftshader_icd.json";
22 static constexpr const char* kVulkanICDFileNamesEnvVariableKey =
24 const auto executable_directory_path =
26 FML_CHECK(executable_directory_path.first);
27 const auto executable_directory =
30 FML_CHECK(executable_directory.is_valid());
33 {executable_directory_path.second, kSwiftShaderICDJSON});
36 ::SetEnvironmentVariableA(kVulkanICDFileNamesEnvVariableKey,
40 const auto success = ::setenv(kVulkanICDFileNamesEnvVariableKey,
46 <<
"Could not set the environment variable to use SwiftShader.";
49 <<
"Was asked to use SwiftShader but could not find the installable "
50 "client driver (ICD) for the locally built SwiftShader.";