Commit eee67c6e by Jonah Ryan-Davis Committed by Commit Bot

Fix Platform.h integration with ANGLE

A function was renamed which broke the platformMethods table strings. This CL reverts the rename (originally from crrev/c/1660952) Bug: angleproject:1621 Change-Id: I8121a4956ba1d3e3c5036f72f6f1fdf5509dc491 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1664792Reviewed-by: 's avatarJamie Madill <jmadill@chromium.org> Commit-Queue: Jonah Ryan-Davis <jonahr@google.com>
parent 124f78c2
......@@ -214,9 +214,10 @@ using HistogramBooleanFunc = void (*)(PlatformMethods *platform, const char *nam
inline void DefaultHistogramBoolean(PlatformMethods *platform, const char *name, bool sample) {}
// Allows us to programatically override ANGLE's default workarounds for testing purposes.
using OverrideFeaturesD3DFunc = void (*)(PlatformMethods *platform,
angle::FeaturesD3D *featuresD3D);
inline void DefaultOverrideFeaturesD3D(PlatformMethods *platform, angle::FeaturesD3D *featuresD3D)
using OverrideWorkaroundsD3DFunc = void (*)(PlatformMethods *platform,
angle::FeaturesD3D *featuresD3D);
inline void DefaultOverrideWorkaroundsD3D(PlatformMethods *platform,
angle::FeaturesD3D *featuresD3D)
{}
using OverrideFeaturesVkFunc = void (*)(PlatformMethods *platform,
......@@ -251,7 +252,7 @@ inline void DefaultCacheProgram(PlatformMethods *platform,
OP(histogramEnumeration, HistogramEnumeration) \
OP(histogramSparse, HistogramSparse) \
OP(histogramBoolean, HistogramBoolean) \
OP(overrideFeaturesD3D, OverrideFeaturesD3D) \
OP(overrideWorkaroundsD3D, OverrideWorkaroundsD3D) \
OP(overrideFeaturesVk, OverrideFeaturesVk) \
OP(cacheProgram, CacheProgram)
......
......@@ -2450,7 +2450,7 @@ void InitializeFeatures(const Renderer11DeviceCaps &deviceCaps,
// Call platform hooks for testing overrides.
auto *platform = ANGLEPlatformCurrent();
platform->overrideFeaturesD3D(platform, features);
platform->overrideWorkaroundsD3D(platform, features);
}
void InitConstantBufferDesc(D3D11_BUFFER_DESC *constantBufferDescription, size_t byteWidth)
......
......@@ -814,7 +814,7 @@ void InitializeFeatures(angle::FeaturesD3D *features)
// Call platform hooks for testing overrides.
auto *platform = ANGLEPlatformCurrent();
platform->overrideFeaturesD3D(platform, features);
platform->overrideWorkaroundsD3D(platform, features);
}
} // namespace d3d9
......
......@@ -659,7 +659,7 @@ class TinyDepthStencilWorkaroundTest : public ANGLETest
}
// Override the features to enable "tiny" depth/stencil textures.
void overrideFeaturesD3D(FeaturesD3D *features) override
void overrideWorkaroundsD3D(FeaturesD3D *features) override
{
features->overrideFeatures({"emulate_tiny_stencil_textures"}, true);
}
......
......@@ -924,7 +924,7 @@ class AddDummyTextureNoRenderTargetTest : public ANGLETest
setConfigAlphaBits(8);
}
void overrideFeaturesD3D(FeaturesD3D *features) override
void overrideWorkaroundsD3D(FeaturesD3D *features) override
{
features->overrideFeatures({"add_dummy_texture_no_render_target"}, true);
}
......
......@@ -285,7 +285,7 @@ class MultiviewRenderTest : public MultiviewFramebufferTestBase
protected:
MultiviewRenderTest() : MultiviewFramebufferTestBase(GetParam(), GetParam().mSamples) {}
void overrideFeaturesD3D(FeaturesD3D *features) override
void overrideWorkaroundsD3D(FeaturesD3D *features) override
{
features->overrideFeatures({"select_view_in_geometry_shader"},
GetParam().mForceUseGeometryShaderOnD3D);
......@@ -527,7 +527,7 @@ class MultiviewLayeredRenderTest : public MultiviewFramebufferTestBase
MultiviewLayeredRenderTest() : MultiviewFramebufferTestBase(GetParam(), 0) {}
void SetUp() final { MultiviewFramebufferTestBase::FramebufferTestSetUp(); }
void TearDown() final { MultiviewFramebufferTestBase::FramebufferTestTearDown(); }
void overrideFeaturesD3D(FeaturesD3D *features) final
void overrideWorkaroundsD3D(FeaturesD3D *features) final
{
features->overrideFeatures({"select_view_in_geometry_shader"},
GetParam().mForceUseGeometryShaderOnD3D);
......
......@@ -51,10 +51,10 @@ constexpr TraceCategory gTraceCategories[2] = {
void EmptyPlatformMethod(angle::PlatformMethods *, const char *) {}
void OverrideFeaturesD3D(angle::PlatformMethods *platform, angle::FeaturesD3D *featuresD3D)
void OverrideWorkaroundsD3D(angle::PlatformMethods *platform, angle::FeaturesD3D *featuresD3D)
{
auto *angleRenderTest = static_cast<ANGLERenderTest *>(platform->context);
angleRenderTest->overrideFeaturesD3D(featuresD3D);
angleRenderTest->overrideWorkaroundsD3D(featuresD3D);
}
angle::TraceEventHandle AddTraceEvent(angle::PlatformMethods *platform,
......@@ -416,7 +416,7 @@ void ANGLERenderTest::SetUp()
return;
}
mPlatformMethods.overrideFeaturesD3D = OverrideFeaturesD3D;
mPlatformMethods.overrideWorkaroundsD3D = OverrideWorkaroundsD3D;
mPlatformMethods.logError = EmptyPlatformMethod;
mPlatformMethods.logWarning = EmptyPlatformMethod;
mPlatformMethods.logInfo = EmptyPlatformMethod;
......
......@@ -136,7 +136,7 @@ class ANGLERenderTest : public ANGLEPerfTest
std::vector<TraceEvent> &getTraceEventBuffer();
virtual void overrideFeaturesD3D(angle::FeaturesD3D *featuresD3D) {}
virtual void overrideWorkaroundsD3D(angle::FeaturesD3D *featuresD3D) {}
protected:
const RenderTestParams &mTestParams;
......
......@@ -169,7 +169,7 @@ class MultiviewBenchmark : public ANGLERenderTest,
void initializeBenchmark() override;
void drawBenchmark() final;
void overrideFeaturesD3D(FeaturesD3D *features) override
void overrideWorkaroundsD3D(FeaturesD3D *features) override
{
features->overrideFeatures(
{"select_view_in_geometry_shader"},
......
......@@ -80,12 +80,12 @@ void TestPlatform_logWarning(PlatformMethods *platform, const char *warningMessa
void TestPlatform_logInfo(PlatformMethods *platform, const char *infoMessage) {}
void TestPlatform_overrideFeaturesD3D(PlatformMethods *platform, FeaturesD3D *featuresD3D)
void TestPlatform_overrideWorkaroundsD3D(PlatformMethods *platform, FeaturesD3D *featuresD3D)
{
auto *testPlatformContext = static_cast<TestPlatformContext *>(platform->context);
if (testPlatformContext->currentTest)
{
testPlatformContext->currentTest->overrideFeaturesD3D(featuresD3D);
testPlatformContext->currentTest->overrideWorkaroundsD3D(featuresD3D);
}
}
......@@ -490,7 +490,7 @@ void ANGLETestBase::ANGLETestSetUp()
InitCrashHandler();
gDefaultPlatformMethods.overrideFeaturesD3D = TestPlatform_overrideFeaturesD3D;
gDefaultPlatformMethods.overrideWorkaroundsD3D = TestPlatform_overrideWorkaroundsD3D;
gDefaultPlatformMethods.overrideFeaturesVk = TestPlatform_overrideFeaturesVk;
gDefaultPlatformMethods.logError = TestPlatform_logError;
gDefaultPlatformMethods.logWarning = TestPlatform_logWarning;
......
......@@ -287,7 +287,7 @@ class ANGLETestBase
public:
void setWindowVisible(bool isVisible);
virtual void overrideFeaturesD3D(angle::FeaturesD3D *featuresD3D) {}
virtual void overrideWorkaroundsD3D(angle::FeaturesD3D *featuresD3D) {}
virtual void overrideFeaturesVk(angle::FeaturesVk *featuresVulkan) {}
protected:
......
......@@ -263,7 +263,7 @@ MultiviewImplementationParams GeomShaderD3D11(GLint majorVersion,
multiviewExtension);
}
void MultiviewTest::overrideFeaturesD3D(FeaturesD3D *features)
void MultiviewTest::overrideWorkaroundsD3D(FeaturesD3D *features)
{
features->overrideFeatures({"select_view_in_geometry_shader"},
GetParam().mForceUseGeometryShaderOnD3D);
......
......@@ -117,7 +117,7 @@ class MultiviewTest : public MultiviewTestBase,
protected:
MultiviewTest() : MultiviewTestBase(GetParam()) {}
void overrideFeaturesD3D(FeaturesD3D *features) final;
void overrideWorkaroundsD3D(FeaturesD3D *features) final;
virtual void testSetUp() {}
virtual void testTearDown() {}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment