vkd3d-shader: Introduce an instruction flag to suppress masking of bitwise shift counts.

DXIL does not use implicit masking of shift counts.
This commit is contained in:
Conor McCarthy
2023-11-22 23:58:44 +10:00
committed by Alexandre Julliard
parent 9cb4372378
commit 1929432559
Notes: Alexandre Julliard 2023-12-12 23:15:46 +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/489
4 changed files with 15 additions and 2 deletions

View File

@@ -3279,6 +3279,12 @@ static void sm6_parser_emit_binop(struct sm6_parser *sm6, const struct dxil_reco
}
else
{
if (handler_idx == VKD3DSIH_ISHL || handler_idx == VKD3DSIH_ISHR || handler_idx == VKD3DSIH_USHR)
{
/* DXC emits AND instructions where necessary to mask shift counts. Shift binops
* do not imply masking the shift as the TPF equivalents do. */
ins->flags |= VKD3DSI_SHIFT_UNMASKED;
}
instruction_dst_param_init_ssa_scalar(ins, sm6);
}
}