#include "ANGLEPerfTest.h"
#include <iostream>
#include <random>
#include <sstream>
#include "common/debug.h"
#include "util/shader_utils.h"
namespace angle
{
constexpr unsigned int kIterationsPerStep = …;
enum class Frequency
{ … };
size_t GetFrequencyValue(Frequency frequency, size_t sometimesValue)
{ … }
std::string FrequencyToString(Frequency frequency)
{ … }
constexpr size_t kRebindSometimesFrequency = …;
constexpr size_t kStateUpdateSometimesFrequency = …;
struct TexturesParams final : public RenderTestParams
{ … };
std::ostream &operator<<(std::ostream &os, const TexturesParams ¶ms)
{ … }
std::string TexturesParams::story() const
{ … }
class TexturesBenchmark : public ANGLERenderTest,
public ::testing::WithParamInterface<TexturesParams>
{ … };
TexturesBenchmark::TexturesBenchmark() : … { … }
void TexturesBenchmark::initializeBenchmark()
{ … }
std::string GetUniformLocationName(size_t idx, bool vertexShader)
{ … }
void TexturesBenchmark::initShaders()
{ … }
void TexturesBenchmark::initTextures()
{ … }
void TexturesBenchmark::destroyBenchmark()
{ … }
void TexturesBenchmark::drawBenchmark()
{ … }
TexturesParams ApplyFrequencies(const TexturesParams ¶msIn,
Frequency rebindFrequency,
Frequency stateUpdateFrequency)
{ … }
TexturesParams D3D11Params(bool webglCompat,
Frequency rebindFrequency,
Frequency stateUpdateFrequency)
{ … }
TexturesParams MetalParams(bool webglCompat,
Frequency rebindFrequency,
Frequency stateUpdateFrequency)
{ … }
TexturesParams OpenGLOrGLESParams(bool webglCompat,
Frequency rebindFrequency,
Frequency stateUpdateFrequency)
{ … }
TexturesParams VulkanParams(bool webglCompat,
Frequency rebindFrequency,
Frequency stateUpdateFrequency)
{ … }
TEST_P(TexturesBenchmark, Run)
{ … }
ANGLE_INSTANTIATE_TEST(…);
}