mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2025-09-12 18:50:22 -07:00
vkd3d-shader/dxil: Validate that floating-point truncation casts decrease bit width.
Similarly to the integer case.
This commit is contained in:
committed by
Henri Verbeet
parent
0e006715d8
commit
a90b74baaa
Notes:
Henri Verbeet
2025-06-04 13:14:04 +02:00
Approved-by: Henri Verbeet (@hverbeet) Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/1532
@@ -6877,7 +6877,7 @@ static enum vkd3d_shader_opcode sm6_map_cast_op(uint64_t code, const struct sm6_
|
|||||||
case CAST_FPTRUNC:
|
case CAST_FPTRUNC:
|
||||||
/* TODO: native 16-bit */
|
/* TODO: native 16-bit */
|
||||||
op = (from->u.width == 64) ? VKD3DSIH_DTOF : VKD3DSIH_NOP;
|
op = (from->u.width == 64) ? VKD3DSIH_DTOF : VKD3DSIH_NOP;
|
||||||
is_valid = from_fp && to_fp;
|
is_valid = from_fp && to_fp && to->u.width <= from->u.width;
|
||||||
break;
|
break;
|
||||||
case CAST_FPEXT:
|
case CAST_FPEXT:
|
||||||
/* TODO: native 16-bit */
|
/* TODO: native 16-bit */
|
||||||
|
Reference in New Issue
Block a user