Skip to content

Commit

Permalink
angleproject: update to 2.1.r21358
Browse files Browse the repository at this point in the history
- enable vulkan backend
- linked with internal vulkan statically
  • Loading branch information
raedrizqie authored and Biswa96 committed Jul 13, 2023
1 parent 1600776 commit 59ad237
Show file tree
Hide file tree
Showing 8 changed files with 619 additions and 188 deletions.
187 changes: 91 additions & 96 deletions mingw-w64-angleproject/001-add-mingw-toolchain.patch

Large diffs are not rendered by default.

71 changes: 20 additions & 51 deletions mingw-w64-angleproject/002-buildflags-fixes.patch
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
diff --git a/BUILD.gn b/BUILD.gn
index 8da4a02ce..28956c4a3 100644
index 964d51123..37c43a2c1 100644
--- a/BUILD.gn
+++ b/BUILD.gn
@@ -14,7 +14,10 @@ if (angle_has_build) {
Expand All @@ -14,7 +14,7 @@ index 8da4a02ce..28956c4a3 100644

if (is_android) {
# android/rules.gni can only be imported for Android targets
@@ -83,10 +86,14 @@ if (angle_build_all) {
@@ -91,10 +94,14 @@ if (angle_build_all) {
":angle",
":angle_shader_translator",
":translator_fuzzer",
Expand All @@ -31,7 +31,7 @@ index 8da4a02ce..28956c4a3 100644
if (angle_enable_cl) {
deps += [ "$angle_root/src/libOpenCL:angle_cl" ]
}
@@ -250,7 +257,7 @@ config("constructor_and_destructor_warnings") {
@@ -271,7 +278,7 @@ config("constructor_and_destructor_warnings") {
config("extra_warnings") {
cflags = []

Expand All @@ -40,7 +40,7 @@ index 8da4a02ce..28956c4a3 100644

# Avoid failing builds for warnings enabled by Skia build.
if (defined(is_skia_standalone)) {
@@ -258,7 +265,7 @@ config("extra_warnings") {
@@ -279,7 +286,7 @@ config("extra_warnings") {
}

# Enable more default warnings on Windows.
Expand All @@ -49,7 +49,7 @@ index 8da4a02ce..28956c4a3 100644
cflags += [
"/we4244", # Conversion: possible loss of data.
"/we4312", # Conversion: greater size.
@@ -321,7 +328,7 @@ config("build_id_config") {
@@ -342,7 +349,7 @@ config("build_id_config") {
ldflags = [ "-Wl,--build-id" ]
}

Expand All @@ -58,7 +58,7 @@ index 8da4a02ce..28956c4a3 100644

if (_use_copy_compiler_dll) {
copy("copy_compiler_dll") {
@@ -430,7 +437,7 @@ angle_source_set("xxhash") {
@@ -451,7 +458,7 @@ angle_source_set("xxhash") {
}
}

Expand All @@ -67,7 +67,7 @@ index 8da4a02ce..28956c4a3 100644
fuzzer_test("xxhash_fuzzer") {
sources = [ "src/common/third_party/xxhash/xxhash_fuzzer.cpp" ]
deps = [ ":xxhash" ]
@@ -595,9 +602,9 @@ angle_static_library("angle_gpu_info_util") {
@@ -616,9 +623,9 @@ angle_static_library("angle_gpu_info_util") {
if (is_win) {
sources += libangle_gpu_info_util_win_sources
if (!angle_is_winuwp) {
Expand All @@ -79,29 +79,7 @@ index 8da4a02ce..28956c4a3 100644
}

if (is_linux || is_chromeos) {
@@ -692,7 +699,7 @@ template("translator_lib") {

if (!invoker.gl_d3d_only) {
if (angle_enable_vulkan || use_fuzzing_engine ||
- angle_enable_msl_through_spirv) {
+ angle_enable_metal) {
_needs_glsl_base = true
_needs_glsl_and_vulkan_base = true
_uses_spirv = true
@@ -727,11 +734,11 @@ template("translator_lib") {
":angle_common_shader_state",
":includes",
":preprocessor",
- "$angle_root/src/common/spirv:angle_spirv_headers",
]

if (_uses_spirv) {
deps += [
+ "$angle_root/src/common/spirv:angle_spirv_headers",
"$angle_root/src/common/spirv:angle_spirv_base",
"$angle_root/src/common/spirv:angle_spirv_builder",
"${angle_spirv_headers_dir}:spv_headers",
@@ -746,7 +753,7 @@ template("translator_lib") {
@@ -762,7 +769,7 @@ template("translator_lib") {
":angle_version_info",
]

Expand All @@ -110,7 +88,7 @@ index 8da4a02ce..28956c4a3 100644
# Necessary to suppress some system header xtree warnings in Release.
# For some reason this warning doesn't get triggered in Chromium
cflags = [ "/wd4718" ]
@@ -933,7 +940,7 @@ config("libANGLE_config") {
@@ -949,7 +956,7 @@ config("libANGLE_config") {
ldflags = []
defines += [ "LIBANGLE_IMPLEMENTATION" ]

Expand All @@ -119,7 +97,7 @@ index 8da4a02ce..28956c4a3 100644
cflags += [ "/wd4530" ] # C++ exception handler used, but unwind semantics
# are not enabled.
}
@@ -1030,8 +1037,8 @@ angle_source_set("libANGLE_no_vulkan") {
@@ -1053,8 +1060,8 @@ angle_source_set("libANGLE_no_vulkan") {

if (is_win && !angle_is_winuwp) {
libs += [
Expand All @@ -130,7 +108,7 @@ index 8da4a02ce..28956c4a3 100644
]
}

@@ -1056,7 +1063,7 @@ angle_source_set("libANGLE_no_vulkan") {
@@ -1079,7 +1086,7 @@ angle_source_set("libANGLE_no_vulkan") {
}

if (angle_enable_d3d11) {
Expand All @@ -153,18 +131,18 @@ index f9d54f2b3..40c1f8e63 100644
# Since Abseil does not mark symbols as exported, Chromium uses an alternate
# approach to scrape the symbols that need to be exported and generates .def
diff --git a/gni/angle.gni b/gni/angle.gni
index 0b431d651..ded475676 100644
index e946c6b6f..8862dc2f7 100644
--- a/gni/angle.gni
+++ b/gni/angle.gni
@@ -45,7 +45,6 @@ if (angle_has_build) {
@@ -48,7 +48,6 @@ if (angle_has_build) {
import("//build/config/ozone.gni") # import the ozone_platform_x11 variable
import("//build/config/sanitizers/sanitizers.gni")
import("//build_overrides/build.gni")
- import("//testing/test.gni")
if (is_android) {
import("//build/config/android/config.gni")
}
@@ -58,6 +57,12 @@ if (angle_has_build) {
@@ -61,6 +60,12 @@ if (angle_has_build) {
angle_vulkan_display_mode = "headless"
}

Expand All @@ -177,16 +155,7 @@ index 0b431d651..ded475676 100644
declare_args() {
angle_use_gbm = ozone_platform_gbm
angle_use_x11 = ozone_platform_x11 && !is_ggp && (is_linux || is_chromeos)
@@ -174,7 +179,7 @@ declare_args() {
angle_enable_vulkan =
angle_has_build &&
!(is_android && build_with_chromium && is_official_build) &&
- ((is_win && !angle_is_winuwp) ||
+ ((is_msvs && !angle_is_winuwp) ||
((is_linux || is_chromeos) &&
(angle_use_x11 || angle_use_wayland || angle_use_vulkan_display)) ||
is_android || is_fuchsia || is_ggp || angle_enable_msl_through_spirv)
@@ -196,7 +201,7 @@ declare_args() {
@@ -197,7 +202,7 @@ declare_args() {

declare_args() {
# ASTC emulation is only built on standalone non-android builds
Expand All @@ -195,7 +164,7 @@ index 0b431d651..ded475676 100644
}

declare_args() {
@@ -273,7 +278,7 @@ declare_args() {
@@ -274,7 +279,7 @@ declare_args() {
angle_vulkan_validation_layers_dir =
"$angle_root/third_party/vulkan-deps/vulkan-validation-layers/src"

Expand Down Expand Up @@ -238,7 +207,7 @@ index b5cbea8b7..054395801 100644
public_deps = [ ":angle_d3d_shared" ]
public_configs = [ ":angle_d3d11_backend_config" ]
diff --git a/src/tests/BUILD.gn b/src/tests/BUILD.gn
index 63bb1ba86..0e5e96253 100644
index 440d2e0dd..f686474b5 100644
--- a/src/tests/BUILD.gn
+++ b/src/tests/BUILD.gn
@@ -3,7 +3,6 @@
Expand All @@ -250,10 +219,10 @@ index 63bb1ba86..0e5e96253 100644
import("angle_unittests.gni")

diff --git a/util/BUILD.gn b/util/BUILD.gn
index 4954863c6..d5187631b 100644
index 89bfb5362..9a1fd3a07 100644
--- a/util/BUILD.gn
+++ b/util/BUILD.gn
@@ -360,7 +360,7 @@ foreach(is_shared_library,
@@ -379,7 +379,7 @@ foreach(is_shared_library,
}
}

Expand All @@ -262,7 +231,7 @@ index 4954863c6..d5187631b 100644
angle_source_set("angle_stack_walker") {
sources = [
"windows/third_party/StackWalker/src/StackWalker.cpp",
@@ -416,7 +416,7 @@ angle_source_set("angle_test_utils") {
@@ -435,7 +435,7 @@ angle_source_set("angle_test_utils") {
sources += [ "windows/test_utils_win.cpp" ]
if (angle_is_winuwp) {
sources += [ "windows/test_utils_winuwp.cpp" ]
Expand Down
30 changes: 15 additions & 15 deletions mingw-w64-angleproject/003-angle-src-fixes.patch
Original file line number Diff line number Diff line change
@@ -1,16 +1,3 @@
diff --git a/src/compiler/translator/Compiler.cpp b/src/compiler/translator/Compiler.cpp
index 37ca80a28..93b542bbb 100644
--- a/src/compiler/translator/Compiler.cpp
+++ b/src/compiler/translator/Compiler.cpp
@@ -1217,7 +1217,7 @@ bool TCompiler::checkAndSimplifyAST(TIntermBlock *root,

bool TCompiler::resizeClipAndCullDistanceBuiltins(TIntermBlock *root)
{
- auto resizeVariable = [=](const ImmutableString &name, uint32_t size, uint32_t maxSize) {
+ auto resizeVariable = [=, this](const ImmutableString &name, uint32_t size, uint32_t maxSize) {
// Skip if the variable is not used or implicitly has the maximum size
if (size == 0 || size == maxSize)
return true;
diff --git a/src/common/mathutil.h b/src/common/mathutil.h
index d142b35de..46b9eac13 100644
--- a/src/common/mathutil.h
Expand Down Expand Up @@ -57,11 +44,24 @@ index 0028331d9..e675c406b 100644
mDoc.AddMember(nameValue, std::move(value), mAllocator);
}
}
diff --git a/src/compiler/translator/Compiler.cpp b/src/compiler/translator/Compiler.cpp
index 485b4bd38..cbe275733 100644
--- a/src/compiler/translator/Compiler.cpp
+++ b/src/compiler/translator/Compiler.cpp
@@ -1213,7 +1213,7 @@ bool TCompiler::checkAndSimplifyAST(TIntermBlock *root,

bool TCompiler::resizeClipAndCullDistanceBuiltins(TIntermBlock *root)
{
- auto resizeVariable = [=](const ImmutableString &name, uint32_t size, uint32_t maxSize) {
+ auto resizeVariable = [=, this](const ImmutableString &name, uint32_t size, uint32_t maxSize) {
// Skip if the variable is not used or implicitly has the maximum size
if (size == 0 || size == maxSize)
return true;
diff --git a/util/capture/frame_capture_test_utils.cpp b/util/capture/frame_capture_test_utils.cpp
index 41d52c0d9..a315ecbf2 100644
index 427844c5d..8c549d1b3 100644
--- a/util/capture/frame_capture_test_utils.cpp
+++ b/util/capture/frame_capture_test_utils.cpp
@@ -85,7 +85,7 @@ bool LoadTraceInfoFromJSON(const std::string &traceName,
@@ -84,7 +84,7 @@ bool LoadTraceInfoFromJSON(const std::string &traceName,
return false;
}

Expand Down
Loading

0 comments on commit 59ad237

Please sign in to comment.