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

Function ValidateLogicalNot

source/val/validate_logicals.cpp:113–127  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

111}
112
113spv_result_t ValidateLogicalNot(ValidationState_t& _, const Instruction* inst,
114 uint32_t operand_index = 2) {
115 const spv::Op opcode = inst->opcode();
116 const uint32_t result_type = inst->type_id();
117 if (!_.IsBoolScalarType(result_type) && !_.IsBoolVectorType(result_type))
118 return _.diag(SPV_ERROR_INVALID_DATA, inst)
119 << "Expected bool scalar or vector type as Result Type: "
120 << spvOpcodeString(opcode);
121
122 if (result_type != _.GetOperandTypeId(inst, operand_index))
123 return _.diag(SPV_ERROR_INVALID_DATA, inst)
124 << "Expected operand to be of Result Type: "
125 << spvOpcodeString(opcode);
126 return SPV_SUCCESS;
127}
128
129spv_result_t ValidateSelect(ValidationState_t& _, const Instruction* inst,
130 uint32_t operand_index = 2) {

Callers 1

LogicalsPassFunction · 0.85

Calls 7

spvOpcodeStringFunction · 0.85
IsBoolScalarTypeMethod · 0.80
IsBoolVectorTypeMethod · 0.80
diagMethod · 0.80
GetOperandTypeIdMethod · 0.80
opcodeMethod · 0.45
type_idMethod · 0.45

Tested by

no test coverage detected