Remove feature override platform methods

Instead, the tests now use the enable() functions to override the
feature at platform level.

This fixes the forceFallbackFormat feature mistakenly not having been
tested.

Bug: angleproject:6435
Change-Id: I605e4133407282bd52232887b595af0d2c13575d
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3577369
Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
This commit is contained in:
Shahbaz Youssefi 2022-04-09 01:03:53 -04:00 коммит произвёл Angle LUCI CQ
Родитель a0b5299b6e
Коммит 8074061d24
18 изменённых файлов: 80 добавлений и 165 удалений

Просмотреть файл

@ -217,23 +217,6 @@ inline void DefaultHistogramSparse(PlatformMethods *platform, const char *name,
using HistogramBooleanFunc = void (*)(PlatformMethods *platform, const char *name, bool sample);
inline void DefaultHistogramBoolean(PlatformMethods *platform, const char *name, bool sample) {}
// Allows us to programatically override ANGLE's default workarounds for testing purposes.
using OverrideWorkaroundsD3DFunc = void (*)(PlatformMethods *platform,
angle::FeaturesD3D *featuresD3D);
inline void DefaultOverrideWorkaroundsD3D(PlatformMethods *platform,
angle::FeaturesD3D *featuresD3D)
{}
using OverrideFeaturesVkFunc = void (*)(PlatformMethods *platform,
angle::FeaturesVk *featuresVulkan);
inline void DefaultOverrideFeaturesVk(PlatformMethods *platform, angle::FeaturesVk *featuresVulkan)
{}
using OverrideFeaturesMtlFunc = void (*)(PlatformMethods *platform,
angle::FeaturesMtl *featuresMetal);
inline void DefaultOverrideFeaturesMtl(PlatformMethods *platform, angle::FeaturesMtl *featuresMetal)
{}
// Callback on a successful program link with the program binary. Can be used to store
// shaders to disk. Keys are a 160-bit SHA-1 hash.
using ProgramKeyType = std::array<uint8_t, 20>;
@ -253,6 +236,13 @@ using PostWorkerTaskFunc = void (*)(PlatformMethods *p
void *userData);
constexpr PostWorkerTaskFunc DefaultPostWorkerTask = nullptr;
// Placeholder values where feature override callbacks used to be. They are deprecated in favor of
// EGL_ANGLE_feature_control. The placeholders are there to keep the layout of the PlatformMethods
// constant to support drop-in replacement of ANGLE's .so files in applications built with an older
// header.
using PlaceholderCallbackFunc = void (*)(...);
inline void DefaultPlaceholderCallback(...) {}
// Platform methods are enumerated here once.
#define ANGLE_PLATFORM_OP(OP) \
OP(currentTime, CurrentTime) \
@ -267,10 +257,10 @@ constexpr PostWorkerTaskFunc DefaultPostWorkerTask = nullptr;
OP(histogramEnumeration, HistogramEnumeration) \
OP(histogramSparse, HistogramSparse) \
OP(histogramBoolean, HistogramBoolean) \
OP(overrideWorkaroundsD3D, OverrideWorkaroundsD3D) \
OP(overrideFeaturesVk, OverrideFeaturesVk) \
OP(placeholder1, PlaceholderCallback) \
OP(placeholder2, PlaceholderCallback) \
OP(cacheProgram, CacheProgram) \
OP(overrideFeaturesMtl, OverrideFeaturesMtl) \
OP(placeholder3, PlaceholderCallback) \
OP(postWorkerTask, PostWorkerTask)
#define ANGLE_PLATFORM_METHOD_DEF(Name, CapsName) CapsName##Func Name = Default##CapsName;
@ -294,6 +284,11 @@ inline PlatformMethods::PlatformMethods() = default;
// Subtract one to account for the context pointer.
constexpr unsigned int g_NumPlatformMethods = (sizeof(PlatformMethods) / sizeof(uintptr_t)) - 1;
// No further uses of platform methods is allowed. EGL extensions should be used instead. While
// methods are being removed, use PlaceholderCallback to keep the layout of PlatformMethods
// constant.
static_assert(g_NumPlatformMethods == 17, "Avoid adding methods to PlatformMethods");
#define ANGLE_PLATFORM_METHOD_STRING(Name) #Name
#define ANGLE_PLATFORM_METHOD_STRING2(Name, CapsName) ANGLE_PLATFORM_METHOD_STRING(Name),

Просмотреть файл

@ -2505,10 +2505,6 @@ void InitializeFeatures(const Renderer11DeviceCaps &deviceCaps,
// to work around a slow fxc compile performance issue with dynamic uniform indexing.
ANGLE_FEATURE_CONDITION(features, allowTranslateUniformBlockToStructuredBuffer,
IsWin10OrGreater());
// Call platform hooks for testing overrides.
auto *platform = ANGLEPlatformCurrent();
platform->overrideWorkaroundsD3D(platform, features);
}
void InitConstantBufferDesc(D3D11_BUFFER_DESC *constantBufferDescription, size_t byteWidth)

Просмотреть файл

@ -839,10 +839,6 @@ void InitializeFeatures(angle::FeaturesD3D *features)
// crbug.com/1011627 Turn this on for D3D9.
ANGLE_FEATURE_CONDITION(features, allowClearForRobustResourceInit, true);
// Call platform hooks for testing overrides.
auto *platform = ANGLEPlatformCurrent();
platform->overrideWorkaroundsD3D(platform, features);
}
} // namespace d3d9

Просмотреть файл

@ -1103,9 +1103,6 @@ void DisplayMtl::initializeFeatures()
ANGLE_FEATURE_CONDITION((&mFeatures), directMetalGeneration, defaultDirectToMetal);
angle::PlatformMethods *platform = ANGLEPlatformCurrent();
platform->overrideFeaturesMtl(platform, &mFeatures);
ApplyFeatureOverrides(&mFeatures, getState());
#ifdef ANGLE_ENABLE_ASSERTS
fprintf(stderr, "Shader compiler output: %s\n",

Просмотреть файл

@ -3319,9 +3319,6 @@ void RendererVk::initFeatures(DisplayVk *displayVk,
ANGLE_FEATURE_CONDITION(&mFeatures, generateSPIRVThroughGlslang, kUseSpirvGenThroughGlslang);
angle::PlatformMethods *platform = ANGLEPlatformCurrent();
platform->overrideFeaturesVk(platform, &mFeatures);
ApplyFeatureOverrides(&mFeatures, displayVk->getState());
// Disable async command queue when using Vulkan secondary command buffers temporarily to avoid

Просмотреть файл

@ -235,6 +235,8 @@ class MaskedScissoredClearTestBase
class MaskedScissoredClearTest : public MaskedScissoredClearTestBase
{};
// Overrides a feature to force emulation of stencil-only and depth-only formats with a packed
// depth/stencil format
class VulkanClearTest : public MaskedScissoredClearTestBase
{
protected:
@ -287,13 +289,6 @@ class VulkanClearTest : public MaskedScissoredClearTestBase
mHasStencil = false;
}
// Override a feature to force emulation of stencil-only and depth-only formats with a packed
// depth/stencil format
void overrideFeaturesVk(FeaturesVk *featuresVk) override
{
featuresVk->overrideFeatures({"force_fallback_format"}, true);
}
private:
GLFramebuffer mColorStencilFBO;
GLFramebuffer mColorDepthFBO;
@ -2880,17 +2875,8 @@ ANGLE_INSTANTIATE_TEST_COMBINE_4(MaskedScissoredClearTest,
testing::Range(0, 3),
testing::Range(0, 3),
testing::Bool(),
ES2_D3D9(),
ES2_D3D11(),
ES3_D3D11(),
ES2_OPENGL(),
ES3_OPENGL(),
ES2_OPENGLES(),
ES3_OPENGLES(),
ES2_VULKAN(),
ES3_VULKAN(),
ES2_METAL(),
ES3_METAL());
ANGLE_ALL_TEST_PLATFORMS_ES2,
ANGLE_ALL_TEST_PLATFORMS_ES3);
GTEST_ALLOW_UNINSTANTIATED_PARAMETERIZED_TEST(VulkanClearTest);
ANGLE_INSTANTIATE_TEST_COMBINE_4(VulkanClearTest,
@ -2899,8 +2885,10 @@ ANGLE_INSTANTIATE_TEST_COMBINE_4(VulkanClearTest,
testing::Range(0, 3),
testing::Range(0, 3),
testing::Bool(),
ES2_VULKAN(),
ES3_VULKAN());
ES2_VULKAN().enable(Feature::ForceFallbackFormat),
ES2_VULKAN_SWIFTSHADER().enable(Feature::ForceFallbackFormat),
ES3_VULKAN().enable(Feature::ForceFallbackFormat),
ES3_VULKAN_SWIFTSHADER().enable(Feature::ForceFallbackFormat));
// Not all ANGLE backends support RGB backbuffers
GTEST_ALLOW_UNINSTANTIATED_PARAMETERIZED_TEST(ClearTestRGB);

Просмотреть файл

@ -1137,12 +1137,6 @@ class TinyDepthStencilWorkaroundTest : public ANGLETest
setConfigBlueBits(8);
setConfigAlphaBits(8);
}
// Override the features to enable "tiny" depth/stencil textures.
void overrideWorkaroundsD3D(FeaturesD3D *features) override
{
features->overrideFeatures({"emulate_tiny_stencil_textures"}, true);
}
};
// Tests that the tiny depth stencil textures workaround does not "stick" depth textures.
@ -1260,4 +1254,5 @@ TEST_P(TinyDepthStencilWorkaroundTest, DepthTexturesStick)
}
GTEST_ALLOW_UNINSTANTIATED_PARAMETERIZED_TEST(TinyDepthStencilWorkaroundTest);
ANGLE_INSTANTIATE_TEST_ES3(TinyDepthStencilWorkaroundTest);
ANGLE_INSTANTIATE_TEST_ES3_AND(TinyDepthStencilWorkaroundTest,
ES3_D3D11().enable(Feature::EmulateTinyStencilTextures));

Просмотреть файл

@ -82,13 +82,6 @@ class DepthStencilTest : public ANGLETest
mHasStencil = false;
}
// Override a feature to force emulation of stencil-only and depth-only formats with a packed
// depth/stencil format
void overrideFeaturesVk(FeaturesVk *featuresVk) override
{
featuresVk->overrideFeatures({"force_fallback_format"}, true);
}
void prepareSingleEmulatedWithPacked();
void ensureColor(GLColor color);
void ensureDepthUnaffected();
@ -678,9 +671,16 @@ TEST_P(DepthStencilTestES3, ReadOnlyDepthStencilThenOutputDepthStencil)
EXPECT_PIXEL_COLOR_EQ(kSize / 2, kSize / 2, GLColor::yellow);
}
ANGLE_INSTANTIATE_TEST_ES2_AND_ES3(DepthStencilTest);
ANGLE_INSTANTIATE_TEST_ES2_AND_ES3_AND(
DepthStencilTest,
ES2_VULKAN().enable(Feature::ForceFallbackFormat),
ES2_VULKAN_SWIFTSHADER().enable(Feature::ForceFallbackFormat),
ES3_VULKAN().enable(Feature::ForceFallbackFormat),
ES3_VULKAN_SWIFTSHADER().enable(Feature::ForceFallbackFormat));
GTEST_ALLOW_UNINSTANTIATED_PARAMETERIZED_TEST(DepthStencilTestES3);
ANGLE_INSTANTIATE_TEST_ES3(DepthStencilTestES3);
ANGLE_INSTANTIATE_TEST_ES3_AND(DepthStencilTestES3,
ES3_VULKAN().enable(Feature::ForceFallbackFormat),
ES3_VULKAN_SWIFTSHADER().enable(Feature::ForceFallbackFormat));
} // anonymous namespace

Просмотреть файл

@ -2885,11 +2885,6 @@ class AddMockTextureNoRenderTargetTest : public ANGLETest
setConfigBlueBits(8);
setConfigAlphaBits(8);
}
void overrideWorkaroundsD3D(FeaturesD3D *features) override
{
features->overrideFeatures({"add_mock_texture_no_render_target"}, true);
}
};
// Test to verify workaround succeeds when no program outputs exist http://anglebug.com/2283
@ -4545,7 +4540,10 @@ TEST_P(FramebufferTest_ES3, InvalidateClearDraw)
EXPECT_PIXEL_COLOR_EQ(0, 0, GLColor::magenta);
}
ANGLE_INSTANTIATE_TEST_ES2(AddMockTextureNoRenderTargetTest);
ANGLE_INSTANTIATE_TEST_ES2_AND(AddMockTextureNoRenderTargetTest,
ES2_D3D9().enable(Feature::AddMockTextureNoRenderTarget),
ES2_D3D11().enable(Feature::AddMockTextureNoRenderTarget));
ANGLE_INSTANTIATE_TEST_ES2(FramebufferTest);
ANGLE_INSTANTIATE_TEST_ES2_AND_ES3(FramebufferFormatsTest);

Просмотреть файл

@ -285,12 +285,6 @@ class MultiviewRenderTest : public MultiviewFramebufferTestBase
protected:
MultiviewRenderTest() : MultiviewFramebufferTestBase(GetParam(), GetParam().mSamples) {}
void overrideWorkaroundsD3D(FeaturesD3D *features) override
{
features->overrideFeatures({"select_view_in_geometry_shader"},
GetParam().mForceUseGeometryShaderOnD3D);
}
virtual void testSetUp() {}
virtual void testTearDown() {}
@ -528,11 +522,6 @@ class MultiviewLayeredRenderTest : public MultiviewFramebufferTestBase
MultiviewLayeredRenderTest() : MultiviewFramebufferTestBase(GetParam(), 0) {}
void SetUp() final { MultiviewFramebufferTestBase::FramebufferTestSetUp(); }
void TearDown() final { MultiviewFramebufferTestBase::FramebufferTestTearDown(); }
void overrideWorkaroundsD3D(FeaturesD3D *features) final
{
features->overrideFeatures({"select_view_in_geometry_shader"},
GetParam().mForceUseGeometryShaderOnD3D);
}
};
// The test verifies that glDraw*Indirect works for any number of views.

Просмотреть файл

@ -298,12 +298,6 @@ class VertexAttributeTest : public ANGLETest
glDeleteBuffers(1, &mBuffer);
}
// Override a feature to force emulation of attribute formats.
void overrideFeaturesVk(FeaturesVk *featuresVk) override
{
featuresVk->overrideFeatures({"force_fallback_format"}, true);
}
GLuint compileMultiAttribProgram(GLint attribCount)
{
std::stringstream shaderStream;
@ -4136,32 +4130,44 @@ TEST_P(VertexAttributeTestES3, emptyBuffer)
# define EMULATED_VAO_CONFIGS
#endif
// Use this to select which configurations (e.g. which renderer, which GLES major version) these
// tests should be run against.
// D3D11 Feature Level 9_3 uses different D3D formats for vertex attribs compared to Feature Levels
// 10_0+, so we should test them separately.
ANGLE_INSTANTIATE_TEST_ES2_AND_ES3_AND(
VertexAttributeTest,
ES2_VULKAN().enable(Feature::ForceFallbackFormat),
ES2_VULKAN_SWIFTSHADER().enable(Feature::ForceFallbackFormat),
ES3_VULKAN().enable(Feature::ForceFallbackFormat),
ES3_VULKAN_SWIFTSHADER().enable(Feature::ForceFallbackFormat),
ES3_METAL().disable(Feature::HasExplicitMemBarrier).disable(Feature::HasCheapRenderPass),
ES3_METAL().disable(Feature::HasExplicitMemBarrier).enable(Feature::HasCheapRenderPass),
EMULATED_VAO_CONFIGS);
ANGLE_INSTANTIATE_TEST_ES2_AND_ES3_AND(
VertexAttributeOORTest,
ES2_VULKAN().enable(Feature::ForceFallbackFormat),
ES2_VULKAN_SWIFTSHADER().enable(Feature::ForceFallbackFormat),
ES3_VULKAN().enable(Feature::ForceFallbackFormat),
ES3_VULKAN_SWIFTSHADER().enable(Feature::ForceFallbackFormat),
ES3_METAL().disable(Feature::HasExplicitMemBarrier).disable(Feature::HasCheapRenderPass),
ES3_METAL().disable(Feature::HasExplicitMemBarrier).enable(Feature::HasCheapRenderPass));
GTEST_ALLOW_UNINSTANTIATED_PARAMETERIZED_TEST(VertexAttributeTestES3);
ANGLE_INSTANTIATE_TEST_ES3_AND(
VertexAttributeTestES3,
ES3_VULKAN().enable(Feature::ForceFallbackFormat),
ES3_VULKAN_SWIFTSHADER().enable(Feature::ForceFallbackFormat),
ES3_METAL().disable(Feature::HasExplicitMemBarrier).disable(Feature::HasCheapRenderPass),
ES3_METAL().disable(Feature::HasExplicitMemBarrier).enable(Feature::HasCheapRenderPass));
GTEST_ALLOW_UNINSTANTIATED_PARAMETERIZED_TEST(VertexAttributeTestES31);
ANGLE_INSTANTIATE_TEST_ES31(VertexAttributeTestES31);
ANGLE_INSTANTIATE_TEST_ES31_AND(VertexAttributeTestES31,
ES31_VULKAN().enable(Feature::ForceFallbackFormat),
ES31_VULKAN_SWIFTSHADER().enable(Feature::ForceFallbackFormat));
ANGLE_INSTANTIATE_TEST_ES2_AND_ES3_AND(
VertexAttributeCachingTest,
ES2_VULKAN().enable(Feature::ForceFallbackFormat),
ES2_VULKAN_SWIFTSHADER().enable(Feature::ForceFallbackFormat),
ES3_VULKAN().enable(Feature::ForceFallbackFormat),
ES3_VULKAN_SWIFTSHADER().enable(Feature::ForceFallbackFormat),
ES3_METAL().disable(Feature::HasExplicitMemBarrier).disable(Feature::HasCheapRenderPass),
ES3_METAL().disable(Feature::HasExplicitMemBarrier).enable(Feature::HasCheapRenderPass));

Просмотреть файл

@ -69,12 +69,6 @@ void CustomLogError(PlatformMethods *platform, const char *errorMessage)
angleRenderTest->onErrorMessage(errorMessage);
}
void OverrideWorkaroundsD3D(PlatformMethods *platform, FeaturesD3D *featuresD3D)
{
auto *angleRenderTest = static_cast<ANGLERenderTest *>(platform->context);
angleRenderTest->overrideWorkaroundsD3D(featuresD3D);
}
TraceEventHandle AddPerfTraceEvent(PlatformMethods *platform,
char phase,
const unsigned char *categoryEnabledFlag,
@ -763,7 +757,6 @@ void ANGLERenderTest::SetUp()
return;
}
mPlatformMethods.overrideWorkaroundsD3D = OverrideWorkaroundsD3D;
mPlatformMethods.logError = CustomLogError;
mPlatformMethods.logWarning = EmptyPlatformMethod;
mPlatformMethods.logInfo = EmptyPlatformMethod;

Просмотреть файл

@ -88,6 +88,11 @@ struct MultiviewPerfParams final : public RenderTestParams
multiviewOption = multiviewOptionIn;
numViews = 2;
multiviewExtension = multiviewExtensionIn;
if (multiviewOption == MultiviewOption::InstancedMultiviewGeometryShader)
{
eglParameters.enable(Feature::SelectViewInGeometryShader);
}
}
std::string story() const override
@ -169,13 +174,6 @@ class MultiviewBenchmark : public ANGLERenderTest,
void initializeBenchmark() override;
void drawBenchmark() final;
void overrideWorkaroundsD3D(FeaturesD3D *features) override
{
features->overrideFeatures(
{"select_view_in_geometry_shader"},
GetParam().multiviewOption == MultiviewOption::InstancedMultiviewGeometryShader);
}
protected:
virtual void renderScene() = 0;

Просмотреть файл

@ -84,24 +84,6 @@ void TestPlatform_logWarning(PlatformMethods *platform, const char *warningMessa
void TestPlatform_logInfo(PlatformMethods *platform, const char *infoMessage) {}
void TestPlatform_overrideWorkaroundsD3D(PlatformMethods *platform, FeaturesD3D *featuresD3D)
{
auto *testPlatformContext = static_cast<TestPlatformContext *>(platform->context);
if (testPlatformContext->currentTest)
{
testPlatformContext->currentTest->overrideWorkaroundsD3D(featuresD3D);
}
}
void TestPlatform_overrideFeaturesVk(PlatformMethods *platform, FeaturesVk *featuresVulkan)
{
auto *testPlatformContext = static_cast<TestPlatformContext *>(platform->context);
if (testPlatformContext->currentTest)
{
testPlatformContext->currentTest->overrideFeaturesVk(featuresVulkan);
}
}
const std::array<Vector3, 6> kQuadVertices = {{
Vector3(-1.0f, 1.0f, 0.5f),
Vector3(-1.0f, -1.0f, 0.5f),
@ -611,12 +593,10 @@ void ANGLETestBase::ANGLETestSetUp()
angle::Sleep(GetTestStartDelaySeconds() * 1000);
}
gDefaultPlatformMethods.overrideWorkaroundsD3D = TestPlatform_overrideWorkaroundsD3D;
gDefaultPlatformMethods.overrideFeaturesVk = TestPlatform_overrideFeaturesVk;
gDefaultPlatformMethods.logError = TestPlatform_logError;
gDefaultPlatformMethods.logWarning = TestPlatform_logWarning;
gDefaultPlatformMethods.logInfo = TestPlatform_logInfo;
gDefaultPlatformMethods.context = &gPlatformContext;
gDefaultPlatformMethods.logError = TestPlatform_logError;
gDefaultPlatformMethods.logWarning = TestPlatform_logWarning;
gDefaultPlatformMethods.logInfo = TestPlatform_logInfo;
gDefaultPlatformMethods.context = &gPlatformContext;
gPlatformContext.ignoreMessages = false;
gPlatformContext.warningsAsErrors = false;

Просмотреть файл

@ -362,9 +362,6 @@ class ANGLETestBase
public:
void setWindowVisible(OSWindow *osWindow, bool isVisible);
virtual void overrideWorkaroundsD3D(angle::FeaturesD3D *featuresD3D) {}
virtual void overrideFeaturesVk(angle::FeaturesVk *featuresVulkan) {}
static void ReleaseFixtures();
bool isSwiftshader() const

Просмотреть файл

@ -220,14 +220,6 @@ std::ostream &operator<<(std::ostream &os, const MultiviewImplementationParams &
{
const PlatformParameters &base = static_cast<const PlatformParameters &>(params);
os << base << "_";
if (params.mForceUseGeometryShaderOnD3D)
{
os << "_force_geom_shader";
}
else
{
os << "_vertex_shader";
}
if (params.mMultiviewExtension)
{
os << "_multiview";
@ -243,7 +235,7 @@ MultiviewImplementationParams VertexShaderOpenGL(GLint majorVersion,
GLint minorVersion,
ExtensionName multiviewExtension)
{
return MultiviewImplementationParams(majorVersion, minorVersion, false, egl_platform::OPENGL(),
return MultiviewImplementationParams(majorVersion, minorVersion, egl_platform::OPENGL(),
multiviewExtension);
}
@ -251,7 +243,7 @@ MultiviewImplementationParams VertexShaderVulkan(GLint majorVersion,
GLint minorVersion,
ExtensionName multiviewExtension)
{
return MultiviewImplementationParams(majorVersion, minorVersion, false, egl_platform::VULKAN(),
return MultiviewImplementationParams(majorVersion, minorVersion, egl_platform::VULKAN(),
multiviewExtension);
}
@ -259,7 +251,7 @@ MultiviewImplementationParams VertexShaderD3D11(GLint majorVersion,
GLint minorVersion,
ExtensionName multiviewExtension)
{
return MultiviewImplementationParams(majorVersion, minorVersion, false, egl_platform::D3D11(),
return MultiviewImplementationParams(majorVersion, minorVersion, egl_platform::D3D11(),
multiviewExtension);
}
@ -267,14 +259,9 @@ MultiviewImplementationParams GeomShaderD3D11(GLint majorVersion,
GLint minorVersion,
ExtensionName multiviewExtension)
{
return MultiviewImplementationParams(majorVersion, minorVersion, true, egl_platform::D3D11(),
multiviewExtension);
}
void MultiviewTest::overrideWorkaroundsD3D(FeaturesD3D *features)
{
features->overrideFeatures({"select_view_in_geometry_shader"},
GetParam().mForceUseGeometryShaderOnD3D);
return MultiviewImplementationParams(
majorVersion, minorVersion,
egl_platform::D3D11().enable(Feature::SelectViewInGeometryShader), multiviewExtension);
}
} // namespace angle

Просмотреть файл

@ -64,14 +64,11 @@ struct MultiviewImplementationParams : public PlatformParameters
{
MultiviewImplementationParams(GLint majorVersion,
GLint minorVersion,
bool forceUseGeometryShaderOnD3D,
const EGLPlatformParameters &eglPlatformParameters,
ExtensionName multiviewExtension)
: PlatformParameters(majorVersion, minorVersion, eglPlatformParameters),
mForceUseGeometryShaderOnD3D(forceUseGeometryShaderOnD3D),
mMultiviewExtension(multiviewExtension)
{}
bool mForceUseGeometryShaderOnD3D;
ExtensionName mMultiviewExtension;
};
std::ostream &operator<<(std::ostream &os, const MultiviewImplementationParams &params);
@ -112,8 +109,6 @@ class MultiviewTest : public MultiviewTestBase,
protected:
MultiviewTest() : MultiviewTestBase(GetParam()) {}
void overrideWorkaroundsD3D(FeaturesD3D *features) final;
virtual void testSetUp() {}
virtual void testTearDown() {}

Просмотреть файл

@ -69,8 +69,16 @@ struct EGLPlatformParameters
// Helpers to enable and disable ANGLE features. Expects a kFeature* value from
// angle_features_autogen.h.
void enable(angle::Feature feature) { enabledFeatureOverrides.push_back(feature); }
void disable(angle::Feature feature) { disabledFeatureOverrides.push_back(feature); }
EGLPlatformParameters &enable(angle::Feature feature)
{
enabledFeatureOverrides.push_back(feature);
return *this;
}
EGLPlatformParameters &disable(angle::Feature feature)
{
disabledFeatureOverrides.push_back(feature);
return *this;
}
EGLint renderer = EGL_PLATFORM_ANGLE_TYPE_DEFAULT_ANGLE;
EGLint majorVersion = EGL_DONT_CARE;