mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2025-04-13 05:43:18 -07:00
vkd3d-shader/d3dbc: Adjust the token count for DEF and DEFI instructions in shader_sm1_skip_opcode().
This was broken by commit e390bc35e2c9b0a2110370f916033eea2366317e; that commit fixed the source count for these instructions, but didn't adjust shader_sm1_skip_opcode(). Note that this only affects shader model 1; later versions have a token count embedded in the initial opcode token.
This commit is contained in:
committed by
Alexandre Julliard
parent
e55b6a7fa1
commit
73c563ffb7
Notes:
Alexandre Julliard
2023-11-20 22:32:20 +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/479
@@ -855,6 +855,14 @@ static void shader_sm1_skip_opcode(const struct vkd3d_shader_sm1_parser *sm1, co
|
||||
{
|
||||
*ptr += 2;
|
||||
}
|
||||
/* Somewhat similarly, DEF and DEFI have a single source, but need to read
|
||||
* four tokens for that source. See shader_sm1_read_immconst().
|
||||
* Technically shader model 1 doesn't have integer registers or DEFI; we
|
||||
* handle it here anyway because it's easy. */
|
||||
else if (opcode_info->vkd3d_opcode == VKD3DSIH_DEF || opcode_info->vkd3d_opcode == VKD3DSIH_DEFI)
|
||||
{
|
||||
*ptr += 3;
|
||||
}
|
||||
|
||||
*ptr += (opcode_info->dst_count + opcode_info->src_count);
|
||||
}
|
||||
|
Reference in New Issue
Block a user