chromium/third_party/angle/src/tests/gl_tests/AttributeLayoutTest.cpp

//
// Copyright 2018 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.
//
// AttributeLayoutTest:
//   Test various layouts of vertex attribute data:
//   - in memory, in buffer object, or combination of both
//   - sequential or interleaved
//   - various combinations of data types

#include <vector>

#include "test_utils/ANGLETest.h"
#include "test_utils/gl_raii.h"

usingnamespaceangle;

namespace
{

// Test will draw these four triangles.
// clang-format off
constexpr double kTriangleData[] =;
// clang-format on

constexpr size_t kNumVertices =;

// Vertex data source description.
class VertexData
{};

// A container for one or more vertex attributes.
class Container
{};

// Vertex attribute data in client memory.
class Memory : public Container
{};

// Vertex attribute data in buffer object.
class Buffer : public Container
{};

// Encapsulate the storage, layout, format and data of a vertex attribute.
struct Attrib
{};

// Change type and store.
template <class T>
void Store(double value, void *dest)
{}

// Function object that makes Attrib structs according to a vertex format.
template <class CType, GLenum GLType, bool Normalized, bool PureInteger = false>
class Format
{};

TestCase;

void PrepareTestCase(const TestCase &tc)
{}

class AttributeLayoutTest : public ANGLETest<>
{};
const GLushort AttributeLayoutTest::mIndices[kNumVertices] =;

void AttributeLayoutTest::GetTestCases(void)
{}

class AttributeLayoutNonIndexed : public AttributeLayoutTest
{};

class AttributeLayoutMemoryIndexed : public AttributeLayoutTest
{};

class AttributeLayoutBufferIndexed : public AttributeLayoutTest
{};

TEST_P(AttributeLayoutNonIndexed, Test)
{}

TEST_P(AttributeLayoutMemoryIndexed, Test)
{}

TEST_P(AttributeLayoutBufferIndexed, Test)
{}

ANGLE_INSTANTIATE_TEST_ES2_AND_ES3_AND();
ANGLE_INSTANTIATE_TEST_ES2_AND_ES3_AND();
ANGLE_INSTANTIATE_TEST_ES2_AND_ES3_AND();

#define STRINGIFY2(X)
#define STRINGIFY(X)

// clang-format off
#define VS_SHADER(ColorDataType)

#define PS_SHADER(ColorDataType)

// clang-format on

// clang-format off
constexpr double kVertexData[] =;
// clang-format on

template <class ResType>
ResType GetRefValue(const void *data, GLenum glType)
{}

constexpr size_t kIndexCount =;
constexpr int kRboSize       =;

GLColor ConvertFloatToUnorm8(const GLColor32F &color32f)
{}

void BindAttribLocation(GLuint program)
{}

class AttributeDataTypeMismatchTest : public ANGLETest<>
{};

const GLushort AttributeDataTypeMismatchTest::mIndices[kIndexCount] =;

// Test Attribute input data type mismatch with vertex shader input.
// Change the attribute input data type to vertex shader input data type.
TEST_P(AttributeDataTypeMismatchTest, Test)
{}

ANGLE_INSTANTIATE_TEST_ES3();

}  // anonymous namespace