#include "gmock/gmock.h"
#include "src/tint/lang/core/type/array.h"
#include "src/tint/lang/core/type/depth_multisampled_texture.h"
#include "src/tint/lang/core/type/depth_texture.h"
#include "src/tint/lang/core/type/matrix.h"
#include "src/tint/lang/core/type/multisampled_texture.h"
#include "src/tint/lang/core/type/sampled_texture.h"
#include "src/tint/lang/core/type/storage_texture.h"
#include "src/tint/lang/core/type/struct.h"
#include "src/tint/lang/msl/writer/helper_test.h"
#include "src/tint/utils/text/string.h"
namespace tint::msl::writer {
namespace {
usingnamespacetint::core::fluent_types;
usingnamespacetint::core::number_suffixes;
TEST_F(MslWriterTest, EmitType_Array) { … }
TEST_F(MslWriterTest, EmitType_ArrayOfArray) { … }
TEST_F(MslWriterTest, EmitType_ArrayOfArrayOfArray) { … }
TEST_F(MslWriterTest, EmitType_RuntimeArray) { … }
TEST_F(MslWriterTest, EmitType_Bool) { … }
TEST_F(MslWriterTest, EmitType_F32) { … }
TEST_F(MslWriterTest, EmitType_F16) { … }
TEST_F(MslWriterTest, EmitType_I32) { … }
TEST_F(MslWriterTest, EmitType_Matrix_F32) { … }
TEST_F(MslWriterTest, EmitType_Matrix_F16) { … }
TEST_F(MslWriterTest, EmitType_U32) { … }
TEST_F(MslWriterTest, EmitType_Atomic_U32) { … }
TEST_F(MslWriterTest, EmitType_Atomic_I32) { … }
TEST_F(MslWriterTest, EmitType_Vector) { … }
TEST_F(MslWriterTest, EmitType_VectorPacked) { … }
TEST_F(MslWriterTest, EmitType_Void) { … }
TEST_F(MslWriterTest, DISABLED_EmitType_Pointer_Workgroup) { … }
TEST_F(MslWriterTest, DISABLED_EmitType_Pointer_Const) { … }
TEST_F(MslWriterTest, EmitType_Struct) { … }
TEST_F(MslWriterTest, EmitType_Struct_Dedup) { … }
void FormatMSLField(StringStream& out,
const char* addr,
const char* type,
size_t array_count,
const char* name) { … }
#define CHECK_TYPE_SIZE_AND_ALIGN(TYPE, SIZE, ALIGN) …
#define DECLARE_TYPE(NAME, SIZE, ALIGN) …
DECLARE_TYPE(…);
DECLARE_TYPE(…);
DECLARE_TYPE(…);
DECLARE_TYPE(…);
DECLARE_TYPE(…);
DECLARE_TYPE(…);
DECLARE_TYPE(…);
DECLARE_TYPE(…);
DECLARE_TYPE(…);
DECLARE_TYPE(…);
DECLARE_TYPE(…);
DECLARE_TYPE(…);
DECLARE_TYPE(…);
DECLARE_TYPE(…);
DECLARE_TYPE(…);
DECLARE_TYPE(…);
DECLARE_TYPE(…);
DECLARE_TYPE(…);
DECLARE_TYPE(…);
DECLARE_TYPE(…);
DECLARE_TYPE(…);
DECLARE_TYPE(…);
DECLARE_TYPE(…);
DECLARE_TYPE(…);
uint;
struct MemberData { … };
core::type::Struct* MkStruct(core::ir::Module& mod,
core::type::Manager& ty,
std::string_view name,
VectorRef<MemberData> data) { … }
TEST_F(MslWriterTest, EmitType_Struct_Layout_NumericTypes) { … }
TEST_F(MslWriterTest, EmitType_Struct_Layout_Structures) { … }
TEST_F(MslWriterTest, EmitType_Struct_Layout_ArrayDefaultStride) { … }
TEST_F(MslWriterTest, EmitType_Struct_Layout_Vec3) { … }
TEST_F(MslWriterTest, AttemptTintPadSymbolCollision) { … }
TEST_F(MslWriterTest, EmitType_Sampler) { … }
TEST_F(MslWriterTest, EmitType_SamplerComparison) { … }
struct MslDepthTextureData { … };
inline std::ostream& operator<<(std::ostream& out, MslDepthTextureData data) { … }
MslWriterDepthTexturesTest;
TEST_P(MslWriterDepthTexturesTest, Emit) { … }
INSTANTIATE_TEST_SUITE_P(…);
TEST_F(MslWriterTest, EmitType_DepthMultisampledTexture) { … }
struct MslTextureData { … };
inline std::ostream& operator<<(std::ostream& out, MslTextureData data) { … }
MslWriterSampledtexturesTest;
TEST_P(MslWriterSampledtexturesTest, Emit) { … }
INSTANTIATE_TEST_SUITE_P(…);
TEST_F(MslWriterTest, EmitType_MultisampledTexture) { … }
struct MslStorageTextureData { … };
inline std::ostream& operator<<(std::ostream& out, MslStorageTextureData data) { … }
MslWriterStorageTexturesTest;
TEST_P(MslWriterStorageTexturesTest, Emit) { … }
INSTANTIATE_TEST_SUITE_P(…);
TEST_F(MslWriterTest, EmitType_SubgroupMatrixLeft) { … }
TEST_F(MslWriterTest, EmitType_SubgroupMatrixRight) { … }
TEST_F(MslWriterTest, EmitType_SubgroupMatrixResult) { … }
}
}