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

// Copyright (c) 2017 Google Inc.
//
// 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.

// Validates OpCapability instruction.

#include <cassert>
#include <string>

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

namespace spvtools {
namespace val {
namespace {

bool IsSupportGuaranteedVulkan_1_0(uint32_t capability) {}

bool IsSupportGuaranteedVulkan_1_1(uint32_t capability) {}

bool IsSupportGuaranteedVulkan_1_2(uint32_t capability) {}

bool IsSupportOptionalVulkan_1_0(uint32_t capability) {}

bool IsSupportOptionalVulkan_1_1(uint32_t capability) {}

bool IsSupportOptionalVulkan_1_2(uint32_t capability) {}

bool IsSupportGuaranteedOpenCL_1_2(uint32_t capability, bool embedded_profile) {}

bool IsSupportGuaranteedOpenCL_2_0(uint32_t capability, bool embedded_profile) {}

bool IsSupportGuaranteedOpenCL_2_2(uint32_t capability, bool embedded_profile) {}

bool IsSupportOptionalOpenCL_1_2(uint32_t capability) {}

// Checks if |capability| was enabled by extension.
bool IsEnabledByExtension(ValidationState_t& _, uint32_t capability) {}

bool IsEnabledByCapabilityOpenCL_1_2(ValidationState_t& _,
                                     uint32_t capability) {}

bool IsEnabledByCapabilityOpenCL_2_0(ValidationState_t& _,
                                     uint32_t capability) {}

}  // namespace

// Validates that capability declarations use operands allowed in the current
// context.
spv_result_t CapabilityPass(ValidationState_t& _, const Instruction* inst) {}

}  // namespace val
}  // namespace spvtools