mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2024-11-21 16:46:41 -08:00
vkd3d-shader/hlsl: Do not allow NaNs in SM1.
Signed-off-by: Giovanni Mascellani <gmascellani@codeweavers.com> Signed-off-by: Zebediah Figura <zfigura@codeweavers.com> Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
eb2c3b0b90
commit
4d181bc622
@ -278,10 +278,10 @@ static bool fold_div(struct hlsl_ctx *ctx, struct hlsl_ir_constant *dst,
|
|||||||
"Floating point division by zero.");
|
"Floating point division by zero.");
|
||||||
}
|
}
|
||||||
dst->value[k].f = src1->value[k].f / src2->value[k].f;
|
dst->value[k].f = src1->value[k].f / src2->value[k].f;
|
||||||
if (ctx->profile->major_version < 4 && isinf(dst->value[k].f))
|
if (ctx->profile->major_version < 4 && !isfinite(dst->value[k].f))
|
||||||
{
|
{
|
||||||
hlsl_error(ctx, &dst->node.loc, VKD3D_SHADER_ERROR_HLSL_DIVISION_BY_ZERO,
|
hlsl_error(ctx, &dst->node.loc, VKD3D_SHADER_ERROR_HLSL_DIVISION_BY_ZERO,
|
||||||
"Infinities are not allowed by the shader model.");
|
"Infinities and NaNs are not allowed by the shader model.");
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user