wined3d: Recognize SM4 dcl_temps opcode.

Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Józef Kucia 2016-01-26 00:34:04 +01:00 committed by Alexandre Julliard
parent 97fb21c592
commit ee77e1789c
5 changed files with 10 additions and 2 deletions

View File

@ -5229,6 +5229,7 @@ static const SHADER_HANDLER shader_arb_instruction_handler_table[WINED3DSIH_TABL
/* WINED3DSIH_DCL_CONSTANT_BUFFER */ shader_hw_nop,
/* WINED3DSIH_DCL_INPUT_PRIMITIVE */ shader_hw_nop,
/* WINED3DSIH_DCL_OUTPUT_TOPOLOGY */ shader_hw_nop,
/* WINED3DSIH_DCL_TEMPS */ NULL,
/* WINED3DSIH_DCL_VERTICES_OUT */ shader_hw_nop,
/* WINED3DSIH_DEF */ shader_hw_nop,
/* WINED3DSIH_DEFB */ shader_hw_nop,

View File

@ -7975,6 +7975,7 @@ static const SHADER_HANDLER shader_glsl_instruction_handler_table[WINED3DSIH_TAB
/* WINED3DSIH_DCL_CONSTANT_BUFFER */ shader_glsl_nop,
/* WINED3DSIH_DCL_INPUT_PRIMITIVE */ shader_glsl_nop,
/* WINED3DSIH_DCL_OUTPUT_TOPOLOGY */ shader_glsl_nop,
/* WINED3DSIH_DCL_TEMPS */ shader_glsl_nop,
/* WINED3DSIH_DCL_VERTICES_OUT */ shader_glsl_nop,
/* WINED3DSIH_DEF */ shader_glsl_nop,
/* WINED3DSIH_DEFB */ shader_glsl_nop,

View File

@ -57,6 +57,7 @@ static const char * const shader_opcode_names[] =
/* WINED3DSIH_DCL_CONSTANT_BUFFER */ "dcl_constantBuffer",
/* WINED3DSIH_DCL_INPUT_PRIMITIVE */ "dcl_inputPrimitive",
/* WINED3DSIH_DCL_OUTPUT_TOPOLOGY */ "dcl_outputTopology",
/* WINED3DSIH_DCL_TEMPS */ "dcl_temps",
/* WINED3DSIH_DCL_VERTICES_OUT */ "dcl_maxOutputVertexCount",
/* WINED3DSIH_DEF */ "def",
/* WINED3DSIH_DEFB */ "defb",
@ -1816,7 +1817,8 @@ static void shader_trace_init(const struct wined3d_shader_frontend *fe, void *fe
TRACE("%s ", shader_opcode_names[ins.handler_idx]);
shader_dump_primitive_type(ins.declaration.primitive_type);
}
else if (ins.handler_idx == WINED3DSIH_DCL_VERTICES_OUT)
else if (ins.handler_idx == WINED3DSIH_DCL_TEMPS
|| ins.handler_idx == WINED3DSIH_DCL_VERTICES_OUT)
{
TRACE("%s %u", shader_opcode_names[ins.handler_idx], ins.declaration.count);
}

View File

@ -144,6 +144,7 @@ enum wined3d_sm4_opcode
WINED3D_SM4_OP_DCL_OUTPUT_TOPOLOGY = 0x5c,
WINED3D_SM4_OP_DCL_INPUT_PRIMITIVE = 0x5d,
WINED3D_SM4_OP_DCL_VERTICES_OUT = 0x5e,
WINED3D_SM4_OP_DCL_TEMPS = 0x68,
};
enum wined3d_sm4_register_type
@ -323,6 +324,7 @@ static const struct wined3d_sm4_opcode_info opcode_table[] =
{WINED3D_SM4_OP_DCL_OUTPUT_TOPOLOGY, WINED3DSIH_DCL_OUTPUT_TOPOLOGY, "", ""},
{WINED3D_SM4_OP_DCL_INPUT_PRIMITIVE, WINED3DSIH_DCL_INPUT_PRIMITIVE, "", ""},
{WINED3D_SM4_OP_DCL_VERTICES_OUT, WINED3DSIH_DCL_VERTICES_OUT, "", ""},
{WINED3D_SM4_OP_DCL_TEMPS, WINED3DSIH_DCL_TEMPS, "", ""},
};
static const enum wined3d_shader_register_type register_type_table[] =
@ -896,7 +898,8 @@ static void shader_sm4_read_instruction(void *data, const DWORD **ptr, struct wi
ins->declaration.primitive_type = input_primitive_type_table[primitive_type];
}
}
else if (opcode == WINED3D_SM4_OP_DCL_VERTICES_OUT)
else if (opcode == WINED3D_SM4_OP_DCL_VERTICES_OUT
|| opcode == WINED3D_SM4_OP_DCL_TEMPS)
{
ins->declaration.count = *p++;
}

View File

@ -474,6 +474,7 @@ enum WINED3D_SHADER_INSTRUCTION_HANDLER
WINED3DSIH_DCL_CONSTANT_BUFFER,
WINED3DSIH_DCL_INPUT_PRIMITIVE,
WINED3DSIH_DCL_OUTPUT_TOPOLOGY,
WINED3DSIH_DCL_TEMPS,
WINED3DSIH_DCL_VERTICES_OUT,
WINED3DSIH_DEF,
WINED3DSIH_DEFB,