Manually roll ANGLE, vulkan-deps, SwiftShader (flutter/engine#38650)

This commit is contained in:
Loïc Sharma 2023-01-24 16:53:25 -08:00 committed by GitHub
parent bc595eefcf
commit 6de1c715fb
14 changed files with 158 additions and 44 deletions

8
DEPS
View File

@ -236,7 +236,7 @@ allowed_hosts = [
]
deps = {
'src': 'https://github.com/flutter/buildroot.git' + '@' + '5ca962cdf56fa8e7313a37237d9f1d7e7466b93b',
'src': 'https://github.com/flutter/buildroot.git' + '@' + 'd01da27168bbe9f3a01d22a0aca4013a27c7df33',
# Fuchsia compatibility
#
@ -263,7 +263,7 @@ deps = {
Var('github_git') + '/google/shaderc.git' + '@' + '7ea834ecc59258a5c13c3d3e6fa0582bdde7c543',
'src/third_party/vulkan-deps':
Var('chromium_git') + '/vulkan-deps' + '@' + 'afc444a0f49a09f67b3dc63ddcd14e2031466ffa',
Var('chromium_git') + '/vulkan-deps' + '@' + 'a56166d59ebdb0208a7301d267460773df1a1adc',
'src/third_party/flatbuffers':
Var('github_git') + '/google/flatbuffers.git' + '@' + '0a80646371179f8a7a5c1f42c31ee1d44dcf6709',
@ -592,10 +592,10 @@ deps = {
Var('fuchsia_git') + '/third_party/Vulkan-Headers.git' + '@' + '32640ad82ef648768c706c9bf828b77123a09bc2',
'src/third_party/swiftshader':
Var('swiftshader_git') + '/SwiftShader.git' + '@' + 'bea8d2471bd912220ba59032e0738f3364632657',
Var('swiftshader_git') + '/SwiftShader.git' + '@' + '5f9ed9b16931c7155171d31f75004f73f0a3abc8',
'src/third_party/angle':
Var('chromium_git') + '/angle/angle.git' + '@' + '094b49db60cb48ee932a875898b57accbfa656de',
Var('chromium_git') + '/angle/angle.git' + '@' + '32175d8a6dc185dd850e5c9988f208085c9c0d80',
'src/third_party/vulkan_memory_allocator':
Var('chromium_git') + '/external/github.com/GPUOpen-LibrariesAndSDKs/VulkanMemoryAllocator' + '@' + '7de5cc00de50e71a3aab22dea52fbb7ff4efceb6',

View File

@ -961,14 +961,18 @@
../../../third_party/angle/samples
../../../third_party/angle/scripts
../../../third_party/angle/src/commit_id.py
../../../third_party/angle/src/common/BinaryStream_unittest.cpp
../../../third_party/angle/src/common/CircularBuffer_unittest.cpp
../../../third_party/angle/src/common/FastVector_unittest.cpp
../../../third_party/angle/src/common/FixedVector_unittest.cpp
../../../third_party/angle/src/common/Float16ToFloat32.py
../../../third_party/angle/src/common/Optional_unittest.cpp
../../../third_party/angle/src/common/PoolAlloc_unittest.cpp
../../../third_party/angle/src/common/WorkerThread_unittest.cpp
../../../third_party/angle/src/common/aligned_memory_unittest.cpp
../../../third_party/angle/src/common/angleutils_unittest.cpp
../../../third_party/angle/src/common/base/README.angle
../../../third_party/angle/src/common/base/anglebase/numerics/OWNERS
../../../third_party/angle/src/common/bitset_utils_unittest.cpp
../../../third_party/angle/src/common/fuchsia_egl/OWNERS
../../../third_party/angle/src/common/gen_packed_gl_enums.py
@ -980,9 +984,6 @@
../../../third_party/angle/src/common/spirv/gen_spirv_builder_and_parser.py
../../../third_party/angle/src/common/string_utils_unittest.cpp
../../../third_party/angle/src/common/system_utils_unittest.cpp
../../../third_party/angle/src/common/third_party/base/README.angle
../../../third_party/angle/src/common/third_party/base/anglebase/numerics/OWNERS
../../../third_party/angle/src/common/third_party/smhasher/README.angle
../../../third_party/angle/src/common/third_party/xxhash/README.chromium
../../../third_party/angle/src/common/third_party/xxhash/README.md
../../../third_party/angle/src/common/utilities_unittest.cpp
@ -996,7 +997,7 @@
../../../third_party/angle/src/feature_support_util/OWNERS
../../../third_party/angle/src/feature_support_util/feature_support_util_unittest.cpp
../../../third_party/angle/src/gpu_info_util/SystemInfo_unittest.cpp
../../../third_party/angle/src/libANGLE/BinaryStream_unittest.cpp
../../../third_party/angle/src/image_util/AstcDecompressor_unittest.cpp
../../../third_party/angle/src/libANGLE/BlobCache_unittest.cpp
../../../third_party/angle/src/libANGLE/Config_unittest.cpp
../../../third_party/angle/src/libANGLE/Fence_unittest.cpp
@ -1012,7 +1013,6 @@
../../../third_party/angle/src/libANGLE/TransformFeedback_unittest.cpp
../../../third_party/angle/src/libANGLE/VaryingPacking_unittest.cpp
../../../third_party/angle/src/libANGLE/VertexArray_unittest.cpp
../../../third_party/angle/src/libANGLE/WorkerThread_unittest.cpp
../../../third_party/angle/src/libANGLE/angletypes_unittest.cpp
../../../third_party/angle/src/libANGLE/capture/OWNERS
../../../third_party/angle/src/libANGLE/gen_copy_conversion_table.py
@ -1051,7 +1051,9 @@
../../../third_party/angle/src/libANGLE/renderer/vulkan/gen_vk_mandatory_format_support_table.py
../../../third_party/angle/src/libANGLE/renderer/vulkan/shaders/README.md
../../../third_party/angle/src/libANGLE/renderer/vulkan/shaders/src/third_party/.clang-format
../../../third_party/angle/src/libANGLE/renderer/vulkan/shaders/src/third_party/etc_decoder/README.chromium
../../../third_party/angle/src/libANGLE/renderer/vulkan/shaders/src/third_party/ffx_spd/README.chromium
../../../third_party/angle/src/program_serialize_data_version.py
../../../third_party/angle/src/tests
../../../third_party/angle/src/third_party/ceval/.clang-format
../../../third_party/angle/src/third_party/ceval/README.chromium
@ -2789,7 +2791,6 @@
../../../third_party/vulkan-deps/update-commit-message.py
../../../third_party/vulkan-deps/vulkan-headers/DIR_METADATA
../../../third_party/vulkan-deps/vulkan-headers/README.chromium
../../../third_party/vulkan-deps/vulkan-headers/src/.cmake-format.py
../../../third_party/vulkan-deps/vulkan-headers/src/.git
../../../third_party/vulkan-deps/vulkan-headers/src/.gitattributes
../../../third_party/vulkan-deps/vulkan-headers/src/.github
@ -2797,9 +2798,11 @@
../../../third_party/vulkan-deps/vulkan-headers/src/BUILD.md
../../../third_party/vulkan-deps/vulkan-headers/src/CMakeLists.txt
../../../third_party/vulkan-deps/vulkan-headers/src/CODE_OF_CONDUCT.md
../../../third_party/vulkan-deps/vulkan-headers/src/CONTRIBUTING.md
../../../third_party/vulkan-deps/vulkan-headers/src/README.md
../../../third_party/vulkan-deps/vulkan-headers/src/cmake
../../../third_party/vulkan-deps/vulkan-headers/src/registry
../../../third_party/vulkan-deps/vulkan-headers/src/tests
../../../third_party/vulkan-deps/vulkan-loader
../../../third_party/vulkan-deps/vulkan-tools
../../../third_party/vulkan-deps/vulkan-validation-layers/README.chromium

View File

@ -1,2 +1,2 @@
Signature: 48ebb8e82993ad36a6f8d16f03300065
Signature: 974dd21be7c0e97f436f3758b6de4cee

View File

@ -327,6 +327,30 @@ bool CompilerSkSL::emit_global_variable_resources() {
return emitted;
}
bool CompilerSkSL::emit_undefined_values() {
bool emitted = false;
ir.for_each_typed_id<SPIRUndef>([&](uint32_t, const SPIRUndef& undef) {
auto& type = this->get<SPIRType>(undef.basetype);
// OpUndef can be void for some reason ...
if (type.basetype == SPIRType::Void) {
return;
}
std::string initializer;
if (options.force_zero_initialized_variables &&
type_can_zero_initialize(type)) {
initializer = join(" = ", to_zero_initialized_expression(undef.basetype));
}
statement(variable_decl(type, to_name(undef.self), undef.self), initializer,
";");
emitted = true;
});
return emitted;
}
void CompilerSkSL::emit_resources() {
detect_unsupported_resources();
@ -350,7 +374,9 @@ void CompilerSkSL::emit_resources() {
statement("");
}
declare_undefined_values();
if (emit_undefined_values()) {
statement("");
}
}
void CompilerSkSL::emit_interface_block(const SPIRVariable& var) {

View File

@ -46,6 +46,7 @@ class CompilerSkSL : public spirv_cross::CompilerGLSL {
bool emit_uniform_resources();
bool emit_output_resources();
bool emit_global_variable_resources();
bool emit_undefined_values();
void emit_resources();
void emit_interface_block(const spirv_cross::SPIRVariable& var);

Binary file not shown.

Before

Width:  |  Height:  |  Size: 35 KiB

After

Width:  |  Height:  |  Size: 35 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 34 KiB

After

Width:  |  Height:  |  Size: 34 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 33 KiB

After

Width:  |  Height:  |  Size: 32 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 33 KiB

After

Width:  |  Height:  |  Size: 33 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 36 KiB

After

Width:  |  Height:  |  Size: 35 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 33 KiB

After

Width:  |  Height:  |  Size: 32 KiB

View File

@ -13374,7 +13374,6 @@ shall not be used in advertising or otherwise to promote the sale,
use or other dealings in these Data Files or Software without prior
written authorization of the copyright holder.
--------------------------------------------------------------------------------
vulkan-validation-layers
xxhash
Copyright (C) 2012-2016, Yann Collet
@ -13404,7 +13403,6 @@ THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
--------------------------------------------------------------------------------
vulkan-validation-layers
xxhash
Copyright (C) 2012-2016, Yann Collet.
@ -13422,6 +13420,35 @@ copyright notice, this list of conditions and the following disclaimer
in the documentation and/or other materials provided with the
distribution.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
--------------------------------------------------------------------------------
vulkan-validation-layers
Copyright (C) 2012-2020 Yann Collet
BSD 2-Clause License (https://www.opensource.org/licenses/bsd-license.php)
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above
copyright notice, this list of conditions and the following disclaimer
in the documentation and/or other materials provided with the
distribution.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
@ -21817,30 +21844,8 @@ THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
--------------------------------------------------------------------------------
smhasher
Copyright (c) 2011 Google, Inc.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
--------------------------------------------------------------------------------
accessibility
base
angle
zlib
Copyright (c) 2011 The Chromium Authors. All rights reserved.
@ -22141,7 +22146,7 @@ THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
--------------------------------------------------------------------------------
accessibility
trace_event
angle
Copyright (c) 2013 The Chromium Authors. All rights reserved.
@ -23086,6 +23091,32 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
--------------------------------------------------------------------------------
glslang
Copyright (c) 2018 The Khronos Group Inc.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and/or associated documentation files (the "Materials"),
to deal in the Materials without restriction, including without limitation
the rights to use, copy, modify, merge, publish, distribute, sublicense,
and/or sell copies of the Materials, and to permit persons to whom the
Materials are furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Materials.
MODIFICATIONS TO THIS FILE MAY MEAN IT NO LONGER ACCURATELY REFLECTS KHRONOS
STANDARDS. THE UNMODIFIED, NORMATIVE VERSIONS OF KHRONOS SPECIFICATIONS AND
HEADER INFORMATION ARE LOCATED AT https://www.khronos.org/registry/
THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM,OUT OF OR IN CONNECTION WITH THE MATERIALS OR THE USE OR OTHER DEALINGS
IN THE MATERIALS.
--------------------------------------------------------------------------------
boringssl
Copyright (c) 2018, Google Inc.
@ -23457,6 +23488,29 @@ THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
--------------------------------------------------------------------------------
etc_decoder
Copyright (c) 2020-2022 Hans-Kristian Arntzen
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:
The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
--------------------------------------------------------------------------------
glfw
Copyright (c) 2021 Camilla Löwy <elmindreda@glfw.org>
@ -23579,6 +23633,32 @@ THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
--------------------------------------------------------------------------------
glslang
Copyright (c) 2022 ARM Limited
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and/or associated documentation files (the "Materials"),
to deal in the Materials without restriction, including without limitation
the rights to use, copy, modify, merge, publish, distribute, sublicense,
and/or sell copies of the Materials, and to permit persons to whom the
Materials are furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Materials.
MODIFICATIONS TO THIS FILE MAY MEAN IT NO LONGER ACCURATELY REFLECTS KHRONOS
STANDARDS. THE UNMODIFIED, NORMATIVE VERSIONS OF KHRONOS SPECIFICATIONS AND
HEADER INFORMATION ARE LOCATED AT https://www.khronos.org/registry/
THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM,OUT OF OR IN CONNECTION WITH THE MATERIALS OR THE USE OR OTHER DEALINGS
IN THE MATERIALS.
--------------------------------------------------------------------------------
glfw
Copyright (c) 2022 Camilla Löwy <elmindreda@glfw.org>
@ -25522,7 +25602,7 @@ THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
--------------------------------------------------------------------------------
accessibility
base
angle
icu
zlib
@ -25903,7 +25983,6 @@ THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
--------------------------------------------------------------------------------
angle
base
Copyright 2016 The ANGLE Project Authors. All rights reserved.
@ -26123,7 +26202,6 @@ THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
--------------------------------------------------------------------------------
angle
base
Copyright 2017 The ANGLE Project Authors. All rights reserved.
@ -26158,7 +26236,7 @@ ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
--------------------------------------------------------------------------------
accessibility
base
angle
zlib
Copyright 2017 The Chromium Authors. All rights reserved.
@ -26508,7 +26586,7 @@ THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
--------------------------------------------------------------------------------
accessibility
base
angle
fuchsia_sdk
skia
zlib

View File

@ -578,6 +578,11 @@ def to_gn_args(args):
if get_host_os() == 'win':
gn_args['angle_force_context_check_every_call'] = True
# ANGLE and SwiftShader share build flags to enable X11 and Wayland,
# but we only need these enabled for SwiftShader.
gn_args['angle_use_x11'] = False
gn_args['angle_use_wayland'] = False
# Requires RTTI. We may want to build this in debug modes, punting on that
# for now.
gn_args['angle_enable_vulkan_validation_layers'] = False

View File

@ -118,6 +118,7 @@ final List<RegExp> copyrightStatementPatterns = <RegExp>[
RegExp(r'^(?:[^ ]+ )?Modifications:$', caseSensitive: false),
RegExp(r'^ *Modifications for', caseSensitive: false),
RegExp(r'^ *Modifications of', caseSensitive: false),
RegExp(r'^Modifications Copyright \(C\) .+', caseSensitive: false),
RegExp(r'^\(Royal Institute of Technology, Stockholm, Sweden\)\.$'),
RegExp(r'^FT_Raccess_Get_HeaderInfo\(\) and raccess_guess_darwin_hfsplus\(\) are$'),
RegExp(r'^derived from ftobjs\.c\.$'),
@ -868,7 +869,7 @@ final List<RegExp> csTemplateLicenses = <RegExp>[
kIndent +
// Some files in ANGLE prefix the license with a description of the license.
r'(?:BSD 2-Clause License \(http://www.opensource.org/licenses/bsd-license.php\))?' +
r'(?:BSD 2-Clause License \(https?://www.opensource.org/licenses/bsd-license.php\))?' +
_linebreak +
(