Module: wine Branch: master Commit: 200141254659b87f5a412631cdce8aa5101d55df URL: http://source.winehq.org/git/wine.git/?a=commit;h=200141254659b87f5a412631cd...
Author: Józef Kucia jkucia@codeweavers.com Date: Tue Feb 2 11:32:30 2016 +0100
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
---
dlls/wined3d/arb_program_shader.c | 1 + dlls/wined3d/glsl_shader.c | 1 + dlls/wined3d/shader.c | 10 ++++++++++ dlls/wined3d/shader_sm4.c | 8 ++++++++ dlls/wined3d/wined3d_private.h | 1 + 5 files changed, 21 insertions(+)
diff --git a/dlls/wined3d/arb_program_shader.c b/dlls/wined3d/arb_program_shader.c index 1e93c5d..aef1bc5 100644 --- a/dlls/wined3d/arb_program_shader.c +++ b/dlls/wined3d/arb_program_shader.c @@ -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, diff --git a/dlls/wined3d/glsl_shader.c b/dlls/wined3d/glsl_shader.c index c4382d4..3efac82 100644 --- a/dlls/wined3d/glsl_shader.c +++ b/dlls/wined3d/glsl_shader.c @@ -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, diff --git a/dlls/wined3d/shader.c b/dlls/wined3d/shader.c index 0a40750..4c570a4 100644 --- a/dlls/wined3d/shader.c +++ b/dlls/wined3d/shader.c @@ -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) { diff --git a/dlls/wined3d/shader_sm4.c b/dlls/wined3d/shader_sm4.c index 3581fcc..6d3acae 100644 --- a/dlls/wined3d/shader_sm4.c +++ b/dlls/wined3d/shader_sm4.c @@ -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) { diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h index 2f0aaa3..3997aaa 100644 --- a/dlls/wined3d/wined3d_private.h +++ b/dlls/wined3d/wined3d_private.h @@ -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,