vkd3d-shader/dxil: Set the result register data type for nop casts.

Casts from minimum precision types are emitted as nop, but the result
value type must be set to the cast result type.
This commit is contained in:
Conor McCarthy 2023-11-29 14:38:50 +10:00 committed by Alexandre Julliard
parent 1630fd9a3c
commit a4a1b4c557
Notes: Alexandre Julliard 2023-12-07 22:47:44 +01:00
Approved-by: Giovanni Mascellani (@giomasce)
Approved-by: Henri Verbeet (@hverbeet)
Approved-by: Alexandre Julliard (@julliard)
Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/501

View File

@ -3885,6 +3885,9 @@ static void sm6_parser_emit_cast(struct sm6_parser *sm6, const struct dxil_recor
if (handler_idx == VKD3DSIH_NOP)
{
dst->u.reg = value->u.reg;
/* Set the result type for casts from 16-bit min precision. */
if (type->u.width != 16)
dst->u.reg.data_type = vkd3d_data_type_from_sm6_type(type);
return;
}