Zebediah Figura (@zfigura) commented about libs/vkd3d-shader/hlsl.y:
return !!add_binary_arithmetic_expr(ctx, params->instrs, HLSL_OP2_MIN, max, params->args[2], loc); }
+static bool intrinsic_clip(struct hlsl_ctx *ctx, + const struct parse_initializer *params, const struct vkd3d_shader_location *loc) +{ + struct hlsl_ir_node *arg, *zero, *bool_false, *or, *cmp, *load, *discard, *iff; + struct hlsl_block then_block; + unsigned int i, count; + + if (!elementwise_intrinsic_float_convert_args(ctx, params, loc)) + return false; + + arg = params->args[0]; + + if (ctx->profile->major_version >= 4)
The error may need to be specific to sm1, but I don't think we want to emit different IR. Rather, this should be a lowering pass, like everything else. -- https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/211#note_34006