chromium/third_party/spirv-tools/src/source/val/validate_type.cpp

// Copyright (c) 2018 Google LLC.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//     http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

// Ensures type declarations are unique unless allowed by the specification.

#include "source/opcode.h"
#include "source/spirv_target_env.h"
#include "source/val/instruction.h"
#include "source/val/validate.h"
#include "source/val/validation_state.h"

namespace spvtools {
namespace val {
namespace {

// Validates that type declarations are unique, unless multiple declarations
// of the same data type are allowed by the specification.
// (see section 2.8 Types and Variables)
// Doesn't do anything if SPV_VAL_ignore_type_decl_unique was declared in the
// module.
spv_result_t ValidateUniqueness(ValidationState_t& _, const Instruction* inst) {}

spv_result_t ValidateTypeInt(ValidationState_t& _, const Instruction* inst) {}

spv_result_t ValidateTypeFloat(ValidationState_t& _, const Instruction* inst) {}

spv_result_t ValidateTypeVector(ValidationState_t& _, const Instruction* inst) {}

spv_result_t ValidateTypeMatrix(ValidationState_t& _, const Instruction* inst) {}

spv_result_t ValidateTypeArray(ValidationState_t& _, const Instruction* inst) {}

spv_result_t ValidateTypeRuntimeArray(ValidationState_t& _,
                                      const Instruction* inst) {}

spv_result_t ValidateTypeStruct(ValidationState_t& _, const Instruction* inst) {}

spv_result_t ValidateTypePointer(ValidationState_t& _,
                                 const Instruction* inst) {}

spv_result_t ValidateTypeFunction(ValidationState_t& _,
                                  const Instruction* inst) {}

spv_result_t ValidateTypeForwardPointer(ValidationState_t& _,
                                        const Instruction* inst) {}

spv_result_t ValidateTypeCooperativeMatrix(ValidationState_t& _,
                                           const Instruction* inst) {}

spv_result_t ValidateTypeUntypedPointerKHR(ValidationState_t& _,
                                           const Instruction* inst) {}
}  // namespace

spv_result_t TypePass(ValidationState_t& _, const Instruction* inst) {}

}  // namespace val
}  // namespace spvtools