Vulkan: Load functions for surface extensions we support.

Previously the surface extensions were only enabled so we could import
VkSurfaceKHR's created from GLFW. To implement the webgpu.h
surface-based swapchains, we are going to use the extension entrypoints
too.

This changes vulkan_platform.h to set defines that make vulkan.h expose
the entrypoints and datatypes for all the Vulkan extensions we might
care about for a given compilation configuration.

Bug: dawn:269
Change-Id: If4202ff5e31c816eccb5f5381bd36b660a3b6c5b
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/17964
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
This commit is contained in:
Corentin Wallez
2020-03-27 16:50:59 +00:00
committed by Commit Bot service account
parent 12944c84c9
commit ba53617f6f
4 changed files with 68 additions and 26 deletions

12
third_party/BUILD.gn vendored
View File

@@ -27,18 +27,6 @@ config("khronos_headers_public") {
config("vulkan_headers_config") {
include_dirs = [ "khronos" ]
if (is_win) {
defines = [ "VK_USE_PLATFORM_WIN32_KHR" ]
}
if (is_linux && !is_chromeos) {
defines = [ "VK_USE_PLATFORM_XCB_KHR" ]
}
if (is_android) {
defines = [ "VK_USE_PLATFORM_ANDROID_KHR" ]
}
if (is_fuchsia) {
defines = [ "VK_USE_PLATFORM_FUCHSIA" ]
}
}
source_set("vulkan_headers") {