mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2025-09-12 18:50:22 -07:00
vkd3d-shader/dxil: Generate specialized values in sm6_parser_emit_cast() for trivial casts.
There is currently no need to make a special case for 16-bit values, since the SPIR-V backend currently confuses them with 32-bit values. The generated VSIR code is not correct, but that will have to be handled at a different level.
This commit is contained in:
committed by
Henri Verbeet
parent
5e6def0843
commit
af5e5fe31b
Notes:
Henri Verbeet
2025-06-05 16:19:21 +02:00
Approved-by: Henri Verbeet (@hverbeet) Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/1539
@@ -6949,10 +6949,9 @@ static void sm6_parser_emit_cast(struct sm6_parser *sm6, const struct dxil_recor
|
||||
|
||||
if (handler_idx == VKD3DSIH_NOP)
|
||||
{
|
||||
sm6_register_from_value(&dst->reg, value, sm6);
|
||||
/* Set the result type for casts from 16-bit min precision. */
|
||||
if (type->u.width != 16)
|
||||
dst->reg.data_type = vkd3d_data_type_from_sm6_type(type);
|
||||
*dst = *value;
|
||||
dst->type = type;
|
||||
sm6_register_from_value(&dst->reg, dst, sm6);
|
||||
return;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user