Commit 11fb78d9 authored by Henri Verbeet's avatar Henri Verbeet Committed by Alexandre Julliard

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: 's avatarHenri Verbeet <hverbeet@codeweavers.com> Signed-off-by: 's avatarAlexandre Julliard <julliard@winehq.org>
parent a9e5a02a
......@@ -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)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment