#include <sstream>
#include "ANGLEPerfTest.h"
#include "test_utils/draw_call_perf_utils.h"
usingnamespaceangle;
namespace
{
constexpr unsigned int kIterationsPerStep = …;
struct BufferSubDataParams final : public RenderTestParams
{ … };
std::ostream &operator<<(std::ostream &os, const BufferSubDataParams ¶ms)
{ … }
class BufferSubDataBenchmark : public ANGLERenderTest,
public ::testing::WithParamInterface<BufferSubDataParams>
{ … };
GLfloat *GetFloatData(GLint componentCount)
{ … }
template <class T>
GLsizeiptr GetNormalizedData(GLsizeiptr numElements, GLfloat *floatData, std::vector<uint8_t> *data)
{ … }
template <class T>
GLsizeiptr GetIntData(GLsizeiptr numElements, GLfloat *floatData, std::vector<uint8_t> *data)
{ … }
GLsizeiptr GetVertexData(GLenum type,
GLint componentCount,
GLboolean normalized,
std::vector<uint8_t> *data)
{ … }
std::string BufferSubDataParams::story() const
{ … }
BufferSubDataBenchmark::BufferSubDataBenchmark()
: … { … }
void BufferSubDataBenchmark::initializeBenchmark()
{ … }
void BufferSubDataBenchmark::destroyBenchmark()
{ … }
void BufferSubDataBenchmark::drawBenchmark()
{ … }
BufferSubDataParams BufferUpdateD3D11Params()
{ … }
BufferSubDataParams BufferUpdateMetalParams()
{ … }
BufferSubDataParams BufferUpdateOpenGLOrGLESParams()
{ … }
BufferSubDataParams BufferUpdateVulkanParams()
{ … }
TEST_P(BufferSubDataBenchmark, Run)
{ … }
ANGLE_INSTANTIATE_TEST(…);
}