vkd3d-shader/hlsl: Use intrinsic_float_convert_arg() in write_acos_or_asin().

This commit is contained in:
Elizabeth Figura 2024-09-04 22:14:20 -05:00 committed by Henri Verbeet
parent e61046fb23
commit 9260078300
Notes: Henri Verbeet 2024-09-12 18:57:51 +02:00
Approved-by: Giovanni Mascellani (@giomasce)
Approved-by: Henri Verbeet (@hverbeet)
Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/1064

View File

@ -3156,6 +3156,7 @@ static bool write_acos_or_asin(struct hlsl_ctx *ctx,
const struct parse_initializer *params, const struct vkd3d_shader_location *loc, bool asin_mode)
{
struct hlsl_ir_function_decl *func;
struct hlsl_ir_node *arg;
struct hlsl_type *type;
char *body;
@ -3179,8 +3180,9 @@ static bool write_acos_or_asin(struct hlsl_ctx *ctx,
const char *fn_name = asin_mode ? fn_name_asin : fn_name_acos;
type = params->args[0]->data_type;
type = hlsl_get_numeric_type(ctx, type->class, HLSL_TYPE_FLOAT, type->dimx, type->dimy);
if (!(arg = intrinsic_float_convert_arg(ctx, params, params->args[0], loc)))
return false;
type = arg->data_type;
if (!(body = hlsl_sprintf_alloc(ctx, template,
type->name, fn_name, type->name,