зеркало из https://github.com/AvaloniaUI/angle.git
Remove SPIRV_METAL references from .gn and tests
The backend was removed but the references were not. Update ShaderBinaryTest to properly skip tests if shader binaries are unsupported in the current ANGLE backend. Fixed: angleproject:6081 Change-Id: I54bb4080763fbc0dcc2515e71ccd5df5c536db5b Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4591046 Reviewed-by: Kimmo Kinnunen <kkinnunen@apple.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
This commit is contained in:
Родитель
e60f64ddb9
Коммит
f7badd3faa
6
BUILD.gn
6
BUILD.gn
|
@ -704,8 +704,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) {
|
||||
_needs_glsl_base = true
|
||||
_needs_glsl_and_vulkan_base = true
|
||||
_uses_spirv = true
|
||||
|
@ -721,9 +720,6 @@ 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" ]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -153,9 +153,6 @@ declare_args() {
|
|||
|
||||
# Frame capture code is enabled by default if rapidjson is available.
|
||||
angle_has_frame_capture = angle_has_rapidjson
|
||||
|
||||
# By default, include the SPIR-V based MSL translator (in addition to the direct translator)
|
||||
angle_enable_msl_through_spirv = is_mac
|
||||
}
|
||||
|
||||
declare_args() {
|
||||
|
@ -181,7 +178,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)
|
||||
|
||||
# When set to true, ANGLE will not use VK_KHR_surface and VK_KHR_swapchain
|
||||
# extensions. Content can be rendered only off-screen.
|
||||
|
|
|
@ -188,18 +188,6 @@ TEST_P(APPLEClipDistanceTest, CompileSucceedsMetal)
|
|||
}
|
||||
#endif
|
||||
|
||||
#if defined(ANGLE_ENABLE_METAL_SPIRV)
|
||||
// With extension flag and extension directive, compiling using TranslatorMetal succeeds.
|
||||
TEST_P(APPLEClipDistanceTest, CompileSucceedsMetalSPIRV)
|
||||
{
|
||||
mResources.APPLE_clip_distance = 1;
|
||||
mResources.MaxClipDistances = 8;
|
||||
|
||||
InitializeCompiler(SH_SPIRV_METAL_OUTPUT);
|
||||
EXPECT_TRUE(TestShaderCompile(EXTPragma));
|
||||
}
|
||||
#endif
|
||||
|
||||
// The SL #version 100 shaders that are correct work similarly
|
||||
// in both GL2 and GL3, with and without the version string.
|
||||
INSTANTIATE_TEST_SUITE_P(CorrectESSL100Shaders,
|
||||
|
|
|
@ -33,6 +33,13 @@ class ShaderBinaryTest : public ANGLETest<>
|
|||
{
|
||||
ASSERT_EQ(sh::Initialize(), true);
|
||||
|
||||
if (!supported())
|
||||
{
|
||||
// Must return early because the initialization below will crash otherwise.
|
||||
// Individal tests will skip themselves as well.
|
||||
return;
|
||||
}
|
||||
|
||||
mCompileOptions.objectCode = true;
|
||||
mCompileOptions.emulateGLDrawID = true;
|
||||
mCompileOptions.initializeUninitializedLocals = true;
|
||||
|
@ -73,6 +80,13 @@ class ShaderBinaryTest : public ANGLETest<>
|
|||
void testTearDown() override
|
||||
{
|
||||
sh::Finalize();
|
||||
|
||||
if (!supported())
|
||||
{
|
||||
// Return early because the initialization didn't complete.
|
||||
return;
|
||||
}
|
||||
|
||||
glDeleteBuffers(1, &mBuffer);
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче