MCPcopy Create free account
hub / github.com/KhronosGroup/SPIRV-Tools / ValidateInterfaces

Function ValidateInterfaces

source/val/validate_interfaces.cpp:738–763  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

736} // namespace
737
738spv_result_t ValidateInterfaces(ValidationState_t& _) {
739 bool is_spv_1_4 = _.version() >= SPV_SPIRV_VERSION_WORD(1, 4);
740 for (auto& inst : _.ordered_instructions()) {
741 if (is_interface_variable(&inst, is_spv_1_4)) {
742 if (auto error = check_interface_variable(_, &inst)) {
743 return error;
744 }
745 }
746 }
747
748 if (spvIsVulkanEnv(_.context()->target_env)) {
749 for (auto& inst : _.ordered_instructions()) {
750 if (inst.opcode() == spv::Op::OpEntryPoint) {
751 if (auto error = ValidateLocations(_, &inst)) {
752 return error;
753 }
754 if (auto error = ValidateStorageClass(_, &inst)) {
755 return error;
756 }
757 }
758 if (inst.opcode() == spv::Op::OpTypeVoid) break;
759 }
760 }
761
762 return SPV_SUCCESS;
763}
764
765} // namespace val
766} // namespace spvtools

Calls 8

is_interface_variableFunction · 0.85
check_interface_variableFunction · 0.85
spvIsVulkanEnvFunction · 0.85
ValidateLocationsFunction · 0.85
ValidateStorageClassFunction · 0.85
versionMethod · 0.45
contextMethod · 0.45
opcodeMethod · 0.45

Tested by

no test coverage detected