#include "src/tint/lang/hlsl/writer/raise/builtin_polyfill.h"
#include <string>
#include "gtest/gtest.h"
#include "src/tint/lang/core/fluent_types.h"
#include "src/tint/lang/core/ir/transform/helper_test.h"
#include "src/tint/lang/core/number.h"
#include "src/tint/lang/core/type/builtin_structs.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/multisampled_texture.h"
#include "src/tint/lang/core/type/sampled_texture.h"
#include "src/tint/lang/core/type/storage_texture.h"
usingnamespacetint::core::fluent_types;
usingnamespacetint::core::number_suffixes;
namespace tint::hlsl::writer::raise {
namespace {
HlslWriter_BuiltinPolyfillTest;
TEST_F(HlslWriter_BuiltinPolyfillTest, BitcastIdentity) { … }
TEST_F(HlslWriter_BuiltinPolyfillTest, Asuint) { … }
TEST_F(HlslWriter_BuiltinPolyfillTest, Asint) { … }
TEST_F(HlslWriter_BuiltinPolyfillTest, Asfloat) { … }
TEST_F(HlslWriter_BuiltinPolyfillTest, AsfloatVec) { … }
TEST_F(HlslWriter_BuiltinPolyfillTest, BitcastFromF16) { … }
TEST_F(HlslWriter_BuiltinPolyfillTest, BitcastToF16) { … }
TEST_F(HlslWriter_BuiltinPolyfillTest, BitcastFromVec2F16) { … }
TEST_F(HlslWriter_BuiltinPolyfillTest, BitcastToVec4F16) { … }
TEST_F(HlslWriter_BuiltinPolyfillTest, Sign) { … }
TEST_F(HlslWriter_BuiltinPolyfillTest, SignVec) { … }
TEST_F(HlslWriter_BuiltinPolyfillTest, TextureNumLevels) { … }
TEST_F(HlslWriter_BuiltinPolyfillTest, TextureNumLayers) { … }
TEST_F(HlslWriter_BuiltinPolyfillTest, TextureNumSamples) { … }
TEST_F(HlslWriter_BuiltinPolyfillTest, TextureDimensions_1d) { … }
TEST_F(HlslWriter_BuiltinPolyfillTest, TextureDimensions_2d_WithoutLod) { … }
TEST_F(HlslWriter_BuiltinPolyfillTest, TextureDimensions_2d_WithI32Lod) { … }
TEST_F(HlslWriter_BuiltinPolyfillTest, TextureDimensions_3d) { … }
TEST_F(HlslWriter_BuiltinPolyfillTest, TextureLoad_1DF32) { … }
TEST_F(HlslWriter_BuiltinPolyfillTest, TextureLoad_2DLevelI32) { … }
TEST_F(HlslWriter_BuiltinPolyfillTest, TextureLoad_3DLevelU32) { … }
TEST_F(HlslWriter_BuiltinPolyfillTest, TextureLoad_Multisampled2DI32) { … }
TEST_F(HlslWriter_BuiltinPolyfillTest, TextureLoad_Depth2DLevelF32) { … }
TEST_F(HlslWriter_BuiltinPolyfillTest, TextureLoad_Depth2DArrayLevelF32) { … }
TEST_F(HlslWriter_BuiltinPolyfillTest, TextureLoad_DepthMultisampledF32) { … }
TEST_F(HlslWriter_BuiltinPolyfillTest, TextureStore1D) { … }
TEST_F(HlslWriter_BuiltinPolyfillTest, TextureStore3D) { … }
TEST_F(HlslWriter_BuiltinPolyfillTest, TextureStoreArray) { … }
TEST_F(HlslWriter_BuiltinPolyfillTest, TextureGatherCompare_Depth2d) { … }
TEST_F(HlslWriter_BuiltinPolyfillTest, TextureGatherCompare_Depth2dOffset) { … }
TEST_F(HlslWriter_BuiltinPolyfillTest, TextureGatherCompare_DepthCubeArray) { … }
TEST_F(HlslWriter_BuiltinPolyfillTest, TextureGatherCompare_Depth2dArrayOffset) { … }
TEST_F(HlslWriter_BuiltinPolyfillTest, TextureGather_Alpha) { … }
TEST_F(HlslWriter_BuiltinPolyfillTest, TextureGather_RedOffset) { … }
TEST_F(HlslWriter_BuiltinPolyfillTest, TextureGather_GreenArray) { … }
TEST_F(HlslWriter_BuiltinPolyfillTest, TextureGather_BlueArrayOffset) { … }
TEST_F(HlslWriter_BuiltinPolyfillTest, TextureGather_Depth) { … }
TEST_F(HlslWriter_BuiltinPolyfillTest, TextureGather_DepthOffset) { … }
TEST_F(HlslWriter_BuiltinPolyfillTest, TextureGather_DepthArray) { … }
TEST_F(HlslWriter_BuiltinPolyfillTest, TextureGather_DepthArrayOffset) { … }
TEST_F(HlslWriter_BuiltinPolyfillTest, TextureSample_1d) { … }
TEST_F(HlslWriter_BuiltinPolyfillTest, TextureSample_2d) { … }
TEST_F(HlslWriter_BuiltinPolyfillTest, TextureSample_2d_Offset) { … }
TEST_F(HlslWriter_BuiltinPolyfillTest, TextureSample_2d_Array) { … }
TEST_F(HlslWriter_BuiltinPolyfillTest, TextureSample_2d_Array_Offset) { … }
TEST_F(HlslWriter_BuiltinPolyfillTest, TextureSample_3d) { … }
TEST_F(HlslWriter_BuiltinPolyfillTest, TextureSample_3d_Offset) { … }
TEST_F(HlslWriter_BuiltinPolyfillTest, TextureSample_Cube) { … }
TEST_F(HlslWriter_BuiltinPolyfillTest, TextureSample_Cube_Array) { … }
TEST_F(HlslWriter_BuiltinPolyfillTest, TextureSample_Depth2d) { … }
TEST_F(HlslWriter_BuiltinPolyfillTest, TextureSample_Depth2d_Offset) { … }
TEST_F(HlslWriter_BuiltinPolyfillTest, TextureSample_Depth2d_Array) { … }
TEST_F(HlslWriter_BuiltinPolyfillTest, TextureSample_Depth2d_Array_Offset) { … }
TEST_F(HlslWriter_BuiltinPolyfillTest, TextureSample_DepthCube_Array) { … }
TEST_F(HlslWriter_BuiltinPolyfillTest, TextureSampleBias_2d) { … }
TEST_F(HlslWriter_BuiltinPolyfillTest, TextureSampleBias_2d_Offset) { … }
TEST_F(HlslWriter_BuiltinPolyfillTest, TextureSampleBias_2d_Array) { … }
TEST_F(HlslWriter_BuiltinPolyfillTest, TextureSampleBias_2d_Array_Offset) { … }
TEST_F(HlslWriter_BuiltinPolyfillTest, TextureSampleBias_3d) { … }
TEST_F(HlslWriter_BuiltinPolyfillTest, TextureSampleBias_3d_Offset) { … }
TEST_F(HlslWriter_BuiltinPolyfillTest, TextureSampleBias_Cube) { … }
TEST_F(HlslWriter_BuiltinPolyfillTest, TextureSampleBias_Cube_Array) { … }
TEST_F(HlslWriter_BuiltinPolyfillTest, TextureSampleCompare_2d) { … }
TEST_F(HlslWriter_BuiltinPolyfillTest, TextureSampleCompare_2d_Offset) { … }
TEST_F(HlslWriter_BuiltinPolyfillTest, TextureSampleCompare_2d_Array) { … }
TEST_F(HlslWriter_BuiltinPolyfillTest, TextureSampleCompare_2d_Array_Offset) { … }
TEST_F(HlslWriter_BuiltinPolyfillTest, TextureSampleCompare_Cube) { … }
TEST_F(HlslWriter_BuiltinPolyfillTest, TextureSampleCompare_Cube_Array) { … }
TEST_F(HlslWriter_BuiltinPolyfillTest, TextureSampleCompareLevel_2d) { … }
TEST_F(HlslWriter_BuiltinPolyfillTest, TextureSampleCompareLevel_2d_Offset) { … }
TEST_F(HlslWriter_BuiltinPolyfillTest, TextureSampleCompareLevel_2d_Array) { … }
TEST_F(HlslWriter_BuiltinPolyfillTest, TextureSampleCompareLevel_2d_Array_Offset) { … }
TEST_F(HlslWriter_BuiltinPolyfillTest, TextureSampleCompareLevel_Cube) { … }
TEST_F(HlslWriter_BuiltinPolyfillTest, TextureSampleCompareLevel_Cube_Array) { … }
TEST_F(HlslWriter_BuiltinPolyfillTest, TextureSampleGrad_2d) { … }
TEST_F(HlslWriter_BuiltinPolyfillTest, TextureSampleGrad_2d_Offset) { … }
TEST_F(HlslWriter_BuiltinPolyfillTest, TextureSampleGrad_2d_Array) { … }
TEST_F(HlslWriter_BuiltinPolyfillTest, TextureSampleGrad_2d_Array_Offset) { … }
TEST_F(HlslWriter_BuiltinPolyfillTest, TextureSampleGrad_3d) { … }
TEST_F(HlslWriter_BuiltinPolyfillTest, TextureSampleGrad_3d_Offset) { … }
TEST_F(HlslWriter_BuiltinPolyfillTest, TextureSampleGrad_Cube) { … }
TEST_F(HlslWriter_BuiltinPolyfillTest, TextureSampleGrad_Cube_Array) { … }
TEST_F(HlslWriter_BuiltinPolyfillTest, TextureSampleLevel_2d) { … }
TEST_F(HlslWriter_BuiltinPolyfillTest, TextureSampleLevel_2d_Offset) { … }
TEST_F(HlslWriter_BuiltinPolyfillTest, TextureSampleLevel_2d_Array) { … }
TEST_F(HlslWriter_BuiltinPolyfillTest, TextureSampleLevel_2d_Array_Offset) { … }
TEST_F(HlslWriter_BuiltinPolyfillTest, TextureSampleLevel_3d) { … }
TEST_F(HlslWriter_BuiltinPolyfillTest, TextureSampleLevel_3d_Offset) { … }
TEST_F(HlslWriter_BuiltinPolyfillTest, TextureSampleLevel_Cube) { … }
TEST_F(HlslWriter_BuiltinPolyfillTest, TextureSampleLevel_Cube_Array) { … }
TEST_F(HlslWriter_BuiltinPolyfillTest, TextureSampleLevel_Depth2d) { … }
TEST_F(HlslWriter_BuiltinPolyfillTest, TextureSampleLevel_Depth2d_Offset) { … }
TEST_F(HlslWriter_BuiltinPolyfillTest, TextureSampleLevel_Depth2d_Array) { … }
TEST_F(HlslWriter_BuiltinPolyfillTest, TextureSampleLevel_Depth2d_Array_Offset) { … }
TEST_F(HlslWriter_BuiltinPolyfillTest, TextureSampleLevel_DepthCube_Array) { … }
TEST_F(HlslWriter_BuiltinPolyfillTest, QuantizeToF16) { … }
struct AtomicData { … };
[[maybe_unused]] std::ostream& operator<<(std::ostream& out, const AtomicData& data) { … }
HlslBuiltinPolyfillWorkgroupAtomic;
TEST_P(HlslBuiltinPolyfillWorkgroupAtomic, Access) { … }
INSTANTIATE_TEST_SUITE_P(…);
TEST_F(HlslWriter_BuiltinPolyfillTest, BuiltinWorkgroupAtomicStore) { … }
TEST_F(HlslWriter_BuiltinPolyfillTest, BuiltinWorkgroupAtomicLoad) { … }
TEST_F(HlslWriter_BuiltinPolyfillTest, BuiltinWorkgroupAtomicSub) { … }
TEST_F(HlslWriter_BuiltinPolyfillTest, BuiltinWorkgroupAtomicCompareExchangeWeak) { … }
TEST_F(HlslWriter_BuiltinPolyfillTest, Pack2x16Float) { … }
TEST_F(HlslWriter_BuiltinPolyfillTest, Unpack2x16Float) { … }
TEST_F(HlslWriter_BuiltinPolyfillTest, Pack2x16Snorm) { … }
TEST_F(HlslWriter_BuiltinPolyfillTest, Unpack2x16snorm) { … }
TEST_F(HlslWriter_BuiltinPolyfillTest, Pack2x16unorm) { … }
TEST_F(HlslWriter_BuiltinPolyfillTest, Unpack2x16unorm) { … }
TEST_F(HlslWriter_BuiltinPolyfillTest, Pack4x8Snorm) { … }
TEST_F(HlslWriter_BuiltinPolyfillTest, Unpack4x8Snorm) { … }
TEST_F(HlslWriter_BuiltinPolyfillTest, Pack4x8Unorm) { … }
TEST_F(HlslWriter_BuiltinPolyfillTest, Unpack4x8Unorm) { … }
TEST_F(HlslWriter_BuiltinPolyfillTest, Pack4xI8) { … }
TEST_F(HlslWriter_BuiltinPolyfillTest, Unpack4xI8) { … }
TEST_F(HlslWriter_BuiltinPolyfillTest, Pack4xU8) { … }
TEST_F(HlslWriter_BuiltinPolyfillTest, Unpack4xU8) { … }
TEST_F(HlslWriter_BuiltinPolyfillTest, Dot4U8Packed) { … }
TEST_F(HlslWriter_BuiltinPolyfillTest, Dot4I8Packed) { … }
TEST_F(HlslWriter_BuiltinPolyfillTest, Pack4xI8Clamp) { … }
TEST_F(HlslWriter_BuiltinPolyfillTest, Asinh) { … }
TEST_F(HlslWriter_BuiltinPolyfillTest, Acosh) { … }
TEST_F(HlslWriter_BuiltinPolyfillTest, Atanh) { … }
TEST_F(HlslWriter_BuiltinPolyfillTest, CountOneBits) { … }
TEST_F(HlslWriter_BuiltinPolyfillTest, ReverseBits) { … }
TEST_F(HlslWriter_BuiltinPolyfillTest, SubgroupAndLiteralVec) { … }
TEST_F(HlslWriter_BuiltinPolyfillTest, SubgroupShuffleXor) { … }
TEST_F(HlslWriter_BuiltinPolyfillTest, SubgroupShuffleUp) { … }
TEST_F(HlslWriter_BuiltinPolyfillTest, SubgroupShuffleDown) { … }
}
}