#include "ANGLEPerfTest.h"
#include <iostream>
#include <random>
#include <sstream>
#include "media/etc2bc_rgba8.inc"
#include "test_utils/gl_raii.h"
#include "util/shader_utils.h"
usingnamespaceangle;
namespace
{
constexpr unsigned int kIterationsPerStep = …;
struct TextureUploadParams final : public RenderTestParams
{ … };
std::ostream &operator<<(std::ostream &os, const TextureUploadParams ¶ms)
{ … }
std::string TextureUploadParams::story() const
{ … }
class TextureUploadBenchmarkBase : public ANGLERenderTest,
public ::testing::WithParamInterface<TextureUploadParams>
{ … };
class TextureUploadSubImageBenchmark : public TextureUploadBenchmarkBase
{ … };
class TextureUploadFullMipBenchmark : public TextureUploadBenchmarkBase
{ … };
class PBOSubImageBenchmark : public TextureUploadBenchmarkBase
{ … };
class PBOCompressedSubImageBenchmark : public TextureUploadBenchmarkBase
{ … };
class TextureUploadETC2TranscodingBenchmark : public TextureUploadBenchmarkBase
{ … };
void TextureUploadETC2TranscodingBenchmark::initShaders()
{ … }
void TextureUploadETC2TranscodingBenchmark::drawBenchmark()
{ … }
TextureUploadBenchmarkBase::TextureUploadBenchmarkBase(const char *benchmarkName)
: … { … }
void TextureUploadBenchmarkBase::initializeBenchmark()
{ … }
void TextureUploadBenchmarkBase::initShaders()
{ … }
void TextureUploadBenchmarkBase::destroyBenchmark()
{ … }
void TextureUploadSubImageBenchmark::drawBenchmark()
{ … }
void TextureUploadFullMipBenchmark::drawBenchmark()
{ … }
void PBOSubImageBenchmark::drawBenchmark()
{ … }
void PBOCompressedSubImageBenchmark::drawBenchmark()
{ … }
TextureUploadParams D3D11Params(bool webglCompat)
{ … }
TextureUploadParams MetalParams(bool webglCompat)
{ … }
TextureUploadParams OpenGLOrGLESParams(bool webglCompat)
{ … }
TextureUploadParams VulkanParams(bool webglCompat)
{ … }
TextureUploadParams ES3VulkanParams(bool webglCompat)
{ … }
TextureUploadParams MetalPBOParams(GLsizei baseSize, GLsizei subImageSize)
{ … }
TextureUploadParams VulkanPBOParams(GLsizei baseSize, GLsizei subImageSize)
{ … }
TextureUploadParams ES3OpenGLPBOParams(GLsizei baseSize, GLsizei subImageSize)
{ … }
}
TEST_P(TextureUploadETC2TranscodingBenchmark, Run)
{ … }
TEST_P(TextureUploadSubImageBenchmark, Run)
{ … }
TEST_P(TextureUploadFullMipBenchmark, Run)
{ … }
TEST_P(PBOSubImageBenchmark, Run)
{ … }
TEST_P(PBOCompressedSubImageBenchmark, Run)
{ … }
usingnamespaceparams;
ANGLE_INSTANTIATE_TEST(…);
ANGLE_INSTANTIATE_TEST(…);
ANGLE_INSTANTIATE_TEST(…);
GTEST_ALLOW_UNINSTANTIATED_PARAMETERIZED_TEST(…);
ANGLE_INSTANTIATE_TEST(…);
GTEST_ALLOW_UNINSTANTIATED_PARAMETERIZED_TEST(…);
ANGLE_INSTANTIATE_TEST(…);