From 1aa857735fde95ea2ff4aa1daf44b203f48c7116 Mon Sep 17 00:00:00 2001 From: Elizabeth Figura Date: Wed, 4 Sep 2024 22:48:45 -0500 Subject: [PATCH] vkd3d-shader/hlsl: Preserve doubles in intrinsic_determinant(). --- libs/vkd3d-shader/hlsl.y | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/libs/vkd3d-shader/hlsl.y b/libs/vkd3d-shader/hlsl.y index c5eb1396..60e196c6 100644 --- a/libs/vkd3d-shader/hlsl.y +++ b/libs/vkd3d-shader/hlsl.y @@ -3735,15 +3735,14 @@ static bool intrinsic_determinant(struct hlsl_ctx *ctx, return false; } + if (!(arg = intrinsic_float_convert_arg(ctx, params, arg, loc))) + return false; + dim = min(type->dimx, type->dimy); if (dim == 1) - { - if (!(arg = intrinsic_float_convert_arg(ctx, params, arg, loc))) - return false; return hlsl_add_load_component(ctx, params->instrs, arg, 0, loc); - } - typename = type->e.numeric.type == HLSL_TYPE_HALF ? "half" : "float"; + typename = hlsl_get_scalar_type(ctx, arg->data_type->e.numeric.type)->name; template = templates[dim]; switch (dim)