chromium/third_party/dawn/src/tint/lang/wgsl/ast/transform/std140_exhaustive_test.cc

// Copyright 2022 The Dawn & Tint Authors
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are met:
//
// 1. Redistributions of source code must retain the above copyright notice, this
//    list of conditions and the following disclaimer.
//
// 2. Redistributions in binary form must reproduce the above copyright notice,
//    this list of conditions and the following disclaimer in the documentation
//    and/or other materials provided with the distribution.
//
// 3. Neither the name of the copyright holder nor the names of its
//    contributors may be used to endorse or promote products derived from
//    this software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

#include "src/tint/lang/wgsl/ast/transform/std140.h"

#include <string>
#include <utility>
#include <vector>

#include "src/tint/lang/wgsl/ast/transform/helper_test.h"
#include "src/tint/utils/text/string.h"

namespace tint::ast::transform {
namespace {

enum class MatrixType {};

struct MatrixCase {};

inline std::ostream& operator<<(std::ostream& os, const MatrixCase& c) {}

Std140Test_Matrix;

TEST_P(Std140Test_Matrix, SingleStructMatUniform) {}

TEST_P(Std140Test_Matrix, CustomAlign) {}

TEST_P(Std140Test_Matrix, CustomSizeMat) {}

TEST_P(Std140Test_Matrix, CustomAlignAndSize) {}

TEST_P(Std140Test_Matrix, MatrixUsageInForLoop) {}

TEST_P(Std140Test_Matrix, MatUniform_LoadMatrix) {}

TEST_P(Std140Test_Matrix, MatUniform_LoadColumn_ConstIndex) {}

TEST_P(Std140Test_Matrix, MatUniform_LoadColumn_VariableIndex) {}

TEST_P(Std140Test_Matrix, MatUniform_LoadColumnSwizzle_ConstIndex) {}

TEST_P(Std140Test_Matrix, MatUniform_LoadColumnSwizzle_VariableIndex) {}

TEST_P(Std140Test_Matrix, MatUniform_LoadScalar_ConstColumnIndex_ConstRowIndex) {}

TEST_P(Std140Test_Matrix, MatUniform_LoadScalar_VariableColumnIndex_ConstRowIndex) {}

TEST_P(Std140Test_Matrix, MatUniform_LoadScalar_ConstColumnIndex_VariableRowIndex) {}

TEST_P(Std140Test_Matrix, MatUniform_LoadScalar_VariableColumnIndex_VariableRowIndex) {}

TEST_P(Std140Test_Matrix, StructMatUniform_NameCollision) {}

TEST_P(Std140Test_Matrix, StructMatUniform_LoadStruct) {}

TEST_P(Std140Test_Matrix, StructMatUniform_LoadMatrix) {}

TEST_P(Std140Test_Matrix, StructMatUniform_LoadColumn_ConstIndex) {}

TEST_P(Std140Test_Matrix, StructMatUniform_LoadColumn_VariableIndex) {}

TEST_P(Std140Test_Matrix, StructMatUniform_LoadScalar_ConstColumnIndex_ConstRowIndex) {}

TEST_P(Std140Test_Matrix, StructMatUniform_LoadScalar_VariableColumnIndex_ConstRowIndex) {}

TEST_P(Std140Test_Matrix, StructMatUniform_LoadScalar_ConstColumnIndex_VariableRowIndex) {}

TEST_P(Std140Test_Matrix, StructMatUniform_LoadScalar_VariableColumnIndex_VariableRowIndex) {}

TEST_P(Std140Test_Matrix, ArrayStructMatUniform_LoadArray) {}

TEST_P(Std140Test_Matrix, ArrayStructMatUniform_LoadStruct_ConstIndex) {}

TEST_P(Std140Test_Matrix, ArrayStructMatUniform_LoadStruct_VariableIndex) {}

TEST_P(Std140Test_Matrix, ArrayStructMatUniform_LoadMatrix_ConstArrayIndex) {}

TEST_P(Std140Test_Matrix, ArrayStructMatUniform_LoadMatrix_VariableArrayIndex) {}

TEST_P(Std140Test_Matrix, ArrayStructMatUniform_LoadColumn_ConstArrayIndex_ConstColumnIndex) {}

TEST_P(Std140Test_Matrix, ArrayStructMatUniform_LoadColumn_VariableArrayIndex_ConstColumnIndex) {}

TEST_P(Std140Test_Matrix, ArrayStructMatUniform_LoadColumn_ConstArrayIndex_VariableColumnIndex) {}

TEST_P(Std140Test_Matrix, ArrayStructMatUniform_LoadColumn_VariableArrayIndex_VariableColumnIndex) {}

TEST_P(Std140Test_Matrix, ArrayStructArrayStructMatUniform_Loads) {}

TEST_P(Std140Test_Matrix, ArrayStructArrayStructMatUniform_LoadsViaPtrs) {}

TEST_P(Std140Test_Matrix, ArrayStructArrayStructMatUniform_LoadsViaImplicitDerefPtrs) {}

TEST_P(Std140Test_Matrix, ArrayStructMatUniform_CopyArray_UniformToStorage) {}

TEST_P(Std140Test_Matrix, ArrayStructMatUniform_CopyStruct_UniformToWorkgroup) {}

TEST_P(Std140Test_Matrix, ArrayStructMatUniform_CopyMatrix_UniformToPrivate) {}

TEST_P(Std140Test_Matrix, ArrayStructMatUniform_CopyColumn_UniformToStorage) {}

TEST_P(Std140Test_Matrix, ArrayStructMatUniform_CopyColumnSwizzle_UniformToWorkgroup) {}

TEST_P(Std140Test_Matrix, ArrayStructMatUniform_CopyScalar_UniformToPrivate) {}

INSTANTIATE_TEST_SUITE_P();

Std140Test_MatrixArray;

TEST_P(Std140Test_MatrixArray, ArrayMatUniform_LoadArray) {}

TEST_P(Std140Test_MatrixArray, ArrayMatUniform_LoadMatrix_ConstArrayIndex) {}

TEST_P(Std140Test_MatrixArray, ArrayMatUniform_LoadMatrix_VariableArrayIndex) {}

TEST_P(Std140Test_MatrixArray, ArrayMatUniform_LoadColumn_ConstArrayIndex_ConstColumnIndex) {}

TEST_P(Std140Test_MatrixArray, ArrayMatUniform_LoadColumn_VariableArrayIndex_ConstColumnIndex) {}

TEST_P(Std140Test_MatrixArray, ArrayMatUniform_LoadColumn_ConstArrayIndex_VariableColumnIndex) {}

TEST_P(Std140Test_MatrixArray, ArrayMatUniform_LoadColumn_VariableArrayIndex_VariableColumnIndex) {}

TEST_P(Std140Test_MatrixArray, StructArrayMatUniform_LoadStruct) {}

TEST_P(Std140Test_MatrixArray, StructArrayMatUniform_LoadArray) {}

TEST_P(Std140Test_MatrixArray, StructArrayMatUniform_LoadMatrix_ConstArrayIndex) {}

TEST_P(Std140Test_MatrixArray, StructArrayMatUniform_LoadMatrix_VariableArrayIndex) {}

TEST_P(Std140Test_MatrixArray, StructArrayMatUniform_LoadColumn_ConstArrayIndex_ConstColumnIndex) {}

TEST_P(Std140Test_MatrixArray,
       StructArrayMatUniform_LoadColumn_VariableArrayIndex_ConstColumnIndex) {}

TEST_P(Std140Test_MatrixArray,
       StructArrayMatUniform_LoadColumn_ConstArrayIndex_VariableColumnIndex) {}

TEST_P(Std140Test_MatrixArray,
       StructArrayMatUniform_LoadColumn_VariableArrayIndex_VariableColumnIndex) {}

TEST_P(Std140Test_MatrixArray, ArrayArrayMatUniform_LoadArrays) {}

TEST_P(Std140Test_MatrixArray, ArrayArrayMatUniform_LoadArray_ConstOuterArrayIndex) {}

TEST_P(Std140Test_MatrixArray, ArrayArrayMatUniform_LoadArray_VariableOuterArrayIndex) {}

TEST_P(Std140Test_MatrixArray,
       ArrayArrayMatUniform_LoadMatrix_ConstOuterArrayIndex_ConstInnerArrayIndex) {}

TEST_P(Std140Test_MatrixArray,
       ArrayArrayMatUniform_LoadMatrix_ConstOuterArrayIndex_VariableInnerArrayIndex) {}

TEST_P(Std140Test_MatrixArray,
       ArrayArrayMatUniform_LoadMatrix_VariableOuterArrayIndex_ConstInnerArrayIndex) {}

TEST_P(Std140Test_MatrixArray,
       ArrayArrayMatUniform_LoadMatrix_VariableOuterArrayIndex_VariableInnerArrayIndex) {}

TEST_P(Std140Test_MatrixArray,
       ArrayArrayMatUniform_LoadColumn_ConstOuterArrayIndex_ConstInnerArrayIndex_ConstColumnIndex) {}

TEST_P(
    Std140Test_MatrixArray,
    ArrayArrayMatUniform_LoadColumn_ConstOuterArrayIndex_ConstInnerArrayIndex_VariableColumnIndex) {}

TEST_P(
    Std140Test_MatrixArray,
    ArrayArrayMatUniform_LoadColumn_ConstOuterArrayIndex_VariableInnerArrayIndex_ConstColumnIndex) {}

TEST_P(
    Std140Test_MatrixArray,
    ArrayArrayMatUniform_LoadColumn_ConstOuterArrayIndex_VariableInnerArrayIndex_VariableColumnIndex) {}

TEST_P(
    Std140Test_MatrixArray,
    ArrayArrayMatUniform_LoadColumn_VariableOuterArrayIndex_ConstInnerArrayIndex_ConstColumnIndex) {}

TEST_P(
    Std140Test_MatrixArray,
    ArrayArrayMatUniform_LoadColumn_VariableOuterArrayIndex_ConstInnerArrayIndex_VariableColumnIndex) {}

TEST_P(
    Std140Test_MatrixArray,
    ArrayArrayMatUniform_LoadColumn_VariableOuterArrayIndex_VariableInnerArrayIndex_ConstColumnIndex) {}

TEST_P(
    Std140Test_MatrixArray,
    ArrayArrayMatUniform_LoadColumn_VariableOuterArrayIndex_VariableInnerArrayIndex_VariableColumnIndex) {}

INSTANTIATE_TEST_SUITE_P();

}  // namespace
}  // namespace tint::ast::transform