#include "ANGLEPerfTest.h"
#include "common/vector_utils.h"
#include "platform/autogen/FeaturesD3D_autogen.h"
#include "test_utils/MultiviewTest.h"
#include "test_utils/gl_raii.h"
#include "util/shader_utils.h"
#include <string.h>
usingnamespaceangle;
namespace
{
std::string GetShaderExtensionHeader(bool usesMultiview,
int numViews,
GLenum shaderType,
ExtensionName multiviewExtension)
{ … }
struct Vertex
{ … };
enum class MultiviewOption
{ … };
MultiviewPerfWorkload;
struct MultiviewPerfParams final : public RenderTestParams
{ … };
std::ostream &operator<<(std::ostream &os, const MultiviewPerfParams ¶ms)
{ … }
class MultiviewBenchmark : public ANGLERenderTest,
public ::testing::WithParamInterface<MultiviewPerfParams>
{ … };
class MultiviewCPUBoundBenchmark : public MultiviewBenchmark
{ … };
class MultiviewGPUBoundBenchmark : public MultiviewBenchmark
{ … };
void MultiviewBenchmark::initializeBenchmark()
{ … }
void MultiviewBenchmark::drawBenchmark()
{ … }
void MultiviewCPUBoundBenchmark::initializeBenchmark()
{ … }
void MultiviewCPUBoundBenchmark::renderScene()
{ … }
void MultiviewGPUBoundBenchmark::initializeBenchmark()
{ … }
void MultiviewGPUBoundBenchmark::renderScene()
{ … }
namespace
{
MultiviewPerfWorkload SmallWorkload()
{ … }
MultiviewPerfWorkload BigWorkload()
{ … }
MultiviewPerfParams NoAcceleration(const EGLPlatformParameters &eglParameters,
const MultiviewPerfWorkload &workload,
ExtensionName multiviewExtensionIn)
{ … }
MultiviewPerfParams SelectViewInGeometryShader(const MultiviewPerfWorkload &workload,
ExtensionName multiviewExtensionIn)
{ … }
MultiviewPerfParams SelectViewInVertexShader(const EGLPlatformParameters &eglParameters,
const MultiviewPerfWorkload &workload,
ExtensionName multiviewExtensionIn)
{ … }
}
TEST_P(MultiviewCPUBoundBenchmark, Run)
{ … }
ANGLE_INSTANTIATE_TEST(…);
TEST_P(MultiviewGPUBoundBenchmark, Run)
{ … }
ANGLE_INSTANTIATE_TEST(…);
}