Commit 13816d2d by Antonio Maiorano Committed by Commit Bot

Move vulkan_headers/entry_points to common/vulkan

This will allow us to move common headers, such as extension headers, to common/vulkan. Bug: b/159027603 Bug: b/154620295 Change-Id: I1ff73dc5b7ee8f7dfb3ac0c5f30bd4b3a8183aeb Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2248205 Commit-Queue: Jamie Madill <jmadill@chromium.org> Commit-Queue: Antonio Maiorano <amaiorano@google.com> Reviewed-by: 's avatarTim Van Patten <timvp@google.com> Reviewed-by: 's avatarJamie Madill <jmadill@chromium.org>
parent 9e83c151
...@@ -340,8 +340,7 @@ angle_static_library("angle_gpu_info_util") { ...@@ -340,8 +340,7 @@ angle_static_library("angle_gpu_info_util") {
if (is_fuchsia) { if (is_fuchsia) {
sources += libangle_gpu_info_util_fuchsia_sources sources += libangle_gpu_info_util_fuchsia_sources
deps += deps += [ "$angle_root/src/common/vulkan:angle_vulkan_entry_points" ]
[ "$angle_root/src/libANGLE/renderer/vulkan:angle_vulkan_entry_points" ]
} }
if (is_win) { if (is_win) {
......
...@@ -7,6 +7,47 @@ import("../../../gni/angle.gni") ...@@ -7,6 +7,47 @@ import("../../../gni/angle.gni")
assert(angle_enable_vulkan) assert(angle_enable_vulkan)
config("angle_vulkan_lib_android") {
if (is_android) {
libs = [ "vulkan" ]
}
}
config("angle_vulkan_headers_config") {
if (angle_shared_libvulkan) {
defines = [ "ANGLE_SHARED_LIBVULKAN=1" ]
}
}
angle_source_set("angle_vulkan_headers") {
sources = [ "vk_headers.h" ]
if (angle_shared_libvulkan) {
public_deps = [ "$angle_root/src/third_party/volk:volk" ]
} else {
public_deps =
[ "$angle_root/third_party/vulkan-headers/src:vulkan_headers" ]
}
public_configs = [ ":angle_vulkan_headers_config" ]
}
group("angle_vulkan_entry_points") {
public_configs = [ ":angle_vulkan_lib_android" ]
public_deps = [ ":angle_vulkan_headers" ]
if (is_fuchsia) {
public_deps += [
"$angle_root/src/common/fuchsia_egl",
"//third_party/fuchsia-sdk:vulkan_base",
"//third_party/fuchsia-sdk/sdk/pkg/vulkan",
]
} else if (!is_android && !is_ggp) {
if (angle_shared_libvulkan) {
data_deps = [ "$angle_root/third_party/vulkan-loader/src:libvulkan" ]
} else {
deps = [ "$angle_root/third_party/vulkan-loader/src:libvulkan" ]
}
}
}
angle_source_set("vulkan") { angle_source_set("vulkan") {
sources = [ sources = [
"vulkan_icd.cpp", "vulkan_icd.cpp",
...@@ -14,8 +55,8 @@ angle_source_set("vulkan") { ...@@ -14,8 +55,8 @@ angle_source_set("vulkan") {
] ]
public_deps = [ public_deps = [
":angle_vulkan_entry_points",
"$angle_root:angle_common", "$angle_root:angle_common",
"$angle_root/src/libANGLE/renderer/vulkan:angle_vulkan_entry_points",
] ]
defines = [ defines = [
......
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
#include "common/Optional.h" #include "common/Optional.h"
#include "common/angleutils.h" #include "common/angleutils.h"
#include "libANGLE/renderer/vulkan/vk_headers.h" #include "common/vulkan/vk_headers.h"
namespace angle namespace angle
{ {
......
...@@ -158,47 +158,6 @@ if (is_mac) { ...@@ -158,47 +158,6 @@ if (is_mac) {
] ]
} }
config("angle_vulkan_lib_android") {
if (is_android) {
libs = [ "vulkan" ]
}
}
config("angle_vulkan_headers_config") {
if (angle_shared_libvulkan) {
defines = [ "ANGLE_SHARED_LIBVULKAN=1" ]
}
}
angle_source_set("angle_vulkan_headers") {
sources = [ "vk_headers.h" ]
if (angle_shared_libvulkan) {
public_deps = [ "$angle_root/src/third_party/volk:volk" ]
} else {
public_deps =
[ "$angle_root/third_party/vulkan-headers/src:vulkan_headers" ]
}
public_configs = [ ":angle_vulkan_headers_config" ]
}
group("angle_vulkan_entry_points") {
public_configs = [ ":angle_vulkan_lib_android" ]
public_deps = [ ":angle_vulkan_headers" ]
if (is_fuchsia) {
public_deps += [
"$angle_root/src/common/fuchsia_egl",
"//third_party/fuchsia-sdk:vulkan_base",
"//third_party/fuchsia-sdk/sdk/pkg/vulkan",
]
} else if (!is_android && !is_ggp) {
if (angle_shared_libvulkan) {
data_deps = [ "$angle_root/third_party/vulkan-loader/src:libvulkan" ]
} else {
deps = [ "$angle_root/third_party/vulkan-loader/src:libvulkan" ]
}
}
}
config("angle_vulkan_backend_config") { config("angle_vulkan_backend_config") {
defines = [ "ANGLE_ENABLE_VULKAN" ] defines = [ "ANGLE_ENABLE_VULKAN" ]
if (angle_enable_swiftshader) { if (angle_enable_swiftshader) {
...@@ -214,7 +173,7 @@ config("angle_vulkan_backend_config") { ...@@ -214,7 +173,7 @@ config("angle_vulkan_backend_config") {
angle_source_set("angle_vk_mem_alloc_wrapper") { angle_source_set("angle_vk_mem_alloc_wrapper") {
deps = [ deps = [
":angle_vulkan_headers", "$angle_root/src/common/vulkan:angle_vulkan_headers",
"$angle_vulkan_memory_allocator_dir", "$angle_vulkan_memory_allocator_dir",
] ]
sources = [ sources = [
...@@ -235,8 +194,6 @@ angle_source_set("angle_vulkan_backend") { ...@@ -235,8 +194,6 @@ angle_source_set("angle_vulkan_backend") {
libs = [] libs = []
deps = [ deps = [
":angle_vk_mem_alloc_wrapper", ":angle_vk_mem_alloc_wrapper",
":angle_vulkan_entry_points",
":angle_vulkan_headers",
"$angle_root:angle_gpu_info_util", "$angle_root:angle_gpu_info_util",
"$angle_root:angle_image_util", "$angle_root:angle_image_util",
"$angle_spirv_tools_dir:spvtools_val", "$angle_spirv_tools_dir:spvtools_val",
...@@ -245,6 +202,8 @@ angle_source_set("angle_vulkan_backend") { ...@@ -245,6 +202,8 @@ angle_source_set("angle_vulkan_backend") {
"$angle_root:angle_glslang_wrapper", "$angle_root:angle_glslang_wrapper",
"$angle_root:libANGLE_headers", "$angle_root:libANGLE_headers",
"$angle_root/src/common/vulkan", "$angle_root/src/common/vulkan",
"$angle_root/src/common/vulkan:angle_vulkan_entry_points",
"$angle_root/src/common/vulkan:angle_vulkan_headers",
] ]
public_configs = [ ":angle_vulkan_backend_config" ] public_configs = [ ":angle_vulkan_backend_config" ]
......
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
#include <queue> #include <queue>
#include <thread> #include <thread>
#include "libANGLE/renderer/vulkan/vk_headers.h" #include "common/vulkan/vk_headers.h"
#include "libANGLE/renderer/vulkan/vk_helpers.h" #include "libANGLE/renderer/vulkan/vk_helpers.h"
namespace rx namespace rx
......
...@@ -13,12 +13,12 @@ ...@@ -13,12 +13,12 @@
#include <condition_variable> #include <condition_variable>
#include "common/PackedEnums.h" #include "common/PackedEnums.h"
#include "common/vulkan/vk_headers.h"
#include "libANGLE/renderer/ContextImpl.h" #include "libANGLE/renderer/ContextImpl.h"
#include "libANGLE/renderer/renderer_utils.h" #include "libANGLE/renderer/renderer_utils.h"
#include "libANGLE/renderer/vulkan/OverlayVk.h" #include "libANGLE/renderer/vulkan/OverlayVk.h"
#include "libANGLE/renderer/vulkan/PersistentCommandPool.h" #include "libANGLE/renderer/vulkan/PersistentCommandPool.h"
#include "libANGLE/renderer/vulkan/RendererVk.h" #include "libANGLE/renderer/vulkan/RendererVk.h"
#include "libANGLE/renderer/vulkan/vk_headers.h"
#include "libANGLE/renderer/vulkan/vk_helpers.h" #include "libANGLE/renderer/vulkan/vk_helpers.h"
namespace angle namespace angle
......
...@@ -12,6 +12,7 @@ ...@@ -12,6 +12,7 @@
#include <array> #include <array>
#include "common/debug.h" #include "common/debug.h"
#include "common/vulkan/vk_headers.h"
#include "libANGLE/Context.h" #include "libANGLE/Context.h"
#include "libANGLE/Display.h" #include "libANGLE/Display.h"
#include "libANGLE/formatutils.h" #include "libANGLE/formatutils.h"
...@@ -23,7 +24,6 @@ ...@@ -23,7 +24,6 @@
#include "libANGLE/renderer/vulkan/ResourceVk.h" #include "libANGLE/renderer/vulkan/ResourceVk.h"
#include "libANGLE/renderer/vulkan/SurfaceVk.h" #include "libANGLE/renderer/vulkan/SurfaceVk.h"
#include "libANGLE/renderer/vulkan/vk_format_utils.h" #include "libANGLE/renderer/vulkan/vk_format_utils.h"
#include "libANGLE/renderer/vulkan/vk_headers.h"
#include "libANGLE/trace.h" #include "libANGLE/trace.h"
namespace rx namespace rx
......
...@@ -8,10 +8,10 @@ ...@@ -8,10 +8,10 @@
#include "libANGLE/renderer/vulkan/MemoryObjectVk.h" #include "libANGLE/renderer/vulkan/MemoryObjectVk.h"
#include "common/debug.h" #include "common/debug.h"
#include "common/vulkan/vk_headers.h"
#include "libANGLE/Context.h" #include "libANGLE/Context.h"
#include "libANGLE/renderer/vulkan/ContextVk.h" #include "libANGLE/renderer/vulkan/ContextVk.h"
#include "libANGLE/renderer/vulkan/RendererVk.h" #include "libANGLE/renderer/vulkan/RendererVk.h"
#include "libANGLE/renderer/vulkan/vk_headers.h"
#include "vulkan/vulkan_fuchsia_ext.h" #include "vulkan/vulkan_fuchsia_ext.h"
#if !defined(ANGLE_PLATFORM_WINDOWS) #if !defined(ANGLE_PLATFORM_WINDOWS)
......
...@@ -10,9 +10,9 @@ ...@@ -10,9 +10,9 @@
#ifndef LIBANGLE_RENDERER_VULKAN_RENDERTARGETVK_H_ #ifndef LIBANGLE_RENDERER_VULKAN_RENDERTARGETVK_H_
#define LIBANGLE_RENDERER_VULKAN_RENDERTARGETVK_H_ #define LIBANGLE_RENDERER_VULKAN_RENDERTARGETVK_H_
#include "common/vulkan/vk_headers.h"
#include "libANGLE/FramebufferAttachment.h" #include "libANGLE/FramebufferAttachment.h"
#include "libANGLE/renderer/renderer_utils.h" #include "libANGLE/renderer/renderer_utils.h"
#include "libANGLE/renderer/vulkan/vk_headers.h"
#include "libANGLE/renderer/vulkan/vk_helpers.h" #include "libANGLE/renderer/vulkan/vk_helpers.h"
namespace rx namespace rx
......
...@@ -22,6 +22,7 @@ ...@@ -22,6 +22,7 @@
#include "common/PackedEnums.h" #include "common/PackedEnums.h"
#include "common/PoolAlloc.h" #include "common/PoolAlloc.h"
#include "common/angleutils.h" #include "common/angleutils.h"
#include "common/vulkan/vk_headers.h"
#include "common/vulkan/vulkan_icd.h" #include "common/vulkan/vulkan_icd.h"
#include "libANGLE/BlobCache.h" #include "libANGLE/BlobCache.h"
#include "libANGLE/Caps.h" #include "libANGLE/Caps.h"
...@@ -30,7 +31,6 @@ ...@@ -30,7 +31,6 @@
#include "libANGLE/renderer/vulkan/ResourceVk.h" #include "libANGLE/renderer/vulkan/ResourceVk.h"
#include "libANGLE/renderer/vulkan/UtilsVk.h" #include "libANGLE/renderer/vulkan/UtilsVk.h"
#include "libANGLE/renderer/vulkan/vk_format_utils.h" #include "libANGLE/renderer/vulkan/vk_format_utils.h"
#include "libANGLE/renderer/vulkan/vk_headers.h"
#include "libANGLE/renderer/vulkan/vk_helpers.h" #include "libANGLE/renderer/vulkan/vk_helpers.h"
#include "libANGLE/renderer/vulkan/vk_internal_shaders_autogen.h" #include "libANGLE/renderer/vulkan/vk_internal_shaders_autogen.h"
#include "libANGLE/renderer/vulkan/vk_mem_alloc_wrapper.h" #include "libANGLE/renderer/vulkan/vk_mem_alloc_wrapper.h"
......
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
#define LIBANGLE_RENDERER_VULKAN_SECONDARYCOMMANDBUFFERVK_H_ #define LIBANGLE_RENDERER_VULKAN_SECONDARYCOMMANDBUFFERVK_H_
#include "common/PoolAlloc.h" #include "common/PoolAlloc.h"
#include "libANGLE/renderer/vulkan/vk_headers.h" #include "common/vulkan/vk_headers.h"
#include "libANGLE/renderer/vulkan/vk_wrapper.h" #include "libANGLE/renderer/vulkan/vk_wrapper.h"
namespace rx namespace rx
......
...@@ -10,9 +10,9 @@ ...@@ -10,9 +10,9 @@
#ifndef LIBANGLE_RENDERER_VULKAN_SURFACEVK_H_ #ifndef LIBANGLE_RENDERER_VULKAN_SURFACEVK_H_
#define LIBANGLE_RENDERER_VULKAN_SURFACEVK_H_ #define LIBANGLE_RENDERER_VULKAN_SURFACEVK_H_
#include "common/vulkan/vk_headers.h"
#include "libANGLE/renderer/SurfaceImpl.h" #include "libANGLE/renderer/SurfaceImpl.h"
#include "libANGLE/renderer/vulkan/RenderTargetVk.h" #include "libANGLE/renderer/vulkan/RenderTargetVk.h"
#include "libANGLE/renderer/vulkan/vk_headers.h"
#include "libANGLE/renderer/vulkan/vk_helpers.h" #include "libANGLE/renderer/vulkan/vk_helpers.h"
namespace rx namespace rx
......
...@@ -10,8 +10,8 @@ ...@@ -10,8 +10,8 @@
#ifndef LIBANGLE_RENDERER_VULKAN_VK_CAPS_UTILS_H_ #ifndef LIBANGLE_RENDERER_VULKAN_VK_CAPS_UTILS_H_
#define LIBANGLE_RENDERER_VULKAN_VK_CAPS_UTILS_H_ #define LIBANGLE_RENDERER_VULKAN_VK_CAPS_UTILS_H_
#include "common/vulkan/vk_headers.h"
#include "libANGLE/Config.h" #include "libANGLE/Config.h"
#include "libANGLE/renderer/vulkan/vk_headers.h"
namespace gl namespace gl
{ {
......
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and // See the License for the specific language governing permissions and
// limitations under the License. // limitations under the License.
#include "libANGLE/renderer/vulkan/vk_headers.h" #include "common/vulkan/vk_headers.h"
// THIS FILE SHOULD BE DELETED IF VK_EXT_provoking_vertex IS EVER ADDED TO THE VULKAN HEADERS // THIS FILE SHOULD BE DELETED IF VK_EXT_provoking_vertex IS EVER ADDED TO THE VULKAN HEADERS
#ifdef VK_EXT_provoking_vertex #ifdef VK_EXT_provoking_vertex
......
...@@ -9,11 +9,11 @@ ...@@ -9,11 +9,11 @@
#ifndef LIBANGLE_RENDERER_VULKAN_VK_FORMAT_UTILS_H_ #ifndef LIBANGLE_RENDERER_VULKAN_VK_FORMAT_UTILS_H_
#define LIBANGLE_RENDERER_VULKAN_VK_FORMAT_UTILS_H_ #define LIBANGLE_RENDERER_VULKAN_VK_FORMAT_UTILS_H_
#include "common/vulkan/vk_headers.h"
#include "libANGLE/formatutils.h" #include "libANGLE/formatutils.h"
#include "libANGLE/renderer/Format.h" #include "libANGLE/renderer/Format.h"
#include "libANGLE/renderer/copyvertex.h" #include "libANGLE/renderer/copyvertex.h"
#include "libANGLE/renderer/renderer_utils.h" #include "libANGLE/renderer/renderer_utils.h"
#include "libANGLE/renderer/vulkan/vk_headers.h"
#include "platform/FeaturesVk.h" #include "platform/FeaturesVk.h"
#include <array> #include <array>
......
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and // See the License for the specific language governing permissions and
// limitations under the License. // limitations under the License.
#include "libANGLE/renderer/vulkan/vk_headers.h" #include "common/vulkan/vk_headers.h"
// THIS FILE SHOULD BE DELETED IF VK_GOOGLE_sampler_filtering_precision IS EVER ADDED TO THE VULKAN // THIS FILE SHOULD BE DELETED IF VK_GOOGLE_sampler_filtering_precision IS EVER ADDED TO THE VULKAN
// HEADERS // HEADERS
......
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
#ifndef LIBANGLE_RENDERER_VULKAN_VK_MEM_ALLOC_WRAPPER_H_ #ifndef LIBANGLE_RENDERER_VULKAN_VK_MEM_ALLOC_WRAPPER_H_
#define LIBANGLE_RENDERER_VULKAN_VK_MEM_ALLOC_WRAPPER_H_ #define LIBANGLE_RENDERER_VULKAN_VK_MEM_ALLOC_WRAPPER_H_
#include "libANGLE/renderer/vulkan/vk_headers.h" #include "common/vulkan/vk_headers.h"
VK_DEFINE_HANDLE(VmaAllocator) VK_DEFINE_HANDLE(VmaAllocator)
VK_DEFINE_HANDLE(VmaAllocation) VK_DEFINE_HANDLE(VmaAllocation)
......
...@@ -11,8 +11,8 @@ ...@@ -11,8 +11,8 @@
#ifndef LIBANGLE_RENDERER_VULKAN_VK_WRAPPER_H_ #ifndef LIBANGLE_RENDERER_VULKAN_VK_WRAPPER_H_
#define LIBANGLE_RENDERER_VULKAN_VK_WRAPPER_H_ #define LIBANGLE_RENDERER_VULKAN_VK_WRAPPER_H_
#include "common/vulkan/vk_headers.h"
#include "libANGLE/renderer/renderer_utils.h" #include "libANGLE/renderer/renderer_utils.h"
#include "libANGLE/renderer/vulkan/vk_headers.h"
#include "libANGLE/renderer/vulkan/vk_mem_alloc_wrapper.h" #include "libANGLE/renderer/vulkan/vk_mem_alloc_wrapper.h"
#include "libANGLE/trace.h" #include "libANGLE/trace.h"
......
...@@ -13,8 +13,8 @@ ...@@ -13,8 +13,8 @@
#include <windows.h> #include <windows.h>
#include "common/vulkan/vk_headers.h"
#include "libANGLE/renderer/vulkan/vk_caps_utils.h" #include "libANGLE/renderer/vulkan/vk_caps_utils.h"
#include "libANGLE/renderer/vulkan/vk_headers.h"
#include "libANGLE/renderer/vulkan/win32/WindowSurfaceVkWin32.h" #include "libANGLE/renderer/vulkan/win32/WindowSurfaceVkWin32.h"
namespace rx namespace rx
......
...@@ -178,10 +178,7 @@ if (is_win || is_linux || is_mac || is_android || is_fuchsia) { ...@@ -178,10 +178,7 @@ if (is_win || is_linux || is_mac || is_android || is_fuchsia) {
"test_utils/VulkanExternalHelper.cpp", "test_utils/VulkanExternalHelper.cpp",
"test_utils/VulkanExternalHelper.h", "test_utils/VulkanExternalHelper.h",
] ]
deps += [ deps += [ "$angle_root/src/common/vulkan" ]
"$angle_root/src/common/vulkan",
"$angle_root/src/libANGLE/renderer/vulkan:angle_vulkan_entry_points",
]
} }
if (is_fuchsia) { if (is_fuchsia) {
...@@ -217,9 +214,7 @@ if (is_win || is_linux || is_mac || is_android) { ...@@ -217,9 +214,7 @@ if (is_win || is_linux || is_mac || is_android) {
if (angle_enable_vulkan) { if (angle_enable_vulkan) {
sources += angle_white_box_tests_vulkan_sources sources += angle_white_box_tests_vulkan_sources
deps += [ deps += [ "$angle_root/src/common/vulkan:angle_vulkan_entry_points" ]
"$angle_root/src/libANGLE/renderer/vulkan:angle_vulkan_entry_points",
]
} }
} }
} }
...@@ -278,7 +273,7 @@ if (is_win || is_linux || is_android || is_mac) { ...@@ -278,7 +273,7 @@ if (is_win || is_linux || is_android || is_mac) {
sources += angle_white_box_perf_tests_vulkan_sources sources += angle_white_box_perf_tests_vulkan_sources
deps += [ deps += [
"$angle_glslang_dir:glslang_sources", "$angle_glslang_dir:glslang_sources",
"$angle_root/src/libANGLE/renderer/vulkan:angle_vulkan_entry_points", "$angle_root/src/common/vulkan:angle_vulkan_entry_points",
] ]
} }
} }
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
#ifndef ANGLE_TESTS_TESTUTILS_VULKANEXTERNALHELPER_H_ #ifndef ANGLE_TESTS_TESTUTILS_VULKANEXTERNALHELPER_H_
#define ANGLE_TESTS_TESTUTILS_VULKANEXTERNALHELPER_H_ #define ANGLE_TESTS_TESTUTILS_VULKANEXTERNALHELPER_H_
#include "libANGLE/renderer/vulkan/vk_headers.h" #include "common/vulkan/vk_headers.h"
#include "vulkan/vulkan_fuchsia_ext.h" #include "vulkan/vulkan_fuchsia_ext.h"
namespace angle namespace angle
......
...@@ -60,7 +60,7 @@ ANGLE_REENABLE_EXTRA_SEMI_WARNING ...@@ -60,7 +60,7 @@ ANGLE_REENABLE_EXTRA_SEMI_WARNING
# include "vulkan/vk_sdk_platform.h" # include "vulkan/vk_sdk_platform.h"
#endif #endif
#include "libANGLE/renderer/vulkan/vk_headers.h" #include "common/vulkan/vk_headers.h"
/* Number of descriptor sets needs to be the same at alloc, */ /* Number of descriptor sets needs to be the same at alloc, */
/* pipeline layout creation, and descriptor set layout creation */ /* pipeline layout creation, and descriptor set layout creation */
......
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