@@ -846,35 +846,6 @@ class TaskCodegen : public IRVisitor {
846
846
BINARY_OP_TO_SPIRV_LOGICAL (cmp_ne, ne)
847
847
#undef BINARY_OP_TO_SPIRV_LOGICAL
848
848
849
- #define INT_OR_FLOAT_BINARY_OP_TO_SPIRV_FLOAT_FUNC (op, instruction, \
850
- instruction_id, max_bits) \
851
- else if (op_type == BinaryOpType::op) { \
852
- const uint32_t instruction = instruction_id; \
853
- if (is_real (bin->element_type ()) || is_integral (bin->element_type ())) { \
854
- if (data_type_bits (bin->element_type ()) > max_bits) { \
855
- TI_ERROR ( \
856
- " [glsl450] the operand type of instruction {}({}) must <= {}bits" , \
857
- #instruction, instruction_id, max_bits); \
858
- } \
859
- if (is_integral (bin->element_type ())) { \
860
- bin_value = ir_->cast ( \
861
- dst_type, \
862
- ir_->add (ir_->call_glsl450 (ir_->f32_type (), instruction, \
863
- ir_->cast (ir_->f32_type (), lhs_value), \
864
- ir_->cast (ir_->f32_type (), rhs_value)), \
865
- ir_->float_immediate_number (ir_->f32_type (), 0 .5f ))); \
866
- } else { \
867
- bin_value = \
868
- ir_->call_glsl450 (dst_type, instruction, lhs_value, rhs_value); \
869
- } \
870
- } else { \
871
- TI_NOT_IMPLEMENTED \
872
- } \
873
- }
874
-
875
- INT_OR_FLOAT_BINARY_OP_TO_SPIRV_FLOAT_FUNC (pow , Pow, 26 , 32 )
876
- #undef INT_OR_FLOAT_BINARY_OP_TO_SPIRV_FLOAT_FUNC
877
-
878
849
#define FLOAT_BINARY_OP_TO_SPIRV_FLOAT_FUNC (op, instruction, instruction_id, \
879
850
max_bits) \
880
851
else if (op_type == BinaryOpType::op) { \
@@ -893,6 +864,7 @@ class TaskCodegen : public IRVisitor {
893
864
}
894
865
895
866
FLOAT_BINARY_OP_TO_SPIRV_FLOAT_FUNC (atan2 , Atan2, 25 , 32 )
867
+ FLOAT_BINARY_OP_TO_SPIRV_FLOAT_FUNC (pow , Pow, 26 , 32 )
896
868
#undef FLOAT_BINARY_OP_TO_SPIRV_FLOAT_FUNC
897
869
898
870
#define BINARY_OP_TO_SPIRV_FUNC (op, S_inst, S_inst_id, U_inst, U_inst_id, \
0 commit comments