wined3d: Don't read modifiers for opcodes with "read_opcode_func" set (AFL).
Otherwise "len" would be inconsistent with "p". This assumes opcodes with "read_opcode_func" either don't have modifiers or handle them themselves. Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
a9e5a02a20
commit
11fb78d9bd
|
@ -1570,10 +1570,6 @@ static void shader_sm4_read_instruction(void *data, const DWORD **ptr, struct wi
|
|||
p = *ptr;
|
||||
*ptr += len;
|
||||
|
||||
previous_token = opcode_token;
|
||||
while (previous_token & WINED3D_SM4_INSTRUCTION_MODIFIER)
|
||||
shader_sm4_read_instruction_modifier(previous_token = *p++, ins);
|
||||
|
||||
if (opcode_info->read_opcode_func)
|
||||
{
|
||||
opcode_info->read_opcode_func(ins, opcode, opcode_token, p, len, priv);
|
||||
|
@ -1582,6 +1578,10 @@ static void shader_sm4_read_instruction(void *data, const DWORD **ptr, struct wi
|
|||
{
|
||||
enum wined3d_shader_dst_modifier instruction_dst_modifier = WINED3DSPDM_NONE;
|
||||
|
||||
previous_token = opcode_token;
|
||||
while (previous_token & WINED3D_SM4_INSTRUCTION_MODIFIER && p != *ptr)
|
||||
shader_sm4_read_instruction_modifier(previous_token = *p++, ins);
|
||||
|
||||
ins->flags = (opcode_token & WINED3D_SM4_INSTRUCTION_FLAGS_MASK) >> WINED3D_SM4_INSTRUCTION_FLAGS_SHIFT;
|
||||
|
||||
if (ins->flags & WINED3D_SM4_INSTRUCTION_FLAG_SATURATE)
|
||||
|
|
Loading…
Reference in New Issue