diff options
-rw-r--r-- | DEPS | 69 | ||||
-rw-r--r-- | build/android/PRESUBMIT.py | 1 | ||||
-rwxr-xr-x | build/android/apk_operations.py | 2 | ||||
-rwxr-xr-x | build/android/gyp/gcc_preprocess.py | 36 | ||||
-rwxr-xr-x | build/android/gyp/gcc_preprocess_tests.py | 111 | ||||
-rwxr-xr-x | build/chromeos/test_runner.py | 3 | ||||
-rw-r--r-- | build/config/clang/BUILD.gn | 8 | ||||
-rw-r--r-- | build/config/compiler/BUILD.gn | 19 | ||||
-rw-r--r-- | build/config/siso/clang_code_coverage_wrapper.star | 2 | ||||
-rw-r--r-- | build/config/siso/main.star | 9 | ||||
-rw-r--r-- | build/rust/std/rules/BUILD.gn | 5 | ||||
-rwxr-xr-x | build/toolchain/clang_code_coverage_wrapper.py | 2 | ||||
-rw-r--r-- | build/util/LASTCHANGE | 2 | ||||
-rw-r--r-- | build/util/LASTCHANGE.committime | 2 | ||||
-rw-r--r-- | src/libANGLE/renderer/vulkan/ContextVk.cpp | 4 | ||||
-rw-r--r-- | src/libANGLE/renderer/vulkan/vk_helpers.cpp | 26 | ||||
-rw-r--r-- | src/libANGLE/renderer/vulkan/vk_helpers.h | 12 |
17 files changed, 217 insertions, 96 deletions
@@ -43,7 +43,7 @@ vars = { 'checkout_angle_mesa': False, # Version of Chromium our Chromium-based DEPS are mirrored from. - 'chromium_revision': '228731187f8974bcc338218ad4206861cf5660b7', + 'chromium_revision': '83c70f11490ddf939fee8e9096288c28d4cda227', # We never want to checkout chromium, # but need a dummy DEPS entry for the autoroller 'dummy_checkout_chromium': False, @@ -88,7 +88,7 @@ vars = { # Three lines of non-changing comments so that # the commit queue can handle CLs rolling catapult # and whatever else without interference from each other. - 'catapult_revision': '11804c96b19a76a59dd9e8f6074e6eeed5aa5228', + 'catapult_revision': '835aa3e871f28f6d2635f1ec58e414f39b4d4049', # the commit queue can handle CLs rolling Fuchsia sdk # and whatever else without interference from each other. @@ -414,12 +414,12 @@ vars = { deps = { 'build': { - 'url': Var('chromium_git') + '/chromium/src/build.git@cc3072434e1bacda4e993756bfbee78f1a7f6d82', + 'url': Var('chromium_git') + '/chromium/src/build.git@dc7e21c7b04270a6b5fae49a0f67e7065d310bb2', 'condition': 'not build_with_chromium', }, 'buildtools': { - 'url': Var('chromium_git') + '/chromium/src/buildtools.git@b915e95c06d86803eb3d2b0174e404a0ea7b15de', + 'url': Var('chromium_git') + '/chromium/src/buildtools.git@d0f0285d02d788719edb53fa9dcec1584ff83875', 'condition': 'not build_with_chromium', }, @@ -473,7 +473,7 @@ deps = { }, 'testing': { - 'url': '{chromium_git}/chromium/src/testing@5ce487451c26e135c7157529a6048a09ebd6befe', + 'url': '{chromium_git}/chromium/src/testing@79213704bc55aa472940085952d33d9b0025e607', 'condition': 'not build_with_chromium', }, @@ -524,7 +524,7 @@ deps = { 'packages': [ { 'package': 'chromium/third_party/android_build_tools/lint', - 'version': 'f5ptuXixKwddKw0rnCKuNjXY9E35_710E7SNxoOLNnMC', + 'version': 'O1UDDudkb1fHG2uMxzszPWctYiGgjyywsi7Lbkq7roYC', }, ], 'condition': 'checkout_android and not build_with_chromium', @@ -535,7 +535,7 @@ deps = { 'packages': [ { 'package': 'chromium/third_party/android_build_tools/manifest_merger', - 'version': 'Xef4nLhp0rWWjXJXt9CTFjQF8S6qRduSY7LZCcJi48QC', + 'version': 'wRnJA-ZlBBQipw_wjYJJemxCCPSZHenIFsWKi3GI_FUC', }, ], 'condition': 'checkout_android and not build_with_chromium', @@ -543,7 +543,7 @@ deps = { }, 'third_party/android_deps': { - 'url': Var('chromium_git') + '/chromium/src/third_party/android_deps@e057d1ff15bef635f22273af17b49599ebdc2a2a', + 'url': Var('chromium_git') + '/chromium/src/third_party/android_deps@d64937aec71a4110715b07ce871be294d6e35071', 'condition': 'checkout_android and not build_with_chromium', }, @@ -564,7 +564,7 @@ deps = { }, 'third_party/android_sdk': { - 'url': Var('chromium_git') + '/chromium/src/third_party/android_sdk@bb9e0f87b948dc4e51ed8bb1ea716da856a5a206', + 'url': Var('chromium_git') + '/chromium/src/third_party/android_sdk@2d7b0a17b7ffad6ee60feb21a3a773907e37dcda', 'condition': 'checkout_android and not build_with_chromium', }, @@ -655,7 +655,7 @@ deps = { }, 'third_party/depot_tools': { - 'url': Var('chromium_git') + '/chromium/tools/depot_tools.git@4246ba023a156178852f44f6a253a7199e4eaa06', + 'url': Var('chromium_git') + '/chromium/tools/depot_tools.git@2c87882a7bacebf523a3df6a76432d0bc47badf8', 'condition': 'not build_with_chromium', }, @@ -712,7 +712,7 @@ deps = { 'packages': [ { 'package': 'chromium/third_party/kotlin_stdlib', - 'version': 'E67atHdREsWLno-3b4Py3r87C4LB7gpVYDq3Q1z7t90C', + 'version': '05hzFgOi0AqRK3RxbSvGj2TWTFUNeLcwkJwVzwgLttUC', }, ], 'condition': 'checkout_android and not build_with_chromium', @@ -926,7 +926,7 @@ deps = { 'packages': [ { 'package': 'chromium/third_party/turbine', - 'version': 'agNIST7gEMTmrnvQLPzx2dduGa52uMmOx3fEWm9z5MEC', + 'version': 'fYpnoJAvh8-OaNB9k81XWGrwiODb_uTipTBEUeIFM98C', }, ], 'condition': 'checkout_android and not build_with_chromium', @@ -1009,7 +1009,7 @@ deps = { }, 'tools/perf': { - 'url': Var('chromium_git') + '/chromium/src/tools/perf@4852168b7d9dcdf149c943c15beda61ce74862bc', + 'url': Var('chromium_git') + '/chromium/src/tools/perf@6e4e92a394b0b138f01219ebd23102042991e3d4', 'condition': 'not build_with_chromium', }, @@ -1027,7 +1027,7 @@ deps = { 'packages': [ { 'package': 'skia/tools/goldctl/linux-amd64', - 'version': 'ZpyLtfuztdYI-RCkvm6kXlmx8ec1wYyrwXNI-lQEJKwC', + 'version': 'AJacKGh5nnjmNZk56j2ia4-QtIE8eEAFELw48t8XinEC', }, ], 'dep_type': 'cipd', @@ -1038,7 +1038,7 @@ deps = { 'packages': [ { 'package': 'skia/tools/goldctl/windows-amd64', - 'version': 'LT6gNudC207ke0t4qv9IW_s27hoPIafnwpcfrzR8FzMC', + 'version': '4bTyiie8-MG6hBk2yGEE9d8p3HWHGevaAouvGfKKwtQC', }, ], 'dep_type': 'cipd', @@ -1049,7 +1049,7 @@ deps = { 'packages': [ { 'package': 'skia/tools/goldctl/mac-amd64', - 'version': 'FpwpXsMPl8Mets8uet3zfFw8nNBpl69xJoTYESLUjl8C', + 'version': 'uJJWpJUp-FSzEXlwqzoUD41p5swLKyDhxXdJBLShbMsC', }, ], 'dep_type': 'cipd', @@ -1060,7 +1060,7 @@ deps = { 'packages': [ { 'package': 'skia/tools/goldctl/mac-arm64', - 'version': 'GuJOsvx5V5z8DvAM_HOVy6eBydQ0sO7dVso_p_L7KTgC', + 'version': 'ekRiJKPFBJKiZ3N4ev_vRuf2X13dgTDcZNXKYt2qZPoC', }, ], 'dep_type': 'cipd', @@ -4068,7 +4068,7 @@ deps = { 'packages': [ { 'package': 'chromium/third_party/android_deps/libs/com_google_android_gms_play_services_base', - 'version': 'version:2@18.1.0.cr1', + 'version': 'version:2@18.0.1.cr1', }, ], 'condition': 'checkout_android and not build_with_chromium', @@ -4229,28 +4229,6 @@ deps = { 'dep_type': 'cipd', }, - 'third_party/android_deps/libs/com_google_android_gms_play_services_tflite_impl': { - 'packages': [ - { - 'package': 'chromium/third_party/android_deps/libs/com_google_android_gms_play_services_tflite_impl', - 'version': 'version:2@16.0.1.cr1', - }, - ], - 'condition': 'checkout_android and not build_with_chromium', - 'dep_type': 'cipd', - }, - - 'third_party/android_deps/libs/com_google_android_gms_play_services_tflite_java': { - 'packages': [ - { - 'package': 'chromium/third_party/android_deps/libs/com_google_android_gms_play_services_tflite_java', - 'version': 'version:2@16.0.1.cr1', - }, - ], - 'condition': 'checkout_android and not build_with_chromium', - 'dep_type': 'cipd', - }, - 'third_party/android_deps/libs/com_google_android_gms_play_services_vision': { 'packages': [ { @@ -5406,17 +5384,6 @@ deps = { 'dep_type': 'cipd', }, - 'third_party/android_deps/libs/org_tensorflow_tensorflow_lite_api': { - 'packages': [ - { - 'package': 'chromium/third_party/android_deps/libs/org_tensorflow_tensorflow_lite_api', - 'version': 'version:2@2.10.0.cr1', - }, - ], - 'condition': 'checkout_android and not build_with_chromium', - 'dep_type': 'cipd', - }, - # === ANDROID_DEPS Generated Code End === } diff --git a/build/android/PRESUBMIT.py b/build/android/PRESUBMIT.py index a583d7dbba..56e0168f57 100644 --- a/build/android/PRESUBMIT.py +++ b/build/android/PRESUBMIT.py @@ -116,6 +116,7 @@ def CommonChecks(input_api, output_api): J('pylib', 'utils', 'gold_utils_test.py'), J('pylib', 'utils', 'test_filter_test.py'), J('gyp', 'dex_test.py'), + J('gyp', 'gcc_preprocess_tests.py'), J('gyp', 'util', 'build_utils_test.py'), J('gyp', 'util', 'manifest_utils_test.py'), J('gyp', 'util', 'md5_check_test.py'), diff --git a/build/android/apk_operations.py b/build/android/apk_operations.py index b7cdf9706e..d34e24d69d 100755 --- a/build/android/apk_operations.py +++ b/build/android/apk_operations.py @@ -1333,7 +1333,7 @@ class _Command: logging.debug('App supports (filtered): %r', app_abis) if not app_abis: # The app does not have any native libs, so all devices can support it. - return devices, None + return devices, {} fully_supported = [] not_supported_reasons = {} for device in devices: diff --git a/build/android/gyp/gcc_preprocess.py b/build/android/gyp/gcc_preprocess.py index 2e5b3b3b5d..0302c073a0 100755 --- a/build/android/gyp/gcc_preprocess.py +++ b/build/android/gyp/gcc_preprocess.py @@ -21,6 +21,24 @@ def _ParsePackageName(data): return m.group(1) if m else '' +def ProcessJavaFile(template, defines, include_dirs): + gcc_cmd = [ + 'gcc', + '-E', # stop after preprocessing. + '-DANDROID', # Specify ANDROID define for pre-processor. + '-x', + 'c-header', # treat sources as C header files + '-P', # disable line markers, i.e. '#line 309' + ] + gcc_cmd.extend('-D' + x for x in defines) + gcc_cmd.extend('-I' + x for x in include_dirs) + data = build_utils.CheckOutput(gcc_cmd + [template]) + package_name = _ParsePackageName(data) + if not package_name: + raise Exception('Could not find java package of ' + template) + return package_name, data + + def main(args): args = build_utils.ExpandFileArgs(args) @@ -36,25 +54,11 @@ def main(args): options.defines = action_helpers.parse_gn_list(options.defines) options.include_dirs = action_helpers.parse_gn_list(options.include_dirs) - - gcc_cmd = [ - 'gcc', - '-E', # stop after preprocessing. - '-DANDROID', # Specify ANDROID define for pre-processor. - '-x', - 'c-header', # treat sources as C header files - '-P', # disable line markers, i.e. '#line 309' - ] - gcc_cmd.extend('-D' + x for x in options.defines) - gcc_cmd.extend('-I' + x for x in options.include_dirs) - with action_helpers.atomic_output(options.output) as f: with zipfile.ZipFile(f, 'w') as z: for template in options.templates: - data = build_utils.CheckOutput(gcc_cmd + [template]) - package_name = _ParsePackageName(data) - if not package_name: - raise Exception('Could not find java package of ' + template) + package_name, data = ProcessJavaFile(template, options.defines, + options.include_dirs) zip_path = posixpath.join( package_name.replace('.', '/'), os.path.splitext(os.path.basename(template))[0]) + '.java' diff --git a/build/android/gyp/gcc_preprocess_tests.py b/build/android/gyp/gcc_preprocess_tests.py new file mode 100755 index 0000000000..3699575e02 --- /dev/null +++ b/build/android/gyp/gcc_preprocess_tests.py @@ -0,0 +1,111 @@ +#!/usr/bin/env python3 +# Copyright 2024 The Chromium Authors +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. +"""Tests for gcc_preprocess.py + +This test suite contains various tests for the 'java_cpp_template' build rule, +which uses the gcc preprocessor to turn a template into Java code. +""" + +import unittest +import tempfile + +import gcc_preprocess + + +class TestPreprocess(unittest.TestCase): + + def testParsePackageName(self): + with tempfile.NamedTemporaryFile(mode='w') as f: + template = f.name + f.file.write(""" +package org.chromium.fake; +public class Empty { +} +""") + f.file.flush() + package_name, data = gcc_preprocess.ProcessJavaFile(template, [], []) + self.assertEqual('org.chromium.fake', package_name) + self.assertEqual( + """ +package org.chromium.fake; +public class Empty { +} +""".strip(), data.strip()) + + def testMissingPackageName(self): + with tempfile.NamedTemporaryFile(mode='w') as f: + template = f.name + f.file.write(""" +public class Empty { +} +""") + f.file.flush() + with self.assertRaisesRegex(Exception, + r'Could not find java package of.*'): + gcc_preprocess.ProcessJavaFile(template, [], []) + + def testSinglePreprocessorEvaluation(self): + with tempfile.NamedTemporaryFile(mode='w') as f: + template = f.name + f.file.write(""" +package org.chromium.fake; +public class Sample { +#if defined(_ENABLE_ASSERTS) + public boolean ENABLE_ASSERTS = true; +#else + public boolean ENABLE_ASSERTS = false; +#endif +} +""") + f.file.flush() + defines = [ + '_ENABLE_ASSERTS', + ] + package_name, data = gcc_preprocess.ProcessJavaFile(template, defines, []) + self.assertEqual('org.chromium.fake', package_name) + self.assertEqual( + """ +package org.chromium.fake; +public class Sample { + public boolean ENABLE_ASSERTS = true; +} +""".strip(), data.strip()) + + def testNestedPreprocessorEvaluation(self): + with tempfile.NamedTemporaryFile(mode='w') as f: + template = f.name + f.file.write(""" +package org.chromium.fake; +#if defined(USE_FINAL) +#define MAYBE_FINAL final +#else +#define MAYBE_FINAL +#endif +public class Sample { +#if defined(_ENABLE_ASSERTS) + public MAYBE_FINAL boolean ENABLE_ASSERTS = true; +#else + public MAYBE_FINAL boolean ENABLE_ASSERTS = false; +#endif +} +""") + f.file.flush() + defines = [ + '_ENABLE_ASSERTS', + 'USE_FINAL', + ] + package_name, data = gcc_preprocess.ProcessJavaFile(template, defines, []) + self.assertEqual('org.chromium.fake', package_name) + self.assertEqual( + """ +package org.chromium.fake; +public class Sample { + public final boolean ENABLE_ASSERTS = true; +} +""".strip(), data.strip()) + + +if __name__ == '__main__': + unittest.main() diff --git a/build/chromeos/test_runner.py b/build/chromeos/test_runner.py index 260b978603..f480086fcb 100755 --- a/build/chromeos/test_runner.py +++ b/build/chromeos/test_runner.py @@ -561,7 +561,8 @@ class GTestTest(RemoteTest): if not os.path.exists(vpython_path) or not os.path.exists(cpython_path): raise TestFormatError( '--vpython-dir must point to a dir with both ' - 'infra/3pp/tools/cpython3 and infra/tools/luci/vpython installed.') + 'infra/3pp/tools/cpython3 and infra/tools/luci/vpython3 ' + 'installed.') vpython_spec_path = os.path.relpath( os.path.join(CHROMIUM_SRC_PATH, '.vpython3'), self._path_to_outdir) # Initialize the vpython cache. This can take 10-20s, and some tests diff --git a/build/config/clang/BUILD.gn b/build/config/clang/BUILD.gn index cffc4ef93b..df24b5f59e 100644 --- a/build/config/clang/BUILD.gn +++ b/build/config/clang/BUILD.gn @@ -3,6 +3,7 @@ # found in the LICENSE file. import("//build/buildflag_header.gni") +import("//build/config/pch.gni") import("//build/config/rust.gni") import("//build/toolchain/goma.gni") import("clang.gni") @@ -94,9 +95,14 @@ config("find_bad_constructs") { # # See //build/config/unsafe_buffers_paths.txt for an example file, this it the # file used by Chromium. +# +# This build configuration is not supported when `enable_precompiled_headers` +# is on because the pragmas that enable and disable unsafe-buffers warnings are +# not serialized to precompiled header files, and thus we get warnings that we +# should not. config("unsafe_buffers") { if (clang_use_chrome_plugins && clang_unsafe_buffers_paths != "" && - !use_goma) { + !use_goma && !enable_precompiled_headers) { cflags = [ "-DUNSAFE_BUFFERS_BUILD", diff --git a/build/config/compiler/BUILD.gn b/build/config/compiler/BUILD.gn index 78a52a0435..d39de9bc56 100644 --- a/build/config/compiler/BUILD.gn +++ b/build/config/compiler/BUILD.gn @@ -764,7 +764,9 @@ config("compiler") { # FIXME(inglorion): maybe tune these? # TODO(b/271459198): Revert limit on amd64 to 30 when fixed. import_instr_limit = 20 - } else if (is_android && optimize_for_size) { + } else if (is_android && (optimize_for_size || use_order_profiling)) { + # Reduce inlining for the orderfile instrumented build to mitigate + # crbug.com/330761384. # TODO(crbug.com/40219076): Investigate if we can get the > 6% perf win # of import_instr_limit 30 with a binary size hit smaller than ~2 MiB. import_instr_limit = 5 @@ -781,6 +783,21 @@ config("compiler") { ldflags += [ "-Wl,-mllvm,-disable-auto-upgrade-debug-info" ] } + # TODO(crbug.com/335365324): Enable on other platforms. + if (is_android && !optimize_for_size) { + # Ideally the compiler would handle this automatically with PGO (see + # comments at https://crrev.com/c/5440500). + # + # Android binary size impact (as of April 2024): The arm64 native code + # size increases by ~627KB (or 0.34%: the arm64 native code size in + # M124 is 178MB). + cflags += [ + "-mllvm", + "-inlinehint-threshold=360", + ] + ldflags += [ "-Wl,-mllvm,-inlinehint-threshold=360" ] + } + # TODO(crbug.com/40182783): investigate why this isn't effective on # arm32. if (!is_android || current_cpu == "arm64") { diff --git a/build/config/siso/clang_code_coverage_wrapper.star b/build/config/siso/clang_code_coverage_wrapper.star index be8dade6af..a354d354a5 100644 --- a/build/config/siso/clang_code_coverage_wrapper.star +++ b/build/config/siso/clang_code_coverage_wrapper.star @@ -49,7 +49,7 @@ _COVERAGE_EXCLUSION_LIST_MAP = { "linux": [ # These files caused a static initializer to be generated, which # shouldn't. - # TODO(crbug.com/990948): Remove when the bug is fixed. + # TODO(crbug.com/41474559): Remove when the bug is fixed. "../../chrome/browser/media/router/providers/cast/cast_internal_message_util.cc", #pylint: disable=line-too-long "../../components/media_router/common/providers/cast/channel/cast_channel_enum.cc", #pylint: disable=line-too-long "../../components/media_router/common/providers/cast/channel/cast_message_util.cc", #pylint: disable=line-too-long diff --git a/build/config/siso/main.star b/build/config/siso/main.star index 2a9336658a..ed96f857dc 100644 --- a/build/config/siso/main.star +++ b/build/config/siso/main.star @@ -259,6 +259,15 @@ def __use_large_b289968566(ctx, step_config): "./obj/content/browser/browser/storage_partition_impl.o", "./obj/third_party/blink/renderer/core/core/local_frame_view.o", "./obj/third_party/blink/renderer/core/core_hot/document.o", + # Fallback happens with the following args.gn + # (android-build-perf-developer) + # is_component_build = true + # is_debug = true + # symbol_level = 2 + # target_cpu = "arm64" + # target_os = "android" + # use_siso = true + "./obj/third_party/sentencepiece/sentencepiece/unicode_script.o", ] if runtime.os == "windows": exit137_list = [obj.removesuffix(".o") + ".obj" for obj in exit137_list if obj.startswith("./obj/")] diff --git a/build/rust/std/rules/BUILD.gn b/build/rust/std/rules/BUILD.gn index caccc86328..bfb2fd4337 100644 --- a/build/rust/std/rules/BUILD.gn +++ b/build/rust/std/rules/BUILD.gn @@ -517,6 +517,7 @@ cargo_crate("core") { "//third_party/rust-toolchain/lib/rustlib/src/rust/library/core/src/fmt/nofloat.rs", "//third_party/rust-toolchain/lib/rustlib/src/rust/library/core/src/fmt/num.rs", "//third_party/rust-toolchain/lib/rustlib/src/rust/library/core/src/fmt/rt.rs", + "//third_party/rust-toolchain/lib/rustlib/src/rust/library/core/src/future/async_drop.rs", "//third_party/rust-toolchain/lib/rustlib/src/rust/library/core/src/future/future.rs", "//third_party/rust-toolchain/lib/rustlib/src/rust/library/core/src/future/into_future.rs", "//third_party/rust-toolchain/lib/rustlib/src/rust/library/core/src/future/join.rs", @@ -2789,12 +2790,14 @@ cargo_crate("std_detect") { deps = [ ":cfg_if", ":compiler_builtins", - ":libc", ":rustc_std_workspace_alloc", ":rustc_std_workspace_core", "//build/rust/std:profiler_builtins_group", "//build/rust/std:std_build_deps", ] + if (!is_win) { + deps += [ ":libc" ] + } aliased_deps = { alloc = ":rustc_std_workspace_alloc" core = ":rustc_std_workspace_core" diff --git a/build/toolchain/clang_code_coverage_wrapper.py b/build/toolchain/clang_code_coverage_wrapper.py index f910389bb7..51653f5a2c 100755 --- a/build/toolchain/clang_code_coverage_wrapper.py +++ b/build/toolchain/clang_code_coverage_wrapper.py @@ -95,7 +95,7 @@ _COVERAGE_EXCLUSION_LIST_MAP = { 'linux': [ # These files caused a static initializer to be generated, which # shouldn't. - # TODO(crbug.com/990948): Remove when the bug is fixed. + # TODO(crbug.com/41474559): Remove when the bug is fixed. '../../chrome/browser/media/router/providers/cast/cast_internal_message_util.cc', #pylint: disable=line-too-long '../../components/media_router/common/providers/cast/channel/cast_channel_enum.cc', #pylint: disable=line-too-long '../../components/media_router/common/providers/cast/channel/cast_message_util.cc', #pylint: disable=line-too-long diff --git a/build/util/LASTCHANGE b/build/util/LASTCHANGE index 2baacb9691..00eee97690 100644 --- a/build/util/LASTCHANGE +++ b/build/util/LASTCHANGE @@ -1,2 +1,2 @@ -LASTCHANGE=cc3072434e1bacda4e993756bfbee78f1a7f6d82-refs/heads/main@{#1293344} +LASTCHANGE=dc7e21c7b04270a6b5fae49a0f67e7065d310bb2-refs/heads/main@{#1294160} LASTCHANGE_YEAR=2024 diff --git a/build/util/LASTCHANGE.committime b/build/util/LASTCHANGE.committime index 4383783a52..6e0108eeaf 100644 --- a/build/util/LASTCHANGE.committime +++ b/build/util/LASTCHANGE.committime @@ -1 +1 @@ -1714182153
\ No newline at end of file +1714452551
\ No newline at end of file diff --git a/src/libANGLE/renderer/vulkan/ContextVk.cpp b/src/libANGLE/renderer/vulkan/ContextVk.cpp index e8cd9d6590..bd27717cf0 100644 --- a/src/libANGLE/renderer/vulkan/ContextVk.cpp +++ b/src/libANGLE/renderer/vulkan/ContextVk.cpp @@ -7970,7 +7970,7 @@ angle::Result ContextVk::flushCommandsAndEndRenderPassWithoutSubmit(RenderPassCl if (vk::CommandBufferHelperCommon::kEnableCommandStreamDiagnostics) { - mRenderPassCommands->addCommandDiagnostics(this); + addCommandBufferDiagnostics(mRenderPassCommands->getCommandDiagnostics()); } const vk::RenderPass *renderPass = nullptr; @@ -8254,7 +8254,7 @@ angle::Result ContextVk::flushOutsideRenderPassCommands() if (vk::CommandBufferHelperCommon::kEnableCommandStreamDiagnostics) { - mOutsideRenderPassCommands->addCommandDiagnostics(this); + addCommandBufferDiagnostics(mOutsideRenderPassCommands->getCommandDiagnostics()); } flushDescriptorSetUpdates(); diff --git a/src/libANGLE/renderer/vulkan/vk_helpers.cpp b/src/libANGLE/renderer/vulkan/vk_helpers.cpp index c9b393b03d..7f9e90fed3 100644 --- a/src/libANGLE/renderer/vulkan/vk_helpers.cpp +++ b/src/libANGLE/renderer/vulkan/vk_helpers.cpp @@ -1689,18 +1689,18 @@ void CommandBufferHelperCommon::bufferReadImpl(VkAccessFlags readAccessType, ASSERT(!usesBufferForWrite(*buffer)); } -void CommandBufferHelperCommon::imageReadImpl(ContextVk *contextVk, +void CommandBufferHelperCommon::imageReadImpl(Context *context, VkImageAspectFlags aspectFlags, ImageLayout imageLayout, ImageHelper *image) { if (image->isReadBarrierNecessary(imageLayout)) { - updateImageLayoutAndBarrier(contextVk, image, aspectFlags, imageLayout); + updateImageLayoutAndBarrier(context, image, aspectFlags, imageLayout); } } -void CommandBufferHelperCommon::imageWriteImpl(ContextVk *contextVk, +void CommandBufferHelperCommon::imageWriteImpl(Context *context, gl::LevelIndex level, uint32_t layerStart, uint32_t layerCount, @@ -1711,7 +1711,7 @@ void CommandBufferHelperCommon::imageWriteImpl(ContextVk *contextVk, image->onWrite(level, 1, layerStart, layerCount, aspectFlags); if (image->isWriteBarrierNecessary(imageLayout, level, 1, layerStart, layerCount)) { - updateImageLayoutAndBarrier(contextVk, image, aspectFlags, imageLayout); + updateImageLayoutAndBarrier(context, image, aspectFlags, imageLayout); } } @@ -1911,13 +1911,14 @@ void OutsideRenderPassCommandBufferHelper::assertCanBeRecycled() assertCanBeRecycledImpl<OutsideRenderPassCommandBufferHelper>(); } -void OutsideRenderPassCommandBufferHelper::addCommandDiagnostics(ContextVk *contextVk) +std::string OutsideRenderPassCommandBufferHelper::getCommandDiagnostics() { std::ostringstream out; addCommandDiagnosticsCommon(&out); out << mCommandBuffer.dumpCommands("\\l"); - contextVk->addCommandBufferDiagnostics(out.str()); + + return out.str(); } // RenderPassFramebuffer implementation. @@ -3003,7 +3004,7 @@ void RenderPassCommandBufferHelper::assertCanBeRecycled() assertCanBeRecycledImpl<RenderPassCommandBufferHelper>(); } -void RenderPassCommandBufferHelper::addCommandDiagnostics(ContextVk *contextVk) +std::string RenderPassCommandBufferHelper::getCommandDiagnostics() { std::ostringstream out; addCommandDiagnosticsCommon(&out); @@ -3062,7 +3063,8 @@ void RenderPassCommandBufferHelper::addCommandDiagnostics(ContextVk *contextVk) } out << mCommandBuffers[subpass].dumpCommands("\\l"); } - contextVk->addCommandBufferDiagnostics(out.str()); + + return out.str(); } // CommandBufferRecycler implementation. @@ -6862,7 +6864,7 @@ void ImageHelper::changeLayoutAndQueue(Context *context, ASSERT(acquireNextImageSemaphore == VK_NULL_HANDLE); } -void ImageHelper::acquireFromExternal(ContextVk *contextVk, +void ImageHelper::acquireFromExternal(Context *context, uint32_t externalQueueFamilyIndex, uint32_t rendererQueueFamilyIndex, ImageLayout currentLayout, @@ -6882,7 +6884,7 @@ void ImageHelper::acquireFromExternal(ContextVk *contextVk, // leave it to transition out as the image is used later. if (currentLayout != ImageLayout::Undefined) { - changeLayoutAndQueue(contextVk, getAspectFlags(), mCurrentLayout, rendererQueueFamilyIndex, + changeLayoutAndQueue(context, getAspectFlags(), mCurrentLayout, rendererQueueFamilyIndex, commandBuffer); } @@ -6898,7 +6900,7 @@ void ImageHelper::acquireFromExternal(ContextVk *contextVk, } } -void ImageHelper::releaseToExternal(ContextVk *contextVk, +void ImageHelper::releaseToExternal(Context *context, uint32_t rendererQueueFamilyIndex, uint32_t externalQueueFamilyIndex, ImageLayout desiredLayout, @@ -6910,7 +6912,7 @@ void ImageHelper::releaseToExternal(ContextVk *contextVk, // GL! if (mCurrentQueueFamilyIndex != externalQueueFamilyIndex || mCurrentLayout != desiredLayout) { - changeLayoutAndQueue(contextVk, getAspectFlags(), desiredLayout, externalQueueFamilyIndex, + changeLayoutAndQueue(context, getAspectFlags(), desiredLayout, externalQueueFamilyIndex, commandBuffer); } diff --git a/src/libANGLE/renderer/vulkan/vk_helpers.h b/src/libANGLE/renderer/vulkan/vk_helpers.h index d173a106e1..18bdb01305 100644 --- a/src/libANGLE/renderer/vulkan/vk_helpers.h +++ b/src/libANGLE/renderer/vulkan/vk_helpers.h @@ -1338,11 +1338,11 @@ class CommandBufferHelperCommon : angle::NonCopyable bufferReadImpl(readAccessType, readStage, buffer); } } - void imageReadImpl(ContextVk *contextVk, + void imageReadImpl(Context *context, VkImageAspectFlags aspectFlags, ImageLayout imageLayout, ImageHelper *image); - void imageWriteImpl(ContextVk *contextVk, + void imageWriteImpl(Context *context, gl::LevelIndex level, uint32_t layerStart, uint32_t layerCount, @@ -1459,7 +1459,7 @@ class OutsideRenderPassCommandBufferHelper final : public CommandBufferHelperCom } } - void addCommandDiagnostics(ContextVk *contextVk); + std::string getCommandDiagnostics(); void setQueueSerial(SerialIndex index, Serial serial) { @@ -1789,7 +1789,7 @@ class RenderPassCommandBufferHelper final : public CommandBufferHelperCommon mHasGLMemoryBarrierIssued = true; } } - void addCommandDiagnostics(ContextVk *contextVk); + std::string getCommandDiagnostics(); // Readonly depth stencil mode and feedback loop mode void updateDepthReadOnlyMode(RenderPassUsageFlags dsUsageFlags); @@ -2477,14 +2477,14 @@ class ImageHelper final : public Resource, public angle::Subject VkSemaphore *semaphoreOut); // Performs an ownership transfer from an external instance or API. - void acquireFromExternal(ContextVk *contextVk, + void acquireFromExternal(Context *context, uint32_t externalQueueFamilyIndex, uint32_t rendererQueueFamilyIndex, ImageLayout currentLayout, OutsideRenderPassCommandBuffer *commandBuffer); // Performs an ownership transfer to an external instance or API. - void releaseToExternal(ContextVk *contextVk, + void releaseToExternal(Context *context, uint32_t rendererQueueFamilyIndex, uint32_t externalQueueFamilyIndex, ImageLayout desiredLayout, |