[fuchsia] Only use upstream vulkan headers (flutter/engine#44157)
Stop using the special fuchsia headers, as they are contributing to undefined behavior when building with LTO. They are also no longer needed. All relevant fuchsia extensions were upstreamed some time ago. In the process, engage in some cleanup which means the "vulkan_config" is also no longer needed. Rely on GN "public_deps" to provide the vulkan include paths to various source sets. See b/291462180 for more details on why this fix was neccesary.
This commit is contained in:
5
DEPS
5
DEPS
@@ -626,11 +626,6 @@ deps = {
|
||||
'src/third_party/pyyaml':
|
||||
Var('fuchsia_git') + '/third_party/pyyaml.git' + '@' + '25e97546488eee166b1abb229a27856cecd8b7ac',
|
||||
|
||||
# Upstream Khronos Vulkan Headers are part of vulkan-deps
|
||||
# Downstream Fuchsia Vulkan Headers (v1.2.198)
|
||||
'src/third_party/fuchsia-vulkan':
|
||||
Var('fuchsia_git') + '/third_party/Vulkan-Headers.git' + '@' + '32640ad82ef648768c706c9bf828b77123a09bc2',
|
||||
|
||||
'src/third_party/swiftshader':
|
||||
Var('swiftshader_git') + '/SwiftShader.git' + '@' + '5f9ed9b16931c7155171d31f75004f73f0a3abc8',
|
||||
|
||||
|
||||
@@ -1986,24 +1986,6 @@
|
||||
../../../third_party/freetype2/src/winfonts/rules.mk
|
||||
../../../third_party/freetype2/tests
|
||||
../../../third_party/freetype2/vms_make.com
|
||||
../../../third_party/fuchsia-vulkan/.cmake-format.py
|
||||
../../../third_party/fuchsia-vulkan/.git
|
||||
../../../third_party/fuchsia-vulkan/.gitattributes
|
||||
../../../third_party/fuchsia-vulkan/.gitignore
|
||||
../../../third_party/fuchsia-vulkan/BUILD.md
|
||||
../../../third_party/fuchsia-vulkan/CMakeLists.txt
|
||||
../../../third_party/fuchsia-vulkan/CODE_OF_CONDUCT.md
|
||||
../../../third_party/fuchsia-vulkan/OWNERS
|
||||
../../../third_party/fuchsia-vulkan/README.fuchsia
|
||||
../../../third_party/fuchsia-vulkan/README.md
|
||||
../../../third_party/fuchsia-vulkan/cmake
|
||||
../../../third_party/fuchsia-vulkan/registry/cgenerator.py
|
||||
../../../third_party/fuchsia-vulkan/registry/conventions.py
|
||||
../../../third_party/fuchsia-vulkan/registry/generator.py
|
||||
../../../third_party/fuchsia-vulkan/registry/genvk.py
|
||||
../../../third_party/fuchsia-vulkan/registry/reg.py
|
||||
../../../third_party/fuchsia-vulkan/registry/spec_tools/util.py
|
||||
../../../third_party/fuchsia-vulkan/registry/vkconventions.py
|
||||
../../../third_party/glfw/.appveyor.yml
|
||||
../../../third_party/glfw/.git
|
||||
../../../third_party/glfw/.gitattributes
|
||||
|
||||
@@ -32,6 +32,7 @@ source_set("graphics") {
|
||||
|
||||
public_configs = [ "//flutter:config" ]
|
||||
if (shell_enable_vulkan) {
|
||||
public_configs += [ "//flutter/vulkan:vulkan_config" ]
|
||||
public_deps =
|
||||
[ "//third_party/vulkan-deps/vulkan-headers/src:vulkan_headers" ]
|
||||
}
|
||||
}
|
||||
|
||||
@@ -7,8 +7,6 @@ executable("vulkan_glfw") {
|
||||
|
||||
sources = [ "src/main.cc" ]
|
||||
|
||||
configs += [ "//flutter/vulkan:vulkan_config" ]
|
||||
|
||||
deps = [
|
||||
"//flutter/shell/platform/embedder:embedder",
|
||||
"//third_party/glfw",
|
||||
|
||||
@@ -84,22 +84,19 @@ source_set("flow") {
|
||||
]
|
||||
|
||||
public_configs = [ "//flutter:config" ]
|
||||
if (shell_enable_vulkan) {
|
||||
public_configs += [ "//flutter/vulkan:vulkan_config" ]
|
||||
}
|
||||
|
||||
deps = [
|
||||
public_deps = [
|
||||
"//flutter/common",
|
||||
"//flutter/common/graphics",
|
||||
"//flutter/display_list",
|
||||
"//flutter/fml",
|
||||
"//third_party/skia",
|
||||
]
|
||||
|
||||
deps = [ "//third_party/skia" ]
|
||||
|
||||
if (impeller_supports_rendering) {
|
||||
deps += [ "//flutter/impeller" ]
|
||||
}
|
||||
|
||||
public_deps = [ "//flutter/display_list" ]
|
||||
}
|
||||
|
||||
if (enable_unittests) {
|
||||
|
||||
@@ -14,7 +14,7 @@ source_set("flutter_vma") {
|
||||
defines = [ "VMA_USE_STL_SHARED_MUTEX=0" ]
|
||||
}
|
||||
|
||||
deps = [
|
||||
public_deps = [
|
||||
"//third_party/vulkan-deps/vulkan-headers/src:vulkan_headers",
|
||||
"//third_party/vulkan_memory_allocator",
|
||||
]
|
||||
@@ -28,13 +28,10 @@ source_set("flutter_skia_vma") {
|
||||
"flutter_skia_vma.h",
|
||||
]
|
||||
|
||||
public_deps = [ ":flutter_vma" ]
|
||||
|
||||
deps = [
|
||||
public_deps = [
|
||||
":flutter_vma",
|
||||
"//flutter/fml",
|
||||
"//flutter/vulkan/procs",
|
||||
"//third_party/skia",
|
||||
"//third_party/vulkan-deps/vulkan-headers/src:vulkan_headers",
|
||||
"//third_party/vulkan_memory_allocator",
|
||||
]
|
||||
}
|
||||
|
||||
@@ -64,6 +64,8 @@
|
||||
#define VULKAN_HPP_NAMESPACE impeller::vk
|
||||
#define VULKAN_HPP_ASSERT_ON_RESULT(ignored) \
|
||||
{ [[maybe_unused]] auto res = (ignored); }
|
||||
#define VULKAN_HPP_NO_EXCEPTIONS
|
||||
|
||||
#include "vulkan/vulkan.hpp"
|
||||
|
||||
static_assert(VK_HEADER_VERSION >= 215, "Vulkan headers must not be too old.");
|
||||
|
||||
@@ -239,7 +239,6 @@ if (use_swiftshader) {
|
||||
|
||||
configs -= [ "//build/config/clang:extra_warnings" ]
|
||||
configs += [
|
||||
"//flutter/vulkan:vulkan_config", # for swiftshader
|
||||
"//third_party/angle:gl_prototypes",
|
||||
"//third_party/swiftshader:swiftshader_config",
|
||||
]
|
||||
|
||||
@@ -83,7 +83,7 @@ def RunGN(variant_dir, flags):
|
||||
def BuildNinjaTargets(variant_dir, targets):
|
||||
assert os.path.exists(os.path.join(_out_dir, variant_dir))
|
||||
|
||||
print('Running autoninja for targets: %s', targets)
|
||||
print('Running autoninja for targets: %s' % targets)
|
||||
RunExecutable(['autoninja', '-C',
|
||||
os.path.join(_out_dir, variant_dir)] + targets)
|
||||
|
||||
|
||||
@@ -4,17 +4,6 @@
|
||||
|
||||
import("//build/fuchsia/sdk.gni")
|
||||
|
||||
config("vulkan_config") {
|
||||
include_dirs = [ "//third_party/vulkan_memory_allocator/include" ]
|
||||
defines = [ "VULKAN_HPP_NO_EXCEPTIONS=1" ]
|
||||
if (is_fuchsia) {
|
||||
include_dirs += [ "//third_party/fuchsia-vulkan/include" ]
|
||||
defines += [ "VK_USE_PLATFORM_FUCHSIA=1" ]
|
||||
} else {
|
||||
include_dirs += [ "//third_party/vulkan-deps/vulkan-headers/src/include" ]
|
||||
}
|
||||
}
|
||||
|
||||
source_set("vulkan") {
|
||||
sources = [
|
||||
"vulkan_application.cc",
|
||||
@@ -59,10 +48,7 @@ source_set("vulkan") {
|
||||
"//third_party/skia",
|
||||
]
|
||||
|
||||
public_configs = [
|
||||
":vulkan_config",
|
||||
"//flutter:config",
|
||||
]
|
||||
public_configs = [ "//flutter:config" ]
|
||||
|
||||
public_deps =
|
||||
[ "//third_party/vulkan-deps/vulkan-headers/src:vulkan_headers" ]
|
||||
|
||||
@@ -12,10 +12,10 @@ source_set("procs") {
|
||||
"vulkan_proc_table.h",
|
||||
]
|
||||
|
||||
deps = [ "//flutter/fml" ]
|
||||
public_configs = [ "//flutter:config" ]
|
||||
|
||||
public_configs = [
|
||||
"//flutter/vulkan:vulkan_config",
|
||||
"//flutter:config",
|
||||
public_deps = [
|
||||
"//flutter/fml",
|
||||
"//third_party/vulkan-deps/vulkan-headers/src:vulkan_headers",
|
||||
]
|
||||
}
|
||||
|
||||
@@ -10,7 +10,6 @@
|
||||
#include <utility>
|
||||
#include <vector>
|
||||
|
||||
#include "flutter/flutter_vma/flutter_skia_vma.h"
|
||||
#include "flutter/fml/compiler_specific.h"
|
||||
#include "flutter/fml/macros.h"
|
||||
#include "flutter/vulkan/procs/vulkan_proc_table.h"
|
||||
|
||||
Reference in New Issue
Block a user