chromium/third_party/dawn/src/tint/lang/spirv/writer/raise/builtin_polyfill_test.cc

// Copyright 2023 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/spirv/writer/raise/builtin_polyfill.h"

#include <utility>

#include "src/tint/lang/core/ir/transform/helper_test.h"
#include "src/tint/lang/core/type/array.h"
#include "src/tint/lang/core/type/atomic.h"
#include "src/tint/lang/core/type/builtin_structs.h"
#include "src/tint/lang/core/type/depth_texture.h"
#include "src/tint/lang/core/type/input_attachment.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"

namespace tint::spirv::writer::raise {
namespace {

usingnamespacetint::core::fluent_types;     // NOLINT
usingnamespacetint::core::number_suffixes;  // NOLINT

SpirvWriter_BuiltinPolyfillTest;

TEST_F(SpirvWriter_BuiltinPolyfillTest, ArrayLength) {}

TEST_F(SpirvWriter_BuiltinPolyfillTest, ArrayLength_ViaLet_BeforeAccess) {}

TEST_F(SpirvWriter_BuiltinPolyfillTest, ArrayLength_ViaLet_AfterAccess) {}

TEST_F(SpirvWriter_BuiltinPolyfillTest, AtomicAdd_Storage) {}

TEST_F(SpirvWriter_BuiltinPolyfillTest, AtomicAdd_Workgroup) {}

TEST_F(SpirvWriter_BuiltinPolyfillTest, AtomicAnd) {}

TEST_F(SpirvWriter_BuiltinPolyfillTest, AtomicCompareExchangeWeak) {}

TEST_F(SpirvWriter_BuiltinPolyfillTest, AtomicExchange) {}

TEST_F(SpirvWriter_BuiltinPolyfillTest, AtomicLoad) {}

TEST_F(SpirvWriter_BuiltinPolyfillTest, AtomicMax_I32) {}

TEST_F(SpirvWriter_BuiltinPolyfillTest, AtomicMax_U32) {}

TEST_F(SpirvWriter_BuiltinPolyfillTest, AtomicMin_I32) {}

TEST_F(SpirvWriter_BuiltinPolyfillTest, AtomicMin_U32) {}

TEST_F(SpirvWriter_BuiltinPolyfillTest, AtomicOr) {}

TEST_F(SpirvWriter_BuiltinPolyfillTest, AtomicStore) {}

TEST_F(SpirvWriter_BuiltinPolyfillTest, AtomicSub) {}

TEST_F(SpirvWriter_BuiltinPolyfillTest, AtomicXor) {}

TEST_F(SpirvWriter_BuiltinPolyfillTest, Dot_Vec4f) {}

TEST_F(SpirvWriter_BuiltinPolyfillTest, Dot_Vec2i) {}

TEST_F(SpirvWriter_BuiltinPolyfillTest, Dot_Vec4u) {}

TEST_F(SpirvWriter_BuiltinPolyfillTest, Dot4I8Packed) {}

TEST_F(SpirvWriter_BuiltinPolyfillTest, Dot4U8Packed) {}

TEST_F(SpirvWriter_BuiltinPolyfillTest, Select_ScalarCondition_ScalarOperands) {}

TEST_F(SpirvWriter_BuiltinPolyfillTest, Select_VectorCondition_VectorOperands) {}

TEST_F(SpirvWriter_BuiltinPolyfillTest, Select_ScalarCondition_VectorOperands) {}

TEST_F(SpirvWriter_BuiltinPolyfillTest, TextureLoad_2D) {}

TEST_F(SpirvWriter_BuiltinPolyfillTest, TextureLoad_2DArray) {}

TEST_F(SpirvWriter_BuiltinPolyfillTest, TextureLoad_2DArray_IndexDifferentType) {}

TEST_F(SpirvWriter_BuiltinPolyfillTest, TextureLoad_Multisampled2D) {}

TEST_F(SpirvWriter_BuiltinPolyfillTest, TextureLoad_Depth2D) {}

TEST_F(SpirvWriter_BuiltinPolyfillTest, TextureLoad_Storage) {}

TEST_F(SpirvWriter_BuiltinPolyfillTest, TextureLoad_Storage_Vulkan) {}

TEST_F(SpirvWriter_BuiltinPolyfillTest, TextureSample_1D) {}

TEST_F(SpirvWriter_BuiltinPolyfillTest, TextureSample_2D) {}

TEST_F(SpirvWriter_BuiltinPolyfillTest, TextureSample_2D_Offset) {}

TEST_F(SpirvWriter_BuiltinPolyfillTest, TextureSample_2DArray_Offset) {}

TEST_F(SpirvWriter_BuiltinPolyfillTest, TextureSampleBias_2D) {}

TEST_F(SpirvWriter_BuiltinPolyfillTest, TextureSampleBias_2D_Offset) {}

TEST_F(SpirvWriter_BuiltinPolyfillTest, TextureSampleBias_2DArray_Offset) {}

TEST_F(SpirvWriter_BuiltinPolyfillTest, TextureSampleCompare_2D) {}

TEST_F(SpirvWriter_BuiltinPolyfillTest, TextureSampleCompare_2D_Offset) {}

TEST_F(SpirvWriter_BuiltinPolyfillTest, TextureSampleCompare_2DArray_Offset) {}

TEST_F(SpirvWriter_BuiltinPolyfillTest, TextureSampleCompareLevel_2D) {}

TEST_F(SpirvWriter_BuiltinPolyfillTest, TextureSampleCompareLevel_2D_Offset) {}

TEST_F(SpirvWriter_BuiltinPolyfillTest, TextureSampleCompareLevel_2DArray_Offset) {}

TEST_F(SpirvWriter_BuiltinPolyfillTest, TextureSampleGrad_2D) {}

TEST_F(SpirvWriter_BuiltinPolyfillTest, TextureSampleGrad_2D_Offset) {}

TEST_F(SpirvWriter_BuiltinPolyfillTest, TextureSampleGrad_2DArray_Offset) {}

TEST_F(SpirvWriter_BuiltinPolyfillTest, TextureSampleLevel_2D) {}

TEST_F(SpirvWriter_BuiltinPolyfillTest, TextureSampleLevel_2D_Offset) {}

TEST_F(SpirvWriter_BuiltinPolyfillTest, TextureSampleLevel_2DArray_Offset) {}

TEST_F(SpirvWriter_BuiltinPolyfillTest, TextureGather_2D) {}

TEST_F(SpirvWriter_BuiltinPolyfillTest, TextureGather_2D_Offset) {}

TEST_F(SpirvWriter_BuiltinPolyfillTest, TextureGather_2DArray_Offset) {}

TEST_F(SpirvWriter_BuiltinPolyfillTest, TextureGather_Depth2D) {}

TEST_F(SpirvWriter_BuiltinPolyfillTest, TextureGatherCompare_Depth2D) {}

TEST_F(SpirvWriter_BuiltinPolyfillTest, TextureGatherCompare_Depth2D_Offset) {}

TEST_F(SpirvWriter_BuiltinPolyfillTest, TextureGatherCompare_Depth2DArray) {}

TEST_F(SpirvWriter_BuiltinPolyfillTest, TextureStore_2D) {}

TEST_F(SpirvWriter_BuiltinPolyfillTest, TextureStore_2D_Vulkan) {}

TEST_F(SpirvWriter_BuiltinPolyfillTest, TextureStore_2DArray) {}

TEST_F(SpirvWriter_BuiltinPolyfillTest, TextureStore_2DArray_IndexDifferentType) {}

TEST_F(SpirvWriter_BuiltinPolyfillTest, TextureDimensions_2D_ImplicitLod) {}

TEST_F(SpirvWriter_BuiltinPolyfillTest, TextureDimensions_2D_ExplicitLod) {}

TEST_F(SpirvWriter_BuiltinPolyfillTest, TextureDimensions_2DArray) {}

TEST_F(SpirvWriter_BuiltinPolyfillTest, TextureDimensions_Multisampled) {}

TEST_F(SpirvWriter_BuiltinPolyfillTest, TextureNumLayers_2DArray) {}

TEST_F(SpirvWriter_BuiltinPolyfillTest, TextureNumLayers_CubeArray) {}

TEST_F(SpirvWriter_BuiltinPolyfillTest, TextureNumLayers_Depth2DArray) {}

TEST_F(SpirvWriter_BuiltinPolyfillTest, TextureNumLayers_DepthCubeArray) {}

TEST_F(SpirvWriter_BuiltinPolyfillTest, TextureNumLayers_Storage2DArray) {}

TEST_F(SpirvWriter_BuiltinPolyfillTest, QuantizeToF16_Scalar) {}

TEST_F(SpirvWriter_BuiltinPolyfillTest, QuantizeToF16_Vector) {}

TEST_F(SpirvWriter_BuiltinPolyfillTest, InputAttachmentLoad) {}

TEST_F(SpirvWriter_BuiltinPolyfillTest, SubgroupShuffle) {}

TEST_F(SpirvWriter_BuiltinPolyfillTest, SubgroupBroadcastConstSignedId) {}

TEST_F(SpirvWriter_BuiltinPolyfillTest, QuadBroadcastConstSignedId) {}

}  // namespace
}  // namespace tint::spirv::writer::raise