wined3d: Recognize SM4 dcl_input_ps_siv 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-02-02 11:32:30 +01:00 committed by Alexandre Julliard
parent e02f6ebf91
commit 2001412546
5 changed files with 21 additions and 0 deletions

View File

@ -5232,6 +5232,7 @@ static const SHADER_HANDLER shader_arb_instruction_handler_table[WINED3DSIH_TABL
/* WINED3DSIH_DCL_INPUT_PRIMITIVE */ shader_hw_nop,
/* WINED3DSIH_DCL_INPUT_PS */ NULL,
/* WINED3DSIH_DCL_INPUT_PS_SGV */ NULL,
/* WINED3DSIH_DCL_INPUT_PS_SIV */ NULL,
/* WINED3DSIH_DCL_OUTPUT */ NULL,
/* WINED3DSIH_DCL_OUTPUT_TOPOLOGY */ shader_hw_nop,
/* WINED3DSIH_DCL_SAMPLER */ NULL,

View File

@ -8020,6 +8020,7 @@ static const SHADER_HANDLER shader_glsl_instruction_handler_table[WINED3DSIH_TAB
/* WINED3DSIH_DCL_INPUT_PRIMITIVE */ shader_glsl_nop,
/* WINED3DSIH_DCL_INPUT_PS */ NULL,
/* WINED3DSIH_DCL_INPUT_PS_SGV */ NULL,
/* WINED3DSIH_DCL_INPUT_PS_SIV */ NULL,
/* WINED3DSIH_DCL_OUTPUT */ shader_glsl_nop,
/* WINED3DSIH_DCL_OUTPUT_TOPOLOGY */ shader_glsl_nop,
/* WINED3DSIH_DCL_SAMPLER */ NULL,

View File

@ -60,6 +60,7 @@ static const char * const shader_opcode_names[] =
/* WINED3DSIH_DCL_INPUT_PRIMITIVE */ "dcl_inputPrimitive",
/* WINED3DSIH_DCL_INPUT_PS */ "dcl_input_ps",
/* WINED3DSIH_DCL_INPUT_PS_SGV */ "dcl_input_ps_sgv",
/* WINED3DSIH_DCL_INPUT_PS_SIV */ "dcl_input_ps_siv",
/* WINED3DSIH_DCL_OUTPUT */ "dcl_output",
/* WINED3DSIH_DCL_OUTPUT_TOPOLOGY */ "dcl_outputTopology",
/* WINED3DSIH_DCL_SAMPLER */ "dcl_sampler",
@ -1922,6 +1923,15 @@ static void shader_trace_init(const struct wined3d_shader_frontend *fe, void *fe
TRACE(", ");
shader_dump_sysval_semantic(ins.declaration.register_semantic.sysval_semantic);
}
else if (ins.handler_idx == WINED3DSIH_DCL_INPUT_PS_SIV)
{
TRACE("%s ", shader_opcode_names[ins.handler_idx]);
shader_dump_interpolation_mode(ins.flags);
TRACE(" ");
shader_dump_dst_param(&ins.declaration.register_semantic.reg, &shader_version);
TRACE(", ");
shader_dump_sysval_semantic(ins.declaration.register_semantic.sysval_semantic);
}
else if (ins.handler_idx == WINED3DSIH_DCL_INPUT
|| ins.handler_idx == WINED3DSIH_DCL_OUTPUT)
{

View File

@ -164,6 +164,7 @@ enum wined3d_sm4_opcode
WINED3D_SM4_OP_DCL_INPUT = 0x5f,
WINED3D_SM4_OP_DCL_INPUT_PS = 0x62,
WINED3D_SM4_OP_DCL_INPUT_PS_SGV = 0x63,
WINED3D_SM4_OP_DCL_INPUT_PS_SIV = 0x64,
WINED3D_SM4_OP_DCL_OUTPUT = 0x65,
WINED3D_SM4_OP_DCL_TEMPS = 0x68,
};
@ -370,6 +371,7 @@ static const struct wined3d_sm4_opcode_info opcode_table[] =
{WINED3D_SM4_OP_DCL_INPUT, WINED3DSIH_DCL_INPUT, "", ""},
{WINED3D_SM4_OP_DCL_INPUT_PS, WINED3DSIH_DCL_INPUT_PS, "", ""},
{WINED3D_SM4_OP_DCL_INPUT_PS_SGV, WINED3DSIH_DCL_INPUT_PS_SGV, "", ""},
{WINED3D_SM4_OP_DCL_INPUT_PS_SIV, WINED3DSIH_DCL_INPUT_PS_SIV, "", ""},
{WINED3D_SM4_OP_DCL_OUTPUT, WINED3DSIH_DCL_OUTPUT, "", ""},
{WINED3D_SM4_OP_DCL_TEMPS, WINED3DSIH_DCL_TEMPS, "", ""},
};
@ -992,6 +994,12 @@ static void shader_sm4_read_instruction(void *data, const DWORD **ptr, struct wi
shader_sm4_read_dst_param(priv, &p, WINED3D_DATA_FLOAT, &ins->declaration.register_semantic.reg);
ins->declaration.register_semantic.sysval_semantic = *p++;
}
else if (opcode == WINED3D_SM4_OP_DCL_INPUT_PS_SIV)
{
ins->flags = (opcode_token & WINED3D_SM4_INTERPOLATION_MODE_MASK) >> WINED3D_SM4_INTERPOLATION_MODE_SHIFT;
shader_sm4_read_dst_param(priv, &p, WINED3D_DATA_FLOAT, &ins->declaration.register_semantic.reg);
ins->declaration.register_semantic.sysval_semantic = *p++;
}
else if (opcode == WINED3D_SM4_OP_DCL_INPUT
|| opcode == WINED3D_SM4_OP_DCL_OUTPUT)
{

View File

@ -504,6 +504,7 @@ enum WINED3D_SHADER_INSTRUCTION_HANDLER
WINED3DSIH_DCL_INPUT_PRIMITIVE,
WINED3DSIH_DCL_INPUT_PS,
WINED3DSIH_DCL_INPUT_PS_SGV,
WINED3DSIH_DCL_INPUT_PS_SIV,
WINED3DSIH_DCL_OUTPUT,
WINED3DSIH_DCL_OUTPUT_TOPOLOGY,
WINED3DSIH_DCL_SAMPLER,