Francisco Casas (@fcasas) commented about libs/vkd3d-shader/hlsl.y:
return !!add_unary_arithmetic_expr(ctx, params->instrs, HLSL_OP1_DSY_COARSE, arg, loc);
}
+static bool intrinsic_degrees(struct hlsl_ctx *ctx,
const struct parse_initializer *params, const struct vkd3d_shader_location *loc)
+{
- struct hlsl_ir_node *arg, *deg;
- if (!(arg = intrinsic_float_convert_arg(ctx, params, params->args[0], loc)))
return false;
- /* 1 rad = 180/pi degree = 57.2957795 degree */
- if (!(deg = hlsl_new_float_constant(ctx, 57.2957795, loc)))
Same for this new float constant.