Commit 40a945f2 by Yuly Novikov Committed by Commit Bot

Rename vulkan_loader to libvulkan

Also add a build argument to build it as a shared library. BUG=angleproject:2343 Change-Id: Ia590632b94d71b10d3ee64974fa4f5b4f00c3a70 Reviewed-on: https://chromium-review.googlesource.com/954403Reviewed-by: 's avatarJamie Madill <jmadill@chromium.org> Commit-Queue: Yuly Novikov <ynovikov@chromium.org>
parent 427071ea
...@@ -429,8 +429,7 @@ if (angle_enable_vulkan) { ...@@ -429,8 +429,7 @@ if (angle_enable_vulkan) {
"$angle_root/third_party/vulkan-validation-layers:vulkan_config", "$angle_root/third_party/vulkan-validation-layers:vulkan_config",
] ]
if (!is_android) { if (!is_android) {
deps += deps += [ "$angle_root/third_party/vulkan-validation-layers:libvulkan" ]
[ "$angle_root/third_party/vulkan-validation-layers:vulkan_loader" ]
data_deps += [ "$angle_root/third_party/vulkan-validation-layers:vulkan_gen_json_files" ] data_deps += [ "$angle_root/third_party/vulkan-validation-layers:vulkan_gen_json_files" ]
public_configs += [ "$angle_root/third_party/vulkan-validation-layers:vulkan_loader_config" ] public_configs += [ "$angle_root/third_party/vulkan-validation-layers:vulkan_loader_config" ]
} }
......
...@@ -24,3 +24,14 @@ export TRACE_LIBGL="/usr/lib/libGL.so.1" # may require a different path ...@@ -24,3 +24,14 @@ export TRACE_LIBGL="/usr/lib/libGL.so.1" # may require a different path
apitrace trace -o mytrace ./out/Debug/hello_triangle apitrace trace -o mytrace ./out/Debug/hello_triangle
qapitrace mytrace qapitrace mytrace
``` ```
## Running ANGLE under GAPID on Linux
[GAPID](https://github.com/google/gapid) can be used to capture trace of Vulkan commands on Linux.
For it to work, libvulkan has to be a shared library, instead of being statically linked into ANGLE, which is the default behavior.
This is done with the gn arg:
```
angle_shared_libvulkan = true
```
When capturing traces of gtest based tests built inside Chromium checkout, make sure to run the tests with `--single-process-tests` argument.
\ No newline at end of file
...@@ -31,6 +31,7 @@ declare_args() { ...@@ -31,6 +31,7 @@ declare_args() {
(current_cpu == "arm" && android32_ndk_api_level >= 24) || (current_cpu == "arm" && android32_ndk_api_level >= 24) ||
(current_cpu == "arm64" && android64_ndk_api_level >= 24) (current_cpu == "arm64" && android64_ndk_api_level >= 24)
} }
angle_shared_libvulkan = false
} }
declare_args() { declare_args() {
......
...@@ -273,7 +273,13 @@ config("vulkan_loader_config") { ...@@ -273,7 +273,13 @@ config("vulkan_loader_config") {
} }
if (!is_android) { if (!is_android) {
static_library("vulkan_loader") { if (angle_shared_libvulkan) {
library_type = "shared_library"
} else {
library_type = "static_library"
}
target(library_type, "libvulkan") {
sources = [ sources = [
"src/loader/cJSON.c", "src/loader/cJSON.c",
"src/loader/cJSON.h", "src/loader/cJSON.h",
......
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