chromium/third_party/dawn/src/tint/lang/msl/writer/ast_raise/packed_vec3_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/msl/writer/ast_raise/packed_vec3.h"

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

#include "src/tint/lang/core/fluent_types.h"
#include "src/tint/lang/core/type/array.h"
#include "src/tint/lang/wgsl/ast/module.h"
#include "src/tint/lang/wgsl/ast/transform/helper_test.h"
#include "src/tint/lang/wgsl/program/program_builder.h"
#include "src/tint/lang/wgsl/resolver/resolve.h"
#include "src/tint/lang/wgsl/sem/struct.h"
#include "src/tint/lang/wgsl/sem/variable.h"
#include "src/tint/utils/text/string.h"

usingnamespacetint::core::fluent_types;  // NOLINT

namespace tint::msl::writer {
namespace {

PackedVec3Test;

TEST_F(PackedVec3Test, ShouldRun_EmptyModule) {}

TEST_F(PackedVec3Test, ShouldRun_NoHostShareableVec3s) {}

TEST_F(PackedVec3Test, ShouldRun_Vec4Vec2) {}

TEST_F(PackedVec3Test, ShouldRun_OtherMatrices) {}

TEST_F(PackedVec3Test, ShouldRun_ArrayOfNonVec3) {}

TEST_F(PackedVec3Test, ShouldRun_HostSharable_Vec3) {}

TEST_F(PackedVec3Test, ShouldRun_HostSharable_Mat3x3) {}

TEST_F(PackedVec3Test, ShouldRun_HostSharable_ArrayOfVec3) {}

TEST_F(PackedVec3Test, ShouldRun_HostSharable_ArrayOfMat3x3) {}

TEST_F(PackedVec3Test, ShouldRun_HostSharableStruct_Vec3) {}

TEST_F(PackedVec3Test, ShouldRun_HostSharableStruct_Mat3x3) {}

TEST_F(PackedVec3Test, ShouldRun_HostSharableStruct_ArrayOfVec3) {}

TEST_F(PackedVec3Test, ShouldRun_HostSharableStruct_ArrayOfMat3x3) {}

TEST_F(PackedVec3Test, Vec3_ReadVector) {}

TEST_F(PackedVec3Test, Vec3_ReadComponent_MemberAccessChain) {}

TEST_F(PackedVec3Test, Vec3_ReadComponent_IndexAccessor) {}

TEST_F(PackedVec3Test, Vec3_ReadComponent_IndexAccessor_ViaDerefPointerIndex) {}

TEST_F(PackedVec3Test, Vec3_ReadComponent_IndexAccessor_ViaPointerIndex) {}

TEST_F(PackedVec3Test, Vec3_WriteVector_ValueRHS) {}

TEST_F(PackedVec3Test, Vec3_WriteVector_RefRHS) {}

TEST_F(PackedVec3Test, Vec3_WriteComponent_MemberAccessor) {}

TEST_F(PackedVec3Test, Vec3_WriteComponent_MemberAccessor_ViaDerefPointerDot) {}

TEST_F(PackedVec3Test, Vec3_WriteComponent_MemberAccessor_ViaPointerDot) {}

TEST_F(PackedVec3Test, Vec3_WriteComponent_IndexAccessor) {}

TEST_F(PackedVec3Test, ArrayOfVec3_ReadArray_Small) {}

TEST_F(PackedVec3Test, ArrayOfVec3_ReadArray_Large) {}

TEST_F(PackedVec3Test, ArrayOfVec3_ReadVector) {}

TEST_F(PackedVec3Test, ArrayOfVec3_ReadComponent_MemberAccessor) {}

TEST_F(PackedVec3Test, ArrayOfVec3_ReadComponent_IndexAccessor) {}

TEST_F(PackedVec3Test, ArrayOfVec3_WriteArray_ValueRHS_Small) {}

TEST_F(PackedVec3Test, ArrayOfVec3_WriteArray_ValueRHS_Large) {}

TEST_F(PackedVec3Test, ArrayOfVec3_WriteArray_RefRHS) {}

TEST_F(PackedVec3Test, ArrayOfVec3_WriteVector_ValueRHS) {}

TEST_F(PackedVec3Test, ArrayOfVec3_WriteVector_RefRHS_Small) {}

TEST_F(PackedVec3Test, ArrayOfVec3_WriteVector_RefRHS_Large) {}

TEST_F(PackedVec3Test, ArrayOfVec3_WriteComponent_MemberAccessor) {}

TEST_F(PackedVec3Test, ArrayOfVec3_WriteComponent_IndexAccessor) {}

TEST_F(PackedVec3Test, Matrix_ReadMatrix) {}

TEST_F(PackedVec3Test, Matrix_ReadColumn) {}

TEST_F(PackedVec3Test, Matrix_ReadComponent_MemberAccessChain) {}

TEST_F(PackedVec3Test, Matrix_ReadComponent_IndexAccessor) {}

TEST_F(PackedVec3Test, Matrix_WriteMatrix_ValueRHS) {}

TEST_F(PackedVec3Test, Matrix_WriteMatrix_RefRHS) {}

TEST_F(PackedVec3Test, Matrix_WriteColumn_ValueRHS) {}

TEST_F(PackedVec3Test, Matrix_WriteColumn_RefRHS) {}

TEST_F(PackedVec3Test, Matrix_WriteComponent_MemberAccessor) {}

TEST_F(PackedVec3Test, Matrix_WriteComponent_IndexAccessor) {}

TEST_F(PackedVec3Test, ArrayOfMatrix_ReadArray_Small) {}

TEST_F(PackedVec3Test, ArrayOfMatrix_ReadArray_Large) {}

TEST_F(PackedVec3Test, ArrayOfMatrix_ReadMatrix) {}

TEST_F(PackedVec3Test, ArrayOfMatrix_ReadColumn) {}

TEST_F(PackedVec3Test, ArrayOfMatrix_ReadComponent_MemberAccessor) {}

TEST_F(PackedVec3Test, ArrayOfMatrix_ReadComponent_IndexAccessor) {}

TEST_F(PackedVec3Test, ArrayOfMatrix_WriteArray_ValueRHS_Small) {}

TEST_F(PackedVec3Test, ArrayOfMatrix_WriteArray_ValueRHS_Large) {}

TEST_F(PackedVec3Test, ArrayOfMatrix_WriteArray_RefRHS) {}

TEST_F(PackedVec3Test, ArrayOfMatrix_WriteMatrix_ValueRHS) {}

TEST_F(PackedVec3Test, ArrayOfMatrix_WriteMatrix_RefRHS) {}

TEST_F(PackedVec3Test, ArrayOfMatrix_WriteVector_ValueRHS) {}

TEST_F(PackedVec3Test, ArrayOfMatrix_WriteVector_RefRHS) {}

TEST_F(PackedVec3Test, ArrayOfMatrix_WriteComponent_MemberAccessor) {}

TEST_F(PackedVec3Test, ArrayOfMatrix_WriteComponent_IndexAccessor) {}

TEST_F(PackedVec3Test, StructMember_Vec3_ReadStruct) {}

TEST_F(PackedVec3Test, StructMember_Vec3_ReadVector) {}

TEST_F(PackedVec3Test, StructMember_Vec3_ReadComponent_MemberAccessChain) {}

TEST_F(PackedVec3Test, StructMember_Vec3_ReadComponent_IndexAccessor) {}

TEST_F(PackedVec3Test, StructMember_Vec3_WriteStruct_ValueRHS) {}

TEST_F(PackedVec3Test, StructMember_Vec3_WriteStruct_RefRHS) {}

TEST_F(PackedVec3Test, StructMember_Vec3_WriteVector_ValueRHS) {}

TEST_F(PackedVec3Test, StructMember_Vec3_WriteVector_RefRHS) {}

TEST_F(PackedVec3Test, StructMember_Vec3_WriteComponent_MemberAccessor) {}

TEST_F(PackedVec3Test, StructMember_Vec3_WriteComponent_IndexAccessor) {}

TEST_F(PackedVec3Test, StructMember_ArrayOfVec3_ReadStruct_Small) {}

TEST_F(PackedVec3Test, StructMember_ArrayOfVec3_ReadStruct_Large) {}

TEST_F(PackedVec3Test, StructMember_ArrayOfVec3_ReadArray_Small) {}

TEST_F(PackedVec3Test, StructMember_ArrayOfVec3_ReadArray_Large) {}

TEST_F(PackedVec3Test, StructMember_ArrayOfVec3_ReadVector) {}

TEST_F(PackedVec3Test, StructMember_ArrayOfVec3_ReadComponent_MemberAccessor) {}

TEST_F(PackedVec3Test, StructMember_ArrayOfVec3_ReadComponent_IndexAccessor) {}

TEST_F(PackedVec3Test, StructMember_ArrayOfVec3_WriteStruct_ValueRHS_Small) {}

TEST_F(PackedVec3Test, StructMember_ArrayOfVec3_WriteStruct_ValueRHS_Large) {}

TEST_F(PackedVec3Test, StructMember_ArrayOfVec3_WriteStruct_RefRHS) {}

TEST_F(PackedVec3Test, StructMember_ArrayOfVec3_WriteArray_ValueRHS_Small) {}

TEST_F(PackedVec3Test, StructMember_ArrayOfVec3_WriteArray_ValueRHS_Large) {}

TEST_F(PackedVec3Test, StructMember_ArrayOfVec3_WriteArray_RefRHS) {}

TEST_F(PackedVec3Test, StructMember_ArrayOfVec3_WriteVector_ValueRHS) {}

TEST_F(PackedVec3Test, StructMember_ArrayOfVec3_WriteVector_RefRHS) {}

TEST_F(PackedVec3Test, StructMember_ArrayOfVec3_WriteComponent_MemberAccessor) {}

TEST_F(PackedVec3Test, StructMember_ArrayOfVec3_WriteComponent_IndexAccessor) {}

TEST_F(PackedVec3Test, StructMember_Matrix_ReadStruct) {}

TEST_F(PackedVec3Test, StructMember_Matrix_ReadMatrix) {}

TEST_F(PackedVec3Test, StructMember_Matrix_ReadColumn) {}

TEST_F(PackedVec3Test, StructMember_Matrix_ReadComponent_MemberAccessChain) {}

TEST_F(PackedVec3Test, StructMember_Matrix_ReadComponent_IndexAccessor) {}

TEST_F(PackedVec3Test, StructMember_Matrix_WriteStruct_ValueRHS) {}

TEST_F(PackedVec3Test, StructMember_Matrix_WriteStruct_RefRHS) {}

TEST_F(PackedVec3Test, StructMember_Matrix_WriteMatrix_ValueRHS) {}

TEST_F(PackedVec3Test, StructMember_Matrix_WriteMatrix_RefRHS) {}

TEST_F(PackedVec3Test, StructMember_Matrix_WriteColumn_ValueRHS) {}

TEST_F(PackedVec3Test, StructMember_Matrix_WriteColumn_RefRHS) {}

TEST_F(PackedVec3Test, StructMember_Matrix_WriteComponent_MemberAccessor) {}

TEST_F(PackedVec3Test, StructMember_Matrix_WriteComponent_IndexAccessor) {}

TEST_F(PackedVec3Test, StructMember_ArrayOfMatrix_ReadStruct_Small) {}

TEST_F(PackedVec3Test, StructMember_ArrayOfMatrix_ReadStruct_Large) {}

TEST_F(PackedVec3Test, StructMember_ArrayOfMatrix_ReadArray) {}

TEST_F(PackedVec3Test, StructMember_ArrayOfMatrix_ReadMatrix) {}

TEST_F(PackedVec3Test, StructMember_ArrayOfMatrix_ReadColumn) {}

TEST_F(PackedVec3Test, StructMember_ArrayOfMatrix_ReadComponent_MemberAccessor) {}

TEST_F(PackedVec3Test, StructMember_ArrayOfMatrix_ReadComponent_IndexAccessor) {}

TEST_F(PackedVec3Test, StructMember_ArrayOfMatrix_WriteStruct_ValueRHS) {}

TEST_F(PackedVec3Test, StructMember_ArrayOfMatrix_WriteStruct_RefRHS) {}

TEST_F(PackedVec3Test, StructMember_ArrayOfMatrix_WriteArray_ValueRHS) {}

TEST_F(PackedVec3Test, StructMember_ArrayOfMatrix_WriteArray_RefRHS) {}

TEST_F(PackedVec3Test, StructMember_ArrayOfMatrix_WriteMatrix_ValueRHS) {}

TEST_F(PackedVec3Test, StructMember_ArrayOfMatrix_WriteMatrix_RefRHS) {}

TEST_F(PackedVec3Test, StructMember_ArrayOfMatrix_WriteVector_ValueRHS) {}

TEST_F(PackedVec3Test, StructMember_ArrayOfMatrix_WriteVector_RefRHS) {}

TEST_F(PackedVec3Test, StructMember_ArrayOfMatrix_WriteComponent_MemberAccessor) {}

TEST_F(PackedVec3Test, StructMember_ArrayOfMatrix_WriteComponent_IndexAccessor) {}

TEST_F(PackedVec3Test, StructMember_ExistingMemberAttributes) {}

TEST_F(PackedVec3Test, StructMember_ExistingMemberAttributes_SizeMatchesUnpackedVec3) {}

TEST_F(PackedVec3Test, StructMember_ExistingMemberAttributes_AlignTooSmall) {}

TEST_F(PackedVec3Test, StructMember_ExistingMemberAttributes_ExplicitOffset) {}

TEST_F(PackedVec3Test, StructValueConstructor_ViaIndexAccessor) {}

TEST_F(PackedVec3Test, WrapperStructLayout_MixedUsage) {}

TEST_F(PackedVec3Test, PackUnpackStructWithNonVec3Members) {}

TEST_F(PackedVec3Test, Struct_ShaderIO) {}

TEST_F(PackedVec3Test, ModfReturnStruct) {}

TEST_F(PackedVec3Test, ModfReturnStruct_PointerToMember) {}

TEST_F(PackedVec3Test, MultipleStructMembers) {}

TEST_F(PackedVec3Test, Vec3Pointers) {}

TEST_F(PackedVec3Test, MatrixPointers) {}

TEST_F(PackedVec3Test, ArrayOfVec3Pointers) {}

TEST_F(PackedVec3Test, ArrayOfMatrixPointers) {}

TEST_F(PackedVec3Test, StructPointers) {}

TEST_F(PackedVec3Test, VectorPointerParameters) {}

TEST_F(PackedVec3Test, MatrixPointerParameters) {}

TEST_F(PackedVec3Test, ArrayOfVectorPointerParameters) {}

TEST_F(PackedVec3Test, ArrayOfMatrixPointerParameters) {}

TEST_F(PackedVec3Test, StructPointerParameters) {}

TEST_F(PackedVec3Test, MixedAddressSpace_Struct) {}

TEST_F(PackedVec3Test, MixedAddressSpace_NestedStruct) {}

TEST_F(PackedVec3Test, MixedAddressSpace_AnotherStructNotShared) {}

TEST_F(PackedVec3Test, MixedAddressSpace_InitFromLoad_ExplicitVarType) {}

TEST_F(PackedVec3Test, MixedAddressSpace_InitFromLoad_InferredVarType) {}

TEST_F(PackedVec3Test, MixedAddressSpace_InitFromValue_ExplicitVarType) {}

TEST_F(PackedVec3Test, MixedAddressSpace_InitFromValue_InferredVarType) {}

TEST_F(PackedVec3Test, MixedAddressSpace_Pointers_Function) {}

TEST_F(PackedVec3Test, MixedAddressSpace_Pointers_Private) {}

TEST_F(PackedVec3Test, MixedAddressSpace_Pointers_Workgroup) {}

TEST_F(PackedVec3Test, MixedAddressSpace_PointerParameters) {}

TEST_F(PackedVec3Test, WriteVec3Swizzle_FromRef) {}

TEST_F(PackedVec3Test, WriteVec3Swizzle_FromValue) {}

TEST_F(PackedVec3Test, WriteVec3Component_FromPackedValueIndexAccessor) {}

TEST_F(PackedVec3Test, ExtractVec3FromStructValueExpression) {}

TEST_F(PackedVec3Test, ExtractArrayOfVec3FromStructValueExpression) {}

TEST_F(PackedVec3Test, ExtractNestedArrayFromStructValueExpression) {}

TEST_F(PackedVec3Test, ExtractMatrixFromStructValueExpression) {}

TEST_F(PackedVec3Test, ExtractArrayOfMatrixFromStructValueExpression) {}

TEST_F(PackedVec3Test, NestedArrays_Let) {}

TEST_F(PackedVec3Test, NestedArrays_VarInit_Small) {}

TEST_F(PackedVec3Test, NestedArrays_VarInit_Large) {}

TEST_F(PackedVec3Test, NestedArrays_VarAssignment_Small) {}

TEST_F(PackedVec3Test, NestedArrays_VarAssignment_Large) {}

TEST_F(PackedVec3Test, RuntimeSizedArray) {}

TEST_F(PackedVec3Test, Mat3x3_F16_Uniform) {}

TEST_F(PackedVec3Test, MultipleComponentTypes_StructMembers) {}

TEST_F(PackedVec3Test, MultipleComponentTypes_ArrayElement) {}

TEST_F(PackedVec3Test, Arithmetic_FromRef) {}

TEST_F(PackedVec3Test, Arithmetic_FromValue) {}

TEST_F(PackedVec3Test, Arithmetic_FromRefStruct) {}

TEST_F(PackedVec3Test, Arithmetic_FromValueStruct) {}

TEST_F(PackedVec3Test, Aliases_Small) {}

TEST_F(PackedVec3Test, Aliases_Large) {}

TEST_F(PackedVec3Test, Vec3Bool) {}

}  // namespace
}  // namespace tint::msl::writer