| 993 | } |
| 994 | |
| 995 | spv_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 |
no test coverage detected