Support running Vulkan unit tests from the output directory
This also fixes running them from within Visual Studio without requiring
setting any environment variables.
Change-Id: I5592b2d6a0abfeaeffbe1b788529c77adf5764ed
Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/35629
Presubmit-Ready: Nicolas Capens <nicolascapens@google.com>
Reviewed-by: Ben Clayton <bclayton@google.com>
Reviewed-by: Alexis Hétu <sugoi@google.com>
Kokoro-Presubmit: kokoro <noreply+kokoro@google.com>
Tested-by: Nicolas Capens <nicolascapens@google.com>
diff --git a/tests/VulkanUnitTests/Driver.cpp b/tests/VulkanUnitTests/Driver.cpp
index d5d40cd..e216d74 100644
--- a/tests/VulkanUnitTests/Driver.cpp
+++ b/tests/VulkanUnitTests/Driver.cpp
@@ -64,15 +64,16 @@
#else
return load("./build/Release_Win32/vk_swiftshader.dll") ||
#endif
- load("./build/Release/libvk_swiftshader.dll");
+ load("./build/Release/libvk_swiftshader.dll") ||
#else
#if defined(_WIN64)
return load("./build/Debug_x64/vk_swiftshader.dll") ||
#else
return load("./build/Debug_Win32/vk_swiftshader.dll") ||
#endif
- load("./build/Debug/libvk_swiftshader.dll");
+ load("./build/Debug/libvk_swiftshader.dll") ||
#endif
+ load("./libvk_swiftshader.dll");
#elif OS_MAC
return load("./build/Darwin/libvk_swiftshader.dylib") ||
load("swiftshader/libvk_swiftshader.dylib") ||