Lines Matching +full:build +full:- +full:std
7 // http://www.apache.org/licenses/LICENSE-2.0
21 namespace fs = std::filesystem;
65 ScopedSetEnvVar(std::string name) in ScopedSetEnvVar()
71 ScopedSetEnvVar(std::string name, std::string value) in ScopedSetEnvVar()
82 void set(std::string value) in set()
89 putEnv((name + std::string("=") + value).c_str()); in set()
96 putEnv((name + std::string("=") + oldValue).c_str()); in restore()
120 std::string name;
121 std::string oldValue;
122 std::string envCopy;
134 std::ofstream fout(icdFileName); in ScopedSetIcdFilenames()
157 std::vector<const char *> getDriverPaths() in getDriverPaths()
161 // The DLL is delay loaded (see BUILD.gn), so we can load in getDriverPaths()
169 return { "./build/Release_x64/vk_swiftshader.dll", in getDriverPaths()
170 "./build/Release/vk_swiftshader.dll", in getDriverPaths()
171 "./build/RelWithDebInfo/vk_swiftshader.dll", in getDriverPaths()
174 return { "./build/Release_Win32/vk_swiftshader.dll", in getDriverPaths()
175 "./build/Release/vk_swiftshader.dll", in getDriverPaths()
176 "./build/RelWithDebInfo/vk_swiftshader.dll", in getDriverPaths()
181 return { "./build/Debug_x64/vk_swiftshader.dll", in getDriverPaths()
182 "./build/Debug/vk_swiftshader.dll", in getDriverPaths()
185 return { "./build/Debug_Win32/vk_swiftshader.dll", in getDriverPaths()
186 "./build/Debug/vk_swiftshader.dll", in getDriverPaths()
191 return { "./build/Darwin/libvk_swiftshader.dylib", in getDriverPaths()
195 return { "./build/Linux/libvk_swiftshader.so", in getDriverPaths()
212 std::ifstream f(path); in fileExists()
216 std::string findDriverPath() in findDriverPath()
225 // On Linux-based OSes, the lib path may be resolved by dlopen in findDriverPath()
234 return std::string{ libPath } + "/" + path; in findDriverPath()
257 assert(dl && dl->success()); in initialize()
259 …PFN_vkGetInstanceProcAddr vkGetInstanceProcAddr = dl->getProcAddress<PFN_vkGetInstanceProcAddr>("v… in initialize()
263 std::vector<const char *> extensionNames in initialize()
277 auto addLayerIfAvailable = [](std::vector<const char *> &layers, const char *layer) { in initialize()
279 if(std::find_if(layerProperties.begin(), layerProperties.end(), [layer](auto &lp) { in initialize()
283 //std::cout << "Enabled layer: " << layer << std::endl; in initialize()
288 std::vector<const char *> layerNames; in initialize()
320 void *pUserData) -> VkBool32 { in initialize()
322 std::cerr << "[DebugInfoCallback] " << pCallbackData->pMessage << std::endl; in initialize()
331 std::vector<vk::PhysicalDevice> physicalDevices = instance.enumeratePhysicalDevices(); in initialize()
341 std::vector<const char *> deviceExtensions = { in initialize()
356 std::unique_ptr<vk::DynamicLoader> VulkanTester::loadDriver() in loadDriver()
360 return std::make_unique<vk::DynamicLoader>(); in loadDriver()
368 return std::make_unique<vk::DynamicLoader>(driverPath); in loadDriver()
374 setIcdFilenames = std::make_unique<ScopedSetIcdFilenames>(driverPath.c_str()); in loadDriver()
376 std::unique_ptr<vk::DynamicLoader> dl; in loadDriver()
380 dl = std::make_unique<vk::DynamicLoader>(); in loadDriver()
382 catch(std::exception &ex) in loadDriver()
384 std::cerr << "vk::DynamicLoader exception: " << ex.what() << std::endl; in loadDriver()
385 …std::cerr << "Falling back to loading SwiftShader directly (i.e. no validation layers)" << std::en… in loadDriver()
386 dl = std::make_unique<vk::DynamicLoader>(driverPath); in loadDriver()
389 dl = std::make_unique<vk::DynamicLoader>(); in loadDriver()