Lines Matching refs:_
28 spv_result_t LogicalsPass(ValidationState_t& _, const Instruction* inst) { in LogicalsPass() argument
35 if (!_.IsBoolScalarType(result_type)) in LogicalsPass()
36 return _.diag(SPV_ERROR_INVALID_DATA, inst) in LogicalsPass()
40 const uint32_t vector_type = _.GetOperandTypeId(inst, 2); in LogicalsPass()
41 if (!vector_type || !_.IsBoolVectorType(vector_type)) in LogicalsPass()
42 return _.diag(SPV_ERROR_INVALID_DATA, inst) in LogicalsPass()
54 if (!_.IsBoolScalarType(result_type) && !_.IsBoolVectorType(result_type)) in LogicalsPass()
55 return _.diag(SPV_ERROR_INVALID_DATA, inst) in LogicalsPass()
59 const uint32_t operand_type = _.GetOperandTypeId(inst, 2); in LogicalsPass()
60 if (!operand_type || (!_.IsFloatScalarType(operand_type) && in LogicalsPass()
61 !_.IsFloatVectorType(operand_type))) in LogicalsPass()
62 return _.diag(SPV_ERROR_INVALID_DATA, inst) in LogicalsPass()
66 if (_.GetDimension(result_type) != _.GetDimension(operand_type)) in LogicalsPass()
67 return _.diag(SPV_ERROR_INVALID_DATA, inst) in LogicalsPass()
90 if (!_.IsBoolScalarType(result_type) && !_.IsBoolVectorType(result_type)) in LogicalsPass()
91 return _.diag(SPV_ERROR_INVALID_DATA, inst) in LogicalsPass()
95 const uint32_t left_operand_type = _.GetOperandTypeId(inst, 2); in LogicalsPass()
96 if (!left_operand_type || (!_.IsFloatScalarType(left_operand_type) && in LogicalsPass()
97 !_.IsFloatVectorType(left_operand_type))) in LogicalsPass()
98 return _.diag(SPV_ERROR_INVALID_DATA, inst) in LogicalsPass()
102 if (_.GetDimension(result_type) != _.GetDimension(left_operand_type)) in LogicalsPass()
103 return _.diag(SPV_ERROR_INVALID_DATA, inst) in LogicalsPass()
108 if (left_operand_type != _.GetOperandTypeId(inst, 3)) in LogicalsPass()
109 return _.diag(SPV_ERROR_INVALID_DATA, inst) in LogicalsPass()
120 if (!_.IsBoolScalarType(result_type) && !_.IsBoolVectorType(result_type)) in LogicalsPass()
121 return _.diag(SPV_ERROR_INVALID_DATA, inst) in LogicalsPass()
125 if (result_type != _.GetOperandTypeId(inst, 2) || in LogicalsPass()
126 result_type != _.GetOperandTypeId(inst, 3)) in LogicalsPass()
127 return _.diag(SPV_ERROR_INVALID_DATA, inst) in LogicalsPass()
135 if (!_.IsBoolScalarType(result_type) && !_.IsBoolVectorType(result_type)) in LogicalsPass()
136 return _.diag(SPV_ERROR_INVALID_DATA, inst) in LogicalsPass()
140 if (result_type != _.GetOperandTypeId(inst, 2)) in LogicalsPass()
141 return _.diag(SPV_ERROR_INVALID_DATA, inst) in LogicalsPass()
151 const Instruction* type_inst = _.FindDef(result_type); in LogicalsPass()
157 if (!_.features().variable_pointers && in LogicalsPass()
158 !_.features().variable_pointers_storage_buffer) in LogicalsPass()
159 return _.diag(SPV_ERROR_INVALID_DATA, inst) in LogicalsPass()
177 return _.diag(SPV_ERROR_INVALID_DATA, inst) in LogicalsPass()
184 const uint32_t condition_type = _.GetOperandTypeId(inst, 2); in LogicalsPass()
185 const uint32_t left_type = _.GetOperandTypeId(inst, 3); in LogicalsPass()
186 const uint32_t right_type = _.GetOperandTypeId(inst, 4); in LogicalsPass()
188 if (!condition_type || (!_.IsBoolScalarType(condition_type) && in LogicalsPass()
189 !_.IsBoolVectorType(condition_type))) in LogicalsPass()
190 return _.diag(SPV_ERROR_INVALID_DATA, inst) in LogicalsPass()
194 if (_.GetDimension(condition_type) != dimension) in LogicalsPass()
195 return _.diag(SPV_ERROR_INVALID_DATA, inst) in LogicalsPass()
200 return _.diag(SPV_ERROR_INVALID_DATA, inst) in LogicalsPass()
217 if (!_.IsBoolScalarType(result_type) && !_.IsBoolVectorType(result_type)) in LogicalsPass()
218 return _.diag(SPV_ERROR_INVALID_DATA, inst) in LogicalsPass()
222 const uint32_t left_type = _.GetOperandTypeId(inst, 2); in LogicalsPass()
223 const uint32_t right_type = _.GetOperandTypeId(inst, 3); in LogicalsPass()
226 (!_.IsIntScalarType(left_type) && !_.IsIntVectorType(left_type))) in LogicalsPass()
227 return _.diag(SPV_ERROR_INVALID_DATA, inst) in LogicalsPass()
231 if (_.GetDimension(result_type) != _.GetDimension(left_type)) in LogicalsPass()
232 return _.diag(SPV_ERROR_INVALID_DATA, inst) in LogicalsPass()
237 (!_.IsIntScalarType(right_type) && !_.IsIntVectorType(right_type))) in LogicalsPass()
238 return _.diag(SPV_ERROR_INVALID_DATA, inst) in LogicalsPass()
242 if (_.GetDimension(result_type) != _.GetDimension(right_type)) in LogicalsPass()
243 return _.diag(SPV_ERROR_INVALID_DATA, inst) in LogicalsPass()
247 if (_.GetBitWidth(left_type) != _.GetBitWidth(right_type)) in LogicalsPass()
248 return _.diag(SPV_ERROR_INVALID_DATA, inst) in LogicalsPass()