mirror of
https://github.com/godotengine/godot-angle-static.git
synced 2026-01-06 02:09:55 +03:00
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/954403 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Yuly Novikov <ynovikov@chromium.org>
This commit is contained in:
3
BUILD.gn
3
BUILD.gn
@@ -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
|
|||||||
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.
|
||||||
@@ -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") {
|
|||||||
}
|
}
|
||||||
|
|
||||||
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",
|
||||||
|
|||||||
Reference in New Issue
Block a user