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

Function ValidateCapability

source/val/validate_mode_setting.cpp:995–1007  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

993}
994
995spv_result_t ValidateCapability(ValidationState_t& _, const Instruction* inst) {
996 auto cap = inst->GetOperandAs<spv::Capability>(0);
997 if (cap == spv::Capability::CooperativeMatrixKHR) {
998 if (_.HasCapability(spv::Capability::Shader) &&
999 !_.HasCapability(spv::Capability::VulkanMemoryModel)) {
1000 return _.diag(SPV_ERROR_INVALID_CAPABILITY, inst)
1001 << "If the Shader and CooperativeMatrixKHR capabilities are "
1002 "declared, the VulkanMemoryModel capability must also be "
1003 "declared";
1004 }
1005 }
1006 return SPV_SUCCESS;
1007}
1008
1009} // namespace
1010

Callers 1

ModeSettingPassFunction · 0.85

Calls 2

diagMethod · 0.80
HasCapabilityMethod · 0.45

Tested by

no test coverage detected