Commit 39087f4a by Jamie Madill Committed by Commit Bot

Refactor DrawCallPerf test parameters.

Use the new combiners functions added in an earlier CL. Makes it easy to maintain bigger lists of test combinations. Also a few other changes: - removes some D3D9 perf testing since we don't maintain this config - removes the "validation only" tests. these were mostly redundant - makes the tests permutation combinations more consistent Bug: angleproject:3630 Change-Id: I175d887a01b21123f83f9fa4f64dacaa2644147a Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2059468Reviewed-by: 's avatarCody Northrop <cnorthrop@google.com> Reviewed-by: 's avatarYuly Novikov <ynovikov@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
parent c4197713
...@@ -332,9 +332,11 @@ std::string RenderTestParams::backend() const ...@@ -332,9 +332,11 @@ std::string RenderTestParams::backend() const
case angle::GLESDriverType::AngleEGL: case angle::GLESDriverType::AngleEGL:
break; break;
case angle::GLESDriverType::SystemEGL: case angle::GLESDriverType::SystemEGL:
return "_native"; strstr << "_native";
break;
case angle::GLESDriverType::SystemWGL: case angle::GLESDriverType::SystemWGL:
return "_wgl"; strstr << "_wgl";
break;
default: default:
assert(0); assert(0);
return "_unk"; return "_unk";
...@@ -342,6 +344,8 @@ std::string RenderTestParams::backend() const ...@@ -342,6 +344,8 @@ std::string RenderTestParams::backend() const
switch (getRenderer()) switch (getRenderer())
{ {
case EGL_PLATFORM_ANGLE_TYPE_DEFAULT_ANGLE:
break;
case EGL_PLATFORM_ANGLE_TYPE_D3D11_ANGLE: case EGL_PLATFORM_ANGLE_TYPE_D3D11_ANGLE:
strstr << "_d3d11"; strstr << "_d3d11";
break; break;
...@@ -354,9 +358,6 @@ std::string RenderTestParams::backend() const ...@@ -354,9 +358,6 @@ std::string RenderTestParams::backend() const
case EGL_PLATFORM_ANGLE_TYPE_OPENGLES_ANGLE: case EGL_PLATFORM_ANGLE_TYPE_OPENGLES_ANGLE:
strstr << "_gles"; strstr << "_gles";
break; break;
case EGL_PLATFORM_ANGLE_TYPE_DEFAULT_ANGLE:
strstr << "_default";
break;
case EGL_PLATFORM_ANGLE_TYPE_VULKAN_ANGLE: case EGL_PLATFORM_ANGLE_TYPE_VULKAN_ANGLE:
strstr << "_vulkan"; strstr << "_vulkan";
break; break;
......
...@@ -194,5 +194,11 @@ ParamsT NullDevice(const ParamsT &input) ...@@ -194,5 +194,11 @@ ParamsT NullDevice(const ParamsT &input)
output.trackGpuTime = false; output.trackGpuTime = false;
return output; return output;
} }
template <typename ParamsT>
ParamsT Passthrough(const ParamsT &input)
{
return input;
}
} // namespace params } // namespace params
#endif // PERF_TESTS_ANGLE_PERF_TEST_H_ #endif // PERF_TESTS_ANGLE_PERF_TEST_H_
...@@ -9,6 +9,7 @@ ...@@ -9,6 +9,7 @@
#include "ANGLEPerfTest.h" #include "ANGLEPerfTest.h"
#include "DrawCallPerfParams.h" #include "DrawCallPerfParams.h"
#include "common/PackedEnums.h"
#include "test_utils/draw_call_perf_utils.h" #include "test_utils/draw_call_perf_utils.h"
#include "util/shader_utils.h" #include "util/shader_utils.h"
...@@ -22,10 +23,12 @@ enum class StateChange ...@@ -22,10 +23,12 @@ enum class StateChange
ManyVertexBuffers, ManyVertexBuffers,
Texture, Texture,
Program, Program,
InvalidEnum,
}; };
struct DrawArraysPerfParams : public DrawCallPerfParams struct DrawArraysPerfParams : public DrawCallPerfParams
{ {
DrawArraysPerfParams() = default;
DrawArraysPerfParams(const DrawCallPerfParams &base) : DrawCallPerfParams(base) {} DrawArraysPerfParams(const DrawCallPerfParams &base) : DrawCallPerfParams(base) {}
std::string story() const override; std::string story() const override;
...@@ -377,6 +380,9 @@ void DrawCallPerfBenchmark::drawBenchmark() ...@@ -377,6 +380,9 @@ void DrawCallPerfBenchmark::drawBenchmark()
JustDraw(params.iterationsPerStep, numElements); JustDraw(params.iterationsPerStep, numElements);
} }
break; break;
case StateChange::InvalidEnum:
FAIL() << "Invalid state change.";
break;
} }
ASSERT_GL_NO_ERROR(); ASSERT_GL_NO_ERROR();
...@@ -387,70 +393,24 @@ TEST_P(DrawCallPerfBenchmark, Run) ...@@ -387,70 +393,24 @@ TEST_P(DrawCallPerfBenchmark, Run)
run(); run();
} }
DrawArraysPerfParams DrawArrays(const DrawCallPerfParams &base, StateChange stateChange) using namespace params;
DrawArraysPerfParams CombineStateChange(const DrawArraysPerfParams &in, StateChange stateChange)
{ {
DrawArraysPerfParams params(base); DrawArraysPerfParams out = in;
params.stateChange = stateChange; out.stateChange = stateChange;
return params; return out;
} }
using namespace params; using P = DrawArraysPerfParams;
std::vector<P> gTestsWithStateChange =
CombineWithValues({P()}, angle::AllEnums<StateChange>(), CombineStateChange);
std::vector<P> gTestsWithRenderer =
CombineWithFuncs(gTestsWithStateChange, {D3D11<P>, GL<P>, Vulkan<P>, WGL<P>});
std::vector<P> gTestsWithDevice =
CombineWithFuncs(gTestsWithRenderer, {Passthrough<P>, Offscreen<P>, NullDevice<P>});
ANGLE_INSTANTIATE_TEST(DrawCallPerfBenchmark, ANGLE_INSTANTIATE_TEST_ARRAY(DrawCallPerfBenchmark, gTestsWithDevice);
DrawArrays(DrawCallD3D9(), StateChange::NoChange),
DrawArrays(NullDevice(DrawCallD3D9()), StateChange::NoChange),
DrawArrays(DrawCallD3D11(), StateChange::NoChange),
DrawArrays(NullDevice(DrawCallD3D11()), StateChange::NoChange),
DrawArrays(NullDevice(Offscreen(DrawCallD3D11())), StateChange::NoChange),
DrawArrays(DrawCallD3D11(), StateChange::VertexAttrib),
DrawArrays(NullDevice(DrawCallD3D11()), StateChange::VertexAttrib),
DrawArrays(DrawCallD3D11(), StateChange::VertexBuffer),
DrawArrays(NullDevice(DrawCallD3D11()), StateChange::VertexBuffer),
DrawArrays(DrawCallD3D11(), StateChange::Texture),
DrawArrays(NullDevice(DrawCallD3D11()), StateChange::Texture),
DrawArrays(DrawCallD3D11(), StateChange::Program),
DrawArrays(NullDevice(DrawCallD3D11()), StateChange::Program),
DrawArrays(DrawCallOpenGL(), StateChange::NoChange),
DrawArrays(NullDevice(DrawCallOpenGL()), StateChange::NoChange),
DrawArrays(NullDevice(Offscreen(DrawCallOpenGL())), StateChange::NoChange),
DrawArrays(DrawCallOpenGL(), StateChange::VertexAttrib),
DrawArrays(NullDevice(DrawCallOpenGL()), StateChange::VertexAttrib),
DrawArrays(DrawCallOpenGL(), StateChange::VertexBuffer),
DrawArrays(NullDevice(DrawCallOpenGL()), StateChange::VertexBuffer),
DrawArrays(DrawCallOpenGL(), StateChange::ManyVertexBuffers),
DrawArrays(NullDevice(DrawCallOpenGL()), StateChange::ManyVertexBuffers),
DrawArrays(DrawCallOpenGL(), StateChange::Texture),
DrawArrays(NullDevice(DrawCallOpenGL()), StateChange::Texture),
DrawArrays(DrawCallOpenGL(), StateChange::Program),
DrawArrays(NullDevice(DrawCallOpenGL()), StateChange::Program),
DrawArrays(DrawCallValidation(), StateChange::NoChange),
DrawArrays(DrawCallVulkan(), StateChange::NoChange),
DrawArrays(Offscreen(DrawCallVulkan()), StateChange::NoChange),
DrawArrays(NullDevice(DrawCallVulkan()), StateChange::NoChange),
DrawArrays(DrawCallVulkan(), StateChange::VertexAttrib),
DrawArrays(Offscreen(DrawCallVulkan()), StateChange::VertexAttrib),
DrawArrays(NullDevice(DrawCallVulkan()), StateChange::VertexAttrib),
DrawArrays(DrawCallVulkan(), StateChange::VertexBuffer),
DrawArrays(Offscreen(DrawCallVulkan()), StateChange::VertexBuffer),
DrawArrays(NullDevice(DrawCallVulkan()), StateChange::VertexBuffer),
DrawArrays(DrawCallVulkan(), StateChange::ManyVertexBuffers),
DrawArrays(Offscreen(DrawCallVulkan()), StateChange::ManyVertexBuffers),
DrawArrays(NullDevice(DrawCallVulkan()), StateChange::ManyVertexBuffers),
DrawArrays(DrawCallVulkan(), StateChange::Texture),
DrawArrays(Offscreen(DrawCallVulkan()), StateChange::Texture),
DrawArrays(NullDevice(DrawCallVulkan()), StateChange::Texture),
DrawArrays(DrawCallVulkan(), StateChange::Program),
DrawArrays(Offscreen(DrawCallVulkan()), StateChange::Program),
DrawArrays(NullDevice(DrawCallVulkan()), StateChange::Program),
DrawArrays(DrawCallWGL(), StateChange::NoChange),
DrawArrays(Offscreen(DrawCallWGL()), StateChange::NoChange),
DrawArrays(DrawCallWGL(), StateChange::VertexAttrib),
DrawArrays(Offscreen(DrawCallWGL()), StateChange::VertexAttrib),
DrawArrays(DrawCallWGL(), StateChange::VertexBuffer),
DrawArrays(Offscreen(DrawCallWGL()), StateChange::VertexBuffer),
DrawArrays(DrawCallWGL(), StateChange::Texture),
DrawArrays(Offscreen(DrawCallWGL()), StateChange::Texture),
DrawArrays(DrawCallWGL(), StateChange::Program),
DrawArrays(Offscreen(DrawCallWGL()), StateChange::Program));
} // anonymous namespace } // anonymous namespace
...@@ -37,11 +37,6 @@ std::string DrawCallPerfParams::story() const ...@@ -37,11 +37,6 @@ std::string DrawCallPerfParams::story() const
strstr << RenderTestParams::story(); strstr << RenderTestParams::story();
if (numTris == 0)
{
strstr << "_validation_only";
}
if (offscreen) if (offscreen)
{ {
strstr << "_offscreen"; strstr << "_offscreen";
...@@ -49,52 +44,3 @@ std::string DrawCallPerfParams::story() const ...@@ -49,52 +44,3 @@ std::string DrawCallPerfParams::story() const
return strstr.str(); return strstr.str();
} }
using namespace angle::egl_platform;
namespace params
{
DrawCallPerfParams DrawCallD3D11()
{
DrawCallPerfParams params;
params.eglParameters = D3D11();
return params;
}
DrawCallPerfParams DrawCallD3D9()
{
DrawCallPerfParams params;
params.eglParameters = D3D9();
return params;
}
DrawCallPerfParams DrawCallOpenGL()
{
DrawCallPerfParams params;
params.eglParameters = OPENGL_OR_GLES();
return params;
}
DrawCallPerfParams DrawCallValidation()
{
DrawCallPerfParams params;
params.eglParameters = DEFAULT();
params.numTris = 0;
params.runTimeSeconds = 5.0;
return params;
}
DrawCallPerfParams DrawCallVulkan()
{
DrawCallPerfParams params;
params.eglParameters = VULKAN();
return params;
}
DrawCallPerfParams DrawCallWGL()
{
DrawCallPerfParams params;
params.driver = angle::GLESDriverType::SystemWGL;
return params;
}
} // namespace params
...@@ -13,6 +13,7 @@ ...@@ -13,6 +13,7 @@
#include <ostream> #include <ostream>
#include "ANGLEPerfTest.h" #include "ANGLEPerfTest.h"
#include "test_utils/angle_test_configs.h"
struct DrawCallPerfParams : public RenderTestParams struct DrawCallPerfParams : public RenderTestParams
{ {
...@@ -29,12 +30,46 @@ struct DrawCallPerfParams : public RenderTestParams ...@@ -29,12 +30,46 @@ struct DrawCallPerfParams : public RenderTestParams
namespace params namespace params
{ {
DrawCallPerfParams DrawCallD3D11(); template <typename ParamsT>
DrawCallPerfParams DrawCallD3D9(); ParamsT D3D9(const ParamsT &in)
DrawCallPerfParams DrawCallOpenGL(); {
DrawCallPerfParams DrawCallValidation(); ParamsT out = in;
DrawCallPerfParams DrawCallVulkan(); out.eglParameters = angle::egl_platform::D3D9();
DrawCallPerfParams DrawCallWGL(); return out;
}
template <typename ParamsT>
ParamsT D3D11(const ParamsT &in)
{
ParamsT out = in;
out.eglParameters = angle::egl_platform::D3D11();
return out;
}
template <typename ParamsT>
ParamsT GL(const ParamsT &in)
{
ParamsT out = in;
out.eglParameters = angle::egl_platform::OPENGL_OR_GLES();
return out;
}
template <typename ParamsT>
ParamsT Vulkan(const ParamsT &in)
{
ParamsT out = in;
out.eglParameters = angle::egl_platform::VULKAN();
return out;
}
template <typename ParamsT>
ParamsT WGL(const ParamsT &in)
{
ParamsT out = in;
out.driver = angle::GLESDriverType::SystemWGL;
return out;
}
} // namespace params } // namespace params
#endif // TESTS_PERF_TESTS_DRAW_CALL_PERF_PARAMS_H_ #endif // TESTS_PERF_TESTS_DRAW_CALL_PERF_PARAMS_H_
...@@ -202,108 +202,42 @@ void DrawElementsPerfBenchmark::drawBenchmark() ...@@ -202,108 +202,42 @@ void DrawElementsPerfBenchmark::drawBenchmark()
ASSERT_GL_NO_ERROR(); ASSERT_GL_NO_ERROR();
} }
DrawElementsPerfParams DrawElementsPerfD3D11Params(bool indexBufferChanged, TEST_P(DrawElementsPerfBenchmark, Run)
bool useNullDevice,
GLenum indexType)
{
DrawElementsPerfParams params;
params.eglParameters =
useNullDevice ? angle::egl_platform::D3D11_NULL() : angle::egl_platform::D3D11();
params.indexBufferChanged = indexBufferChanged;
params.type = indexType;
// Scale down iterations for slower tests.
if (indexBufferChanged)
params.iterationsPerStep /= 100;
return params;
}
DrawElementsPerfParams DrawElementsPerfD3D9Params(bool indexBufferChanged)
{ {
DrawElementsPerfParams params; run();
params.eglParameters = angle::egl_platform::D3D9();
params.indexBufferChanged = indexBufferChanged;
// Scale down iterations for slower tests.
if (indexBufferChanged)
params.iterationsPerStep /= 100;
return params;
} }
DrawElementsPerfParams DrawElementsPerfOpenGLOrGLESParams(bool indexBufferChanged, using namespace angle;
bool useNullDevice, using namespace params;
GLenum indexType) using P = DrawElementsPerfParams;
{
DrawElementsPerfParams params;
params.eglParameters = useNullDevice ? angle::egl_platform::OPENGL_OR_GLES_NULL()
: angle::egl_platform::OPENGL_OR_GLES();
params.indexBufferChanged = indexBufferChanged;
params.type = indexType;
// Scale down iterations for slower tests.
if (indexBufferChanged)
params.iterationsPerStep /= 100;
return params; P CombineIndexType(const P &in, GLenum indexType)
}
DrawElementsPerfParams DrawElementsPerfVulkanParams(bool indexBufferChanged,
bool useNullDevice,
GLenum indexType)
{ {
DrawElementsPerfParams params; P out = in;
params.eglParameters = out.type = indexType;
useNullDevice ? angle::egl_platform::VULKAN_NULL() : angle::egl_platform::VULKAN(); return out;
params.indexBufferChanged = indexBufferChanged;
params.type = indexType;
// Scale down iterations for slower tests.
if (indexBufferChanged)
params.iterationsPerStep /= 100;
return params;
} }
DrawElementsPerfParams DrawElementsPerfWGLParams(bool indexBufferChanged, GLenum indexType) P CombineIndexBufferChanged(const P &in, bool indexBufferChanged)
{ {
DrawElementsPerfParams params; P out = in;
params.driver = angle::GLESDriverType::SystemWGL; out.indexBufferChanged = indexBufferChanged;
params.indexBufferChanged = indexBufferChanged;
params.type = indexType;
// Scale down iterations for slower tests. // Scale down iterations for slower tests.
if (indexBufferChanged) if (indexBufferChanged)
params.iterationsPerStep /= 100; out.iterationsPerStep /= 100;
return params; return out;
} }
TEST_P(DrawElementsPerfBenchmark, Run) std::vector<GLenum> gIndexTypes = {GL_UNSIGNED_INT, GL_UNSIGNED_SHORT};
{ std::vector<P> gWithIndexType = CombineWithValues({P()}, gIndexTypes, CombineIndexType);
run(); std::vector<P> gWithRenderer =
} CombineWithFuncs(gWithIndexType, {D3D11<P>, GL<P>, Vulkan<P>, WGL<P>});
std::vector<P> gWithChange =
CombineWithValues(gWithRenderer, {false, true}, CombineIndexBufferChanged);
std::vector<P> gWithDevice = CombineWithFuncs(gWithChange, {Passthrough<P>, NullDevice<P>});
ANGLE_INSTANTIATE_TEST(DrawElementsPerfBenchmark, ANGLE_INSTANTIATE_TEST_ARRAY(DrawElementsPerfBenchmark, gWithDevice);
DrawElementsPerfD3D9Params(false),
DrawElementsPerfD3D9Params(true),
DrawElementsPerfD3D11Params(false, true, GL_UNSIGNED_INT),
DrawElementsPerfD3D11Params(true, true, GL_UNSIGNED_INT),
DrawElementsPerfD3D11Params(false, false, GL_UNSIGNED_INT),
DrawElementsPerfD3D11Params(true, false, GL_UNSIGNED_INT),
DrawElementsPerfD3D11Params(false, false, GL_UNSIGNED_SHORT),
DrawElementsPerfD3D11Params(false, true, GL_UNSIGNED_SHORT),
DrawElementsPerfOpenGLOrGLESParams(false, false, GL_UNSIGNED_SHORT),
DrawElementsPerfOpenGLOrGLESParams(false, true, GL_UNSIGNED_SHORT),
DrawElementsPerfOpenGLOrGLESParams(true, false, GL_UNSIGNED_SHORT),
DrawElementsPerfOpenGLOrGLESParams(false, false, GL_UNSIGNED_INT),
DrawElementsPerfOpenGLOrGLESParams(true, false, GL_UNSIGNED_INT),
DrawElementsPerfVulkanParams(false, false, GL_UNSIGNED_SHORT),
DrawElementsPerfVulkanParams(false, true, GL_UNSIGNED_SHORT),
DrawElementsPerfVulkanParams(false, false, GL_UNSIGNED_INT),
DrawElementsPerfVulkanParams(false, true, GL_UNSIGNED_INT),
DrawElementsPerfWGLParams(false, GL_UNSIGNED_SHORT));
} // anonymous namespace } // anonymous namespace
...@@ -11,6 +11,7 @@ ...@@ -11,6 +11,7 @@
#include "common/PackedEnums.h" #include "common/PackedEnums.h"
#include "common/system_utils.h" #include "common/system_utils.h"
#include "tests/perf_tests/ANGLEPerfTest.h" #include "tests/perf_tests/ANGLEPerfTest.h"
#include "tests/perf_tests/DrawCallPerfParams.h"
#include "util/egl_loader_autogen.h" #include "util/egl_loader_autogen.h"
#include "restricted_traces/trex_1300_1310/trex_1300_1310_capture_context1.h" #include "restricted_traces/trex_1300_1310/trex_1300_1310_capture_context1.h"
...@@ -174,28 +175,6 @@ TEST_P(TracePerfTest, Run) ...@@ -174,28 +175,6 @@ TEST_P(TracePerfTest, Run)
run(); run();
} }
TracePerfParams GL(const TracePerfParams &in)
{
TracePerfParams out = in;
out.eglParameters = OPENGL_OR_GLES();
return out;
}
TracePerfParams Vulkan(const TracePerfParams &in)
{
TracePerfParams out = in;
out.eglParameters = VULKAN();
return out;
}
// Note: WGL replay currently broken because interface locations are not remapped.
ANGLE_MAYBE_UNUSED TracePerfParams WGL(const TracePerfParams &in)
{
TracePerfParams out = in;
out.driver = angle::GLESDriverType::SystemWGL;
return out;
}
TracePerfParams CombineTestID(const TracePerfParams &in, TracePerfTestID id) TracePerfParams CombineTestID(const TracePerfParams &in, TracePerfTestID id)
{ {
TracePerfParams out = in; TracePerfParams out = in;
...@@ -203,9 +182,11 @@ TracePerfParams CombineTestID(const TracePerfParams &in, TracePerfTestID id) ...@@ -203,9 +182,11 @@ TracePerfParams CombineTestID(const TracePerfParams &in, TracePerfTestID id)
return out; return out;
} }
std::vector<TracePerfParams> gTestsWithID = using namespace params;
CombineWithValues({TracePerfParams()}, AllEnums<TracePerfTestID>(), CombineTestID); using P = TracePerfParams;
std::vector<TracePerfParams> gTestsWithRenderer = CombineWithFuncs(gTestsWithID, {GL, Vulkan});
std::vector<P> gTestsWithID = CombineWithValues({P()}, AllEnums<TracePerfTestID>(), CombineTestID);
std::vector<P> gTestsWithRenderer = CombineWithFuncs(gTestsWithID, {GL<P>, Vulkan<P>});
ANGLE_INSTANTIATE_TEST_ARRAY(TracePerfTest, gTestsWithRenderer); ANGLE_INSTANTIATE_TEST_ARRAY(TracePerfTest, gTestsWithRenderer);
} // anonymous namespace } // anonymous namespace
...@@ -481,6 +481,15 @@ bool IsConfigSupported(const PlatformParameters &param) ...@@ -481,6 +481,15 @@ bool IsConfigSupported(const PlatformParameters &param)
bool IsPlatformAvailable(const PlatformParameters &param) bool IsPlatformAvailable(const PlatformParameters &param)
{ {
// Disable "null" device when not on ANGLE or in D3D9.
if (param.getDeviceType() == EGL_PLATFORM_ANGLE_DEVICE_TYPE_NULL_ANGLE)
{
if (param.driver != GLESDriverType::AngleEGL)
return false;
if (param.getRenderer() == EGL_PLATFORM_ANGLE_TYPE_D3D9_ANGLE)
return false;
}
switch (param.getRenderer()) switch (param.getRenderer())
{ {
case EGL_PLATFORM_ANGLE_TYPE_DEFAULT_ANGLE: case EGL_PLATFORM_ANGLE_TYPE_DEFAULT_ANGLE:
......
...@@ -260,21 +260,38 @@ std::vector<ParamsT> CombineWithFuncs(const std::vector<ParamsT> &in, ...@@ -260,21 +260,38 @@ std::vector<ParamsT> CombineWithFuncs(const std::vector<ParamsT> &in,
return out; return out;
} }
template <typename ParamT, typename ModifiersT, typename ModifierT> template <typename ParamT, typename RangeT, typename ModifierT>
std::vector<ParamT> CombineWithValues(const std::vector<ParamT> &in, std::vector<ParamT> CombineWithValues(const std::vector<ParamT> &in,
const ModifiersT &modifiers, RangeT begin,
RangeT end,
ParamT combine(const ParamT &, ModifierT)) ParamT combine(const ParamT &, ModifierT))
{ {
std::vector<ParamT> out; std::vector<ParamT> out;
for (const ParamT &paramsIn : in) for (const ParamT &paramsIn : in)
{ {
for (ModifierT modifier : modifiers) for (auto iter = begin; iter != end; ++iter)
{ {
out.push_back(combine(paramsIn, modifier)); out.push_back(combine(paramsIn, *iter));
} }
} }
return out; return out;
} }
template <typename ParamT, typename ModifierT>
std::vector<ParamT> CombineWithValues(const std::vector<ParamT> &in,
const std::initializer_list<ModifierT> &modifiers,
ParamT combine(const ParamT &, ModifierT))
{
return CombineWithValues(in, modifiers.begin(), modifiers.end(), combine);
}
template <typename ParamT, typename ModifiersT, typename ModifierT>
std::vector<ParamT> CombineWithValues(const std::vector<ParamT> &in,
const ModifiersT &modifiers,
ParamT combine(const ParamT &, ModifierT))
{
return CombineWithValues(in, std::begin(modifiers), std::end(modifiers), combine);
}
} // namespace angle } // namespace angle
#define ANGLE_SKIP_TEST_IF(COND) \ #define ANGLE_SKIP_TEST_IF(COND) \
......
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