From b9ce8284512bdb8474585b59d013170d2f910663 Mon Sep 17 00:00:00 2001 From: Giovanni Mascellani Date: Mon, 12 May 2025 15:21:25 +0200 Subject: [PATCH] vkd3d-shader/dxil: Validate that floating-point extension casts increase bit width. --- libs/vkd3d-shader/dxil.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libs/vkd3d-shader/dxil.c b/libs/vkd3d-shader/dxil.c index eda03ab71..267e6d951 100644 --- a/libs/vkd3d-shader/dxil.c +++ b/libs/vkd3d-shader/dxil.c @@ -6886,7 +6886,7 @@ static enum vkd3d_shader_opcode sm6_map_cast_op(uint64_t code, const struct sm6_ case CAST_FPEXT: /* TODO: native 16-bit */ op = (to->u.width == 64) ? VKD3DSIH_FTOD : VKD3DSIH_NOP; - is_valid = from_fp && to_fp; + is_valid = from_fp && to_fp && to->u.width >= from->u.width; break; case CAST_BITCAST: op = VKD3DSIH_MOV;