зеркало из https://github.com/AvaloniaUI/angle.git
Revert "Make SPIRV optional for Metal backend"
This reverts commit 29287e1fc7
.
Reason for revert:
Possible root cause of Mac failures http://crbug.com/1320588
Original change's description:
> Make SPIRV optional for Metal backend
>
> This allows clients (ie Skia) to build ANGLE without needing
> all of the additional Vulkan dependencies. Developer builds
> will continue to include both the direct and SPIRV paths, for
> debugging purposes.
>
> Bug: angleproject:7155
> Change-Id: I1c38ee19e747df8b25fd2f8e8efa3b420a4d7766
> Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3605764
> Commit-Queue: Kenneth Russell <kbr@chromium.org>
> Reviewed-by: Kenneth Russell <kbr@chromium.org>
> Auto-Submit: Brian Osman <brianosman@google.com>
> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Bug: chromium:1320588
Change-Id: Id160118146dad1b8f1af40c60ddefd717516cd1d
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3614527
Reviewed-by: Cody Northrop <cnorthrop@google.com>
Commit-Queue: Kenneth Russell <kbr@chromium.org>
Auto-Submit: Cody Northrop <cnorthrop@google.com>
Reviewed-by: Kenneth Russell <kbr@chromium.org>
This commit is contained in:
Родитель
f9729598a6
Коммит
437053a163
11
BUILD.gn
11
BUILD.gn
|
@ -587,8 +587,7 @@ template("translator_lib") {
|
|||
}
|
||||
|
||||
if (!invoker.gl_d3d_only) {
|
||||
if (angle_enable_vulkan || use_fuzzing_engine ||
|
||||
angle_enable_msl_through_spirv) {
|
||||
if (angle_enable_vulkan || use_fuzzing_engine || angle_enable_metal) {
|
||||
_needs_glsl_base = true
|
||||
_needs_glsl_and_vulkan_base = true
|
||||
_uses_spirv = true
|
||||
|
@ -603,10 +602,10 @@ template("translator_lib") {
|
|||
|
||||
if (angle_enable_metal) {
|
||||
sources += angle_translator_lib_metal_sources
|
||||
defines += [ "ANGLE_ENABLE_METAL" ]
|
||||
if (angle_enable_msl_through_spirv) {
|
||||
defines += [ "ANGLE_ENABLE_METAL_SPIRV" ]
|
||||
}
|
||||
defines += [
|
||||
"ANGLE_ENABLE_METAL",
|
||||
"ANGLE_ENABLE_METAL_SPIRV",
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -120,10 +120,6 @@ declare_args() {
|
|||
angle_has_frame_capture = angle_has_rapidjson
|
||||
}
|
||||
|
||||
declare_args() {
|
||||
angle_enable_msl_through_spirv = is_mac && angle_debug_layers_enabled
|
||||
}
|
||||
|
||||
declare_args() {
|
||||
# By default, ANGLE is using a thread pool for parallel compilation.
|
||||
# Activating the delegate worker results in posting the tasks using the
|
||||
|
@ -147,7 +143,7 @@ declare_args() {
|
|||
((is_win && !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)
|
||||
is_android || is_fuchsia || is_ggp || is_mac)
|
||||
|
||||
# When set to true, ANGLE will not use VK_KHR_surface and VK_KHR_swapchain
|
||||
# extensions. Content can be rendered only off-screen.
|
||||
|
@ -204,7 +200,7 @@ declare_args() {
|
|||
# the SPIR-V generation path, but leave it disabled on release. It's still used by the metal
|
||||
# backend nevertheless.
|
||||
angle_enable_spirv_gen_through_glslang =
|
||||
is_debug || angle_assert_always_on || angle_enable_msl_through_spirv ||
|
||||
is_debug || angle_assert_always_on || angle_enable_metal ||
|
||||
angle_use_spirv_gen_through_glslang
|
||||
|
||||
# ISpriteVisual windows cannot be validated and can lead to crashes if an invalid window is
|
||||
|
|
|
@ -11,7 +11,6 @@
|
|||
#define COMPILER_TRANSLATOR_TREEOPS_VULKAN_EARLYFRAGMENTTESTSOPTIMIZATION_H_
|
||||
|
||||
#include "common/angleutils.h"
|
||||
#include "common/debug.h"
|
||||
|
||||
namespace sh
|
||||
{
|
||||
|
|
|
@ -65,6 +65,8 @@ _metal_backend_sources = [
|
|||
"mtl_format_utils.mm",
|
||||
"mtl_glslang_mtl_utils.h",
|
||||
"mtl_glslang_mtl_utils.mm",
|
||||
"mtl_glslang_utils.h",
|
||||
"mtl_glslang_utils.mm",
|
||||
"mtl_occlusion_query_pool.h",
|
||||
"mtl_occlusion_query_pool.mm",
|
||||
"mtl_render_utils.h",
|
||||
|
@ -82,12 +84,11 @@ _metal_backend_sources = [
|
|||
"shaders/rewrite_indices_shared.h",
|
||||
]
|
||||
|
||||
config("angle_metal_spirv_backend_config") {
|
||||
defines = [ "ANGLE_ENABLE_METAL_SPIRV" ]
|
||||
}
|
||||
|
||||
config("angle_metal_backend_config") {
|
||||
defines = [ "ANGLE_ENABLE_METAL" ]
|
||||
defines = [
|
||||
"ANGLE_ENABLE_METAL",
|
||||
"ANGLE_ENABLE_METAL_SPIRV",
|
||||
]
|
||||
ldflags = [
|
||||
"-weak_framework",
|
||||
"Metal",
|
||||
|
@ -115,14 +116,7 @@ angle_source_set("angle_metal_backend") {
|
|||
"${angle_root}:translator",
|
||||
]
|
||||
|
||||
if (angle_enable_msl_through_spirv) {
|
||||
public_configs += [ ":angle_metal_spirv_backend_config" ]
|
||||
deps = [ "${angle_spirv_cross_dir}/gn:spirv_cross_sources" ]
|
||||
sources += [
|
||||
"mtl_glslang_utils.h",
|
||||
"mtl_glslang_utils.mm",
|
||||
]
|
||||
}
|
||||
deps = [ "${angle_spirv_cross_dir}/gn:spirv_cross_sources" ]
|
||||
|
||||
objc_flags = [
|
||||
"-Wno-nullability-completeness",
|
||||
|
|
Загрузка…
Ссылка в новой задаче