chromium/third_party/spirv-tools/src/source/val/validate_annotation.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.

#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 {

// Returns true if the decoration takes ID parameters.
// TODO(dneto): This can be generated from the grammar.
bool DecorationTakesIdParameters(spv::Decoration type) {}

bool IsMemberDecorationOnly(spv::Decoration dec) {}

bool IsNotMemberDecoration(spv::Decoration dec) {}

spv_result_t ValidateDecorationTarget(ValidationState_t& _, spv::Decoration dec,
                                      const Instruction* inst,
                                      const Instruction* target) {}

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

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

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

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

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

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

// Registers necessary decoration(s) for the appropriate IDs based on the
// instruction.
spv_result_t RegisterDecorations(ValidationState_t& _,
                                 const Instruction* inst) {}

}  // namespace

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

}  // namespace val
}  // namespace spvtools