From: Nikolay Sivov nsivov@codeweavers.com
--- libs/vkd3d-shader/hlsl.y | 2 ++ 1 file changed, 2 insertions(+)
diff --git a/libs/vkd3d-shader/hlsl.y b/libs/vkd3d-shader/hlsl.y index 5e0d48d3c..869277f0a 100644 --- a/libs/vkd3d-shader/hlsl.y +++ b/libs/vkd3d-shader/hlsl.y @@ -3155,6 +3155,7 @@ static bool intrinsic_log(struct hlsl_ctx *ctx, /* ln(2) */ if (!(coeff = hlsl_new_float_constant(ctx, 0.69314718055f, loc))) return false; + hlsl_block_add_instr(params->instrs, coeff);
return !!add_binary_arithmetic_expr(ctx, params->instrs, HLSL_OP2_MUL, log, coeff, loc); } @@ -3173,6 +3174,7 @@ static bool intrinsic_log10(struct hlsl_ctx *ctx, /* 1 / log2(10) */ if (!(coeff = hlsl_new_float_constant(ctx, 0.301029996f, loc))) return false; + hlsl_block_add_instr(params->instrs, coeff);
return !!add_binary_arithmetic_expr(ctx, params->instrs, HLSL_OP2_MUL, log, coeff, loc); }
This merge request was approved by Francisco Casas.
This merge request was approved by Giovanni Mascellani.
This merge request was approved by Zebediah Figura.
For reference, we do want this for 1.10. This fixes a memory error introduced by a1bd4e080ef5bd0b1bfb073558fb715e9ad54058 and 210caa931db664e2c9fdcff217581fd4bf421e9c.
This merge request was approved by Henri Verbeet.