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

Function ValidateAssumeTrue

source/val/validate_misc.cpp:84–91  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

82}
83
84spv_result_t ValidateAssumeTrue(ValidationState_t& _, const Instruction* inst) {
85 const auto operand_type_id = _.GetOperandTypeId(inst, 0);
86 if (!operand_type_id || !_.IsBoolScalarType(operand_type_id)) {
87 return _.diag(SPV_ERROR_INVALID_ID, inst)
88 << "Value operand of OpAssumeTrueKHR must be a boolean scalar";
89 }
90 return SPV_SUCCESS;
91}
92
93spv_result_t ValidateExpect(ValidationState_t& _, const Instruction* inst) {
94 const auto result_type = inst->type_id();

Callers 1

MiscPassFunction · 0.85

Calls 3

GetOperandTypeIdMethod · 0.80
IsBoolScalarTypeMethod · 0.80
diagMethod · 0.80

Tested by

no test coverage detected