chromium/third_party/angle/src/tests/perf_tests/TextureSampling.cpp

//
// Copyright 2015 The ANGLE Project Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
//
// TextureSamplingBenchmark:
//   Performance test for texture sampling. The test generates a texture containing random data
//   and then blurs it in a fragment shader using nearest neighbor sampling. The test is
//   specifically designed to test overhead of GLSL's builtin texture*() functions that may result
//   from how ANGLE translates them on each backend.
//

#include "ANGLEPerfTest.h"

#include <iostream>
#include <random>
#include <sstream>

#include "util/shader_utils.h"

usingnamespaceangle;

namespace
{
constexpr unsigned int kIterationsPerStep =;

struct TextureSamplingParams final : public RenderTestParams
{};

std::ostream &operator<<(std::ostream &os, const TextureSamplingParams &params)
{}

std::string TextureSamplingParams::story() const
{}

class TextureSamplingBenchmark : public ANGLERenderTest,
                                 public ::testing::WithParamInterface<TextureSamplingParams>
{};

TextureSamplingBenchmark::TextureSamplingBenchmark()
    :{}

void TextureSamplingBenchmark::initializeBenchmark()
{}

void TextureSamplingBenchmark::initShaders()
{}

void TextureSamplingBenchmark::initVertexBuffer()
{}

void TextureSamplingBenchmark::initTextures()
{}

void TextureSamplingBenchmark::destroyBenchmark()
{}

void TextureSamplingBenchmark::drawBenchmark()
{}

// Identical to TextureSamplingBenchmark, but enables and then disables
// EXT_texture_format_sRGB_override during initialization. This should force the internal texture
// representation to use VK_IMAGE_CREATE_MUTABLE_FORMAT_BIT, which is expected to carry a
// performance penalty. This penalty can be quantified by comparing the results of this test with
// the results from TextureSamplingBenchmark
class TextureSamplingMutableFormatBenchmark : public TextureSamplingBenchmark
{};

void TextureSamplingMutableFormatBenchmark::initializeBenchmark()
{}

void TextureSamplingMutableFormatBenchmark::initTextures()
{}

TextureSamplingParams D3D11Params()
{}

TextureSamplingParams MetalParams()
{}

TextureSamplingParams OpenGLOrGLESParams()
{}

TextureSamplingParams VulkanParams()
{}

}  // anonymous namespace

TEST_P(TextureSamplingBenchmark, Run)
{}

TEST_P(TextureSamplingMutableFormatBenchmark, Run)
{}

ANGLE_INSTANTIATE_TEST();

GTEST_ALLOW_UNINSTANTIATED_PARAMETERIZED_TEST();
ANGLE_INSTANTIATE_TEST();