chromium/third_party/dawn/src/tint/lang/wgsl/resolver/builtin_validation_test.cc

// Copyright 2021 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 <unordered_set>

#include "src/tint/lang/wgsl/ast/builtin_texture_helper_test.h"
#include "src/tint/lang/wgsl/resolver/resolver_helper_test.h"
#include "src/tint/lang/wgsl/sem/value_constructor.h"
#include "src/tint/utils/text/string_stream.h"

namespace tint::resolver {
namespace {

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

ResolverBuiltinValidationTest;

TEST_F(ResolverBuiltinValidationTest, FunctionTypeMustMatchReturnStatementType_void_fail) {}

TEST_F(ResolverBuiltinValidationTest, InvalidPipelineStageDirect) {}

TEST_F(ResolverBuiltinValidationTest, InvalidPipelineStageIndirect) {}

TEST_F(ResolverBuiltinValidationTest, BuiltinRedeclaredAsFunctionUsedAsFunction) {}

TEST_F(ResolverBuiltinValidationTest, BuiltinRedeclaredAsFunctionUsedAsVariable) {}

TEST_F(ResolverBuiltinValidationTest, BuiltinRedeclaredAsGlobalConstUsedAsVariable) {}

TEST_F(ResolverBuiltinValidationTest, BuiltinRedeclaredAsGlobalVarUsedAsVariable) {}

TEST_F(ResolverBuiltinValidationTest, BuiltinRedeclaredAsAliasUsedAsFunction) {}

TEST_F(ResolverBuiltinValidationTest, BuiltinRedeclaredAsAliasUsedAsType) {}

TEST_F(ResolverBuiltinValidationTest, BuiltinRedeclaredAsStructUsedAsFunction) {}

TEST_F(ResolverBuiltinValidationTest, BuiltinRedeclaredAsStructUsedAsType) {}

namespace texture_constexpr_args {

TextureOverloadCase;
ValidTextureOverload;
TextureKind;
TextureDataType;

static std::vector<TextureOverloadCase> TextureCases(
    std::unordered_set<ValidTextureOverload> overloads) {}

enum class Position {};

struct Parameter {};

class Constexpr {};

static std::ostream& operator<<(std::ostream& out, Parameter param) {}

static std::ostream& operator<<(std::ostream& out, Constexpr expr) {}

BuiltinTextureConstExprArgValidationTest;

TEST_P(BuiltinTextureConstExprArgValidationTest, Immediate) {}

TEST_P(BuiltinTextureConstExprArgValidationTest, GlobalConst) {}

TEST_P(BuiltinTextureConstExprArgValidationTest, GlobalVar) {}
INSTANTIATE_TEST_SUITE_P();

INSTANTIATE_TEST_SUITE_P();

INSTANTIATE_TEST_SUITE_P();

}  // namespace texture_constexpr_args

ResolverPacked4x8IntegerDotProductValidationTest;

TEST_F(ResolverPacked4x8IntegerDotProductValidationTest, Dot4I8Packed) {}

TEST_F(ResolverPacked4x8IntegerDotProductValidationTest, Dot4I8Packed_FeatureDisallowed) {}

TEST_F(ResolverPacked4x8IntegerDotProductValidationTest, Dot4U8Packed) {}

TEST_F(ResolverPacked4x8IntegerDotProductValidationTest, Dot4U8Packed_FeatureDisallowed) {}

TEST_F(ResolverPacked4x8IntegerDotProductValidationTest, Pack4xI8) {}

TEST_F(ResolverPacked4x8IntegerDotProductValidationTest, Pack4xI8_FeatureDisallowed) {}

TEST_F(ResolverPacked4x8IntegerDotProductValidationTest, Pack4xU8) {}

TEST_F(ResolverPacked4x8IntegerDotProductValidationTest, Pack4xU8_FeatureDisallowed) {}

TEST_F(ResolverPacked4x8IntegerDotProductValidationTest, Pack4xI8Clamp) {}

TEST_F(ResolverPacked4x8IntegerDotProductValidationTest, Pack4xI8Clamp_FeatureDisallowed) {}

TEST_F(ResolverPacked4x8IntegerDotProductValidationTest, Pack4xU8Clamp) {}

TEST_F(ResolverPacked4x8IntegerDotProductValidationTest, Pack4xU8Clamp_FeatureDisallowed) {}

TEST_F(ResolverPacked4x8IntegerDotProductValidationTest, Unpack4xI8) {}

TEST_F(ResolverPacked4x8IntegerDotProductValidationTest, Unpack4xI8_FeatureDisallowed) {}

TEST_F(ResolverPacked4x8IntegerDotProductValidationTest, Unpack4xU8) {}

TEST_F(ResolverPacked4x8IntegerDotProductValidationTest, Unpack4xU8_FeatureDisallowed) {}

TEST_F(ResolverBuiltinValidationTest, WorkgroupUniformLoad_WrongAddressSpace) {}

TEST_F(ResolverBuiltinValidationTest, WorkgroupUniformLoad_Atomic) {}

TEST_F(ResolverBuiltinValidationTest, WorkgroupUniformLoad_AtomicInArray) {}

TEST_F(ResolverBuiltinValidationTest, WorkgroupUniformLoad_AtomicInStruct) {}

TEST_F(ResolverBuiltinValidationTest, SubgroupBallotWithoutExtension) {}

TEST_F(ResolverBuiltinValidationTest, SubgroupBallotWithExtension) {}

TEST_F(ResolverBuiltinValidationTest, SubgroupBallotWithoutArgument) {}

TEST_F(ResolverBuiltinValidationTest, SubgroupBallotWithExperimentalExtension) {}

TEST_F(ResolverBuiltinValidationTest, SubgroupBroadcastWithoutExtension) {}

TEST_F(ResolverBuiltinValidationTest, SubgroupBroadcastWithExtension) {}

TEST_F(ResolverBuiltinValidationTest, SubgroupBroadcastWithExperimentalExtension) {}

TEST_F(ResolverBuiltinValidationTest, SubgroupBroadcastWithoutExtension_F16) {}

TEST_F(ResolverBuiltinValidationTest, SubgroupBroadcastWithExtensions_F16) {}

TEST_F(ResolverBuiltinValidationTest, SubgroupBroadcastWithExperimentalExtension_F16) {}

TEST_F(ResolverBuiltinValidationTest, SubgroupBroadcastWithoutExtension_VecF16) {}

TEST_F(ResolverBuiltinValidationTest, SubgroupBroadcastWithExtensions_VecF16) {}

TEST_F(ResolverBuiltinValidationTest, SubgroupBroadcastWithExperimentalExtension_VecF16) {}

TEST_F(ResolverBuiltinValidationTest, SubroupBroadcastInComputeStage) {}

TEST_F(ResolverBuiltinValidationTest, SubroupBroadcastInVertexStageIsError) {}

TEST_F(ResolverBuiltinValidationTest, SubroupBroadcastInFragmentStageIsValid) {}

TEST_F(ResolverBuiltinValidationTest, SubgroupBroadcastValueF32) {}

TEST_F(ResolverBuiltinValidationTest, SubgroupBroadcastValueI32) {}

TEST_F(ResolverBuiltinValidationTest, SubgroupBroadcastValueU32) {}

TEST_F(ResolverBuiltinValidationTest, SubgroupBroadcastLaneArgMustBeConst) {}

TEST_F(ResolverBuiltinValidationTest, QuadBroadcastIdArgMustBeConst) {}

TEST_F(ResolverBuiltinValidationTest, SubgroupBroadcastLaneArgMustBeNonNeg) {}

TEST_F(ResolverBuiltinValidationTest, QuadBroadcastIdArgMustBeNonNeg) {}

TEST_F(ResolverBuiltinValidationTest, TextureBarrier) {}

TEST_F(ResolverBuiltinValidationTest, TextureBarrier_FeatureDisallowed) {}

}  // namespace
}  // namespace tint::resolver