Commit 5f869b74 by Jamie Madill Committed by Angle LUCI CQ

Revert "Vulkan: Load custom Vk Loader."

This reverts commit e6e99c54. Reason for revert: Seems to be flaking on linux-clang-rel: https://ci.chromium.org/ui/p/angle/builders/try/linux-clang-rel/22602/overview Original change's description: > Vulkan: Load custom Vk Loader. > > Uses a GN copy rule to duplicate the loader. Also updates volk to > load using the new custom loader. Once both are in place we can > go back and remove the copy. > > Bug: chromium:1219969 > Change-Id: I8c48d168a842539f7cdba1ebfdaf3b08c3e1990d > Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2982499 > Commit-Queue: Jamie Madill <jmadill@chromium.org> > Reviewed-by: Geoff Lang <geofflang@chromium.org> > Reviewed-by: Jonah Ryan-Davis <jonahr@google.com> Bug: chromium:1219969 Change-Id: Ib29014e728c1ce63c5e5bf7136ce19de7692964d No-Presubmit: true No-Tree-Checks: true No-Try: true Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2987874 Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com> Reviewed-by: 's avatarJamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
parent 3d8d1b77
...@@ -149,8 +149,7 @@ def flattened_target(target_name: str, descs: dict, stop_at_lib: bool =True) -> ...@@ -149,8 +149,7 @@ def flattened_target(target_name: str, descs: dict, stop_at_lib: bool =True) ->
return ((),) return ((),)
if dep_type == 'copy': if dep_type == 'copy':
# Note that the original script blocked deps in copy rules. assert not deps, (target_name, dep['deps'])
pass
else: else:
assert dep_type in EXPECTED_TYPES, (k, dep_type) assert dep_type in EXPECTED_TYPES, (k, dep_type)
for (k,v) in dep.items(): for (k,v) in dep.items():
......
...@@ -26,34 +26,6 @@ angle_source_set("angle_vulkan_headers") { ...@@ -26,34 +26,6 @@ angle_source_set("angle_vulkan_headers") {
public_configs = [ ":angle_vulkan_headers_config" ] public_configs = [ ":angle_vulkan_headers_config" ]
} }
# TODO(jmadill): Transition to custom name. http://crbug.com/1219969
if (!is_android && !is_fuchsia && !is_ggp) {
if (angle_shared_libvulkan) {
if (is_linux) {
_libvulkan_name = "libvulkan.so.1"
_libvulkan_ext = "so"
} else if (is_win) {
_libvulkan_name = "vulkan-1.dll"
_libvulkan_ext = "dll"
} else if (is_mac) {
_libvulkan_name = "libvulkan.dylib"
_libvulkan_ext = "dylib"
} else {
_libvulkan_name = "error"
_libvulkan_ext = "error"
}
copy("angle_libvulkan") {
deps = [ "$angle_vulkan_loader_dir:libvulkan" ]
sources = [ "$root_out_dir/$_libvulkan_name" ]
outputs = [ "$root_out_dir/vkloader.$_libvulkan_ext" ]
}
} else {
group("angle_libvulkan") {
deps = [ "$angle_vulkan_loader_dir:libvulkan" ]
}
}
}
group("angle_vulkan_entry_points") { group("angle_vulkan_entry_points") {
public_deps = [ ":angle_vulkan_headers" ] public_deps = [ ":angle_vulkan_headers" ]
if (is_fuchsia) { if (is_fuchsia) {
...@@ -64,8 +36,7 @@ group("angle_vulkan_entry_points") { ...@@ -64,8 +36,7 @@ group("angle_vulkan_entry_points") {
] ]
} else if (!is_android && !is_ggp) { } else if (!is_android && !is_ggp) {
if (angle_shared_libvulkan) { if (angle_shared_libvulkan) {
# TODO(jmadill): Transition to custom name. http://crbug.com/1219969 data_deps = [ "$angle_vulkan_loader_dir:libvulkan" ]
data_deps = [ ":angle_libvulkan" ]
} else { } else {
deps = [ "$angle_vulkan_loader_dir:libvulkan" ] deps = [ "$angle_vulkan_loader_dir:libvulkan" ]
} }
...@@ -95,8 +66,7 @@ angle_source_set("vulkan") { ...@@ -95,8 +66,7 @@ angle_source_set("vulkan") {
if (!is_android && !is_fuchsia && !is_ggp) { if (!is_android && !is_fuchsia && !is_ggp) {
if (angle_shared_libvulkan) { if (angle_shared_libvulkan) {
# TODO(jmadill): Transition to custom name. http://crbug.com/1219969 data_deps += [ "$angle_vulkan_loader_dir:libvulkan" ]
data_deps += [ ":angle_libvulkan" ]
} else { } else {
deps += [ "$angle_vulkan_loader_dir:libvulkan" ] deps += [ "$angle_vulkan_loader_dir:libvulkan" ]
} }
......
...@@ -18,9 +18,9 @@ ...@@ -18,9 +18,9 @@
#include "common/system_utils.h" #include "common/system_utils.h"
#if defined(ANGLE_PLATFORM_WINDOWS) #if defined(ANGLE_PLATFORM_WINDOWS)
const char *kLibVulkanNames[] = {"vkloader.dll"}; const char *kLibVulkanNames[] = {"vulkan-1.dll"};
#else #else
const char *kLibVulkanNames[] = {"vkloader.so", "libvulkan.so", "libvulkan.so.1"}; const char *kLibVulkanNames[] = {"libvulkan.so", "libvulkan.so.1"};
#endif #endif
namespace angle namespace angle
......
...@@ -606,7 +606,7 @@ ANGLERenderTest::ANGLERenderTest(const std::string &name, ...@@ -606,7 +606,7 @@ ANGLERenderTest::ANGLERenderTest(const std::string &name,
#if defined(ANGLE_USE_UTIL_LOADER) && !defined(ANGLE_PLATFORM_WINDOWS) #if defined(ANGLE_USE_UTIL_LOADER) && !defined(ANGLE_PLATFORM_WINDOWS)
mGLWindow = EGLWindow::New(testParams.majorVersion, testParams.minorVersion); mGLWindow = EGLWindow::New(testParams.majorVersion, testParams.minorVersion);
mEntryPointsLib.reset(angle::OpenSharedLibraryWithExtension( mEntryPointsLib.reset(angle::OpenSharedLibraryWithExtension(
GetNativeEGLLibraryNameWithExtension(), angle::SearchType::ApplicationDir)); GetNativeEGLLibraryNameWithExtension(), SearchType::SystemDir));
#else #else
std::cerr << "Not implemented." << std::endl; std::cerr << "Not implemented." << std::endl;
mSkipTest = true; mSkipTest = true;
......
...@@ -45,29 +45,26 @@ static PFN_vkVoidFunction vkGetDeviceProcAddrStub(void* context, const char* nam ...@@ -45,29 +45,26 @@ static PFN_vkVoidFunction vkGetDeviceProcAddrStub(void* context, const char* nam
VkResult volkInitialize(void) VkResult volkInitialize(void)
{ {
#if defined(_WIN32) #if defined(_WIN32)
HMODULE module = LoadLibraryA("vkloader.dll"); HMODULE module = LoadLibraryA("vulkan-1.dll");
if (!module) if (!module)
return VK_ERROR_INITIALIZATION_FAILED; return VK_ERROR_INITIALIZATION_FAILED;
// note: function pointer is cast through void function pointer to silence cast-function-type warning on gcc8 // note: function pointer is cast through void function pointer to silence cast-function-type warning on gcc8
vkGetInstanceProcAddr = (PFN_vkGetInstanceProcAddr)(void(*)(void))GetProcAddress(module, "vkGetInstanceProcAddr"); vkGetInstanceProcAddr = (PFN_vkGetInstanceProcAddr)(void(*)(void))GetProcAddress(module, "vkGetInstanceProcAddr");
#elif defined(__APPLE__) #elif defined(__APPLE__)
void* module = dlopen("vkloader.dylib", RTLD_NOW | RTLD_LOCAL); void* module = dlopen("libvulkan.dylib", RTLD_NOW | RTLD_LOCAL);
if (!module) if (!module)
return VK_ERROR_INITIALIZATION_FAILED; module = dlopen("libvulkan.1.dylib", RTLD_NOW | RTLD_LOCAL);
vkGetInstanceProcAddr = (PFN_vkGetInstanceProcAddr)dlsym(module, "vkGetInstanceProcAddr");
#elif defined(__Fuchsia__) || defined(ANDROID)
// Include extra fallbacks for Android and Fuchsia which use the native loader.
void* module = dlopen("libvulkan.so.1", RTLD_NOW | RTLD_LOCAL);
if (!module) if (!module)
module = dlopen("libvulkan.so", RTLD_NOW | RTLD_LOCAL); module = dlopen("libMoltenVK.dylib", RTLD_NOW | RTLD_LOCAL);
if (!module) if (!module)
return VK_ERROR_INITIALIZATION_FAILED; return VK_ERROR_INITIALIZATION_FAILED;
vkGetInstanceProcAddr = (PFN_vkGetInstanceProcAddr)dlsym(module, "vkGetInstanceProcAddr"); vkGetInstanceProcAddr = (PFN_vkGetInstanceProcAddr)dlsym(module, "vkGetInstanceProcAddr");
#else #else
void* module = dlopen("vkloader.so", RTLD_NOW | RTLD_LOCAL); void* module = dlopen("libvulkan.so.1", RTLD_NOW | RTLD_LOCAL);
if (!module)
module = dlopen("libvulkan.so", RTLD_NOW | RTLD_LOCAL);
if (!module) if (!module)
return VK_ERROR_INITIALIZATION_FAILED; return VK_ERROR_INITIALIZATION_FAILED;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment