Francisco Casas (@fcasas) commented about libs/vkd3d-shader/hlsl_constant_ops.c:
return true;
}
+static bool fold_dp2add(struct hlsl_ctx *ctx, struct hlsl_constant_value *dst, const struct hlsl_type *dst_type,
const struct hlsl_ir_constant *src1, const struct hlsl_ir_constant *src2, const struct hlsl_ir_constant *src3)
+{
- enum hlsl_base_type type = dst_type->base_type;
- unsigned int k;
- assert(type == src1->node.data_type->base_type);
- assert(type == src2->node.data_type->base_type);
- assert(type == src3->node.data_type->base_type);
- assert(src1->node.data_type->dimx == src2->node.data_type->dimx);
- assert(type == HLSL_TYPE_FLOAT || type == HLSL_TYPE_HALF);
perhaps we should also assert that `src3->node.data_type->dimx == 1`.