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