Fixes Dawn to use custom Vulkan loader on Linux systems.

- Adds system utility to get the module directory for dawn native.
- Updates Vulkan backend to use the module directory to find loader.
- Test ran on NVIDIA GTX 1660 here: https://chromium-swarm.appspot.com/task?id=576d77991add7c10.

Bug: dawn:1191
Change-Id: I7c577008b5252ac94f38c8cdb56f7e8d8a0aa956
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/70860
Commit-Queue: Loko Kung <lokokung@google.com>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
This commit is contained in:
Loko Kung
2021-11-29 18:18:58 +00:00
committed by Dawn LUCI CQ
parent 11ee0d24f5
commit 349062fb72
6 changed files with 65 additions and 9 deletions

View File

@@ -15,8 +15,8 @@
import("//build_overrides/build.gni")
if (build_with_chromium) {
import("//build/config/sanitizers/sanitizers.gni")
import("//build/config/ozone.gni")
import("//build/config/sanitizers/sanitizers.gni")
dawn_use_x11 = ozone_platform_x11
} else {
@@ -97,7 +97,8 @@ declare_args() {
# Uses our built version of the Vulkan loader on platforms where we can't
# assume to have one present at the system level.
dawn_enable_vulkan_loader = dawn_enable_vulkan && is_mac
dawn_enable_vulkan_loader =
dawn_enable_vulkan && (is_mac || (is_linux && !is_android))
}
# UWP only supports CoreWindow for windowing

View File

@@ -63,8 +63,7 @@ if (!defined(dawn_swiftshader_dir)) {
}
if (!defined(dawn_vulkan_loader_dir)) {
# Default to the Vulkan loader not being available.
dawn_vulkan_loader_dir = ""
dawn_vulkan_loader_dir = "//third_party/vulkan-deps/vulkan-loader/src"
}
if (!defined(dawn_vulkan_validation_layers_dir)) {