From f71bd60bcdad75393b8bf4572b09af53e787489b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B3zef=20Kucia?= Date: Tue, 2 Feb 2016 11:32:32 +0100 Subject: [PATCH] wined3d: Recognize SM4 dcl_output_siv opcode. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Józef Kucia Signed-off-by: Henri Verbeet Signed-off-by: Alexandre Julliard --- dlls/wined3d/arb_program_shader.c | 1 + dlls/wined3d/glsl_shader.c | 1 + dlls/wined3d/shader.c | 4 +++- dlls/wined3d/shader_sm4.c | 5 ++++- dlls/wined3d/wined3d_private.h | 1 + 5 files changed, 10 insertions(+), 2 deletions(-) diff --git a/dlls/wined3d/arb_program_shader.c b/dlls/wined3d/arb_program_shader.c index 2be7c88608c..6b350428b10 100644 --- a/dlls/wined3d/arb_program_shader.c +++ b/dlls/wined3d/arb_program_shader.c @@ -5235,6 +5235,7 @@ static const SHADER_HANDLER shader_arb_instruction_handler_table[WINED3DSIH_TABL /* WINED3DSIH_DCL_INPUT_PS_SIV */ NULL, /* WINED3DSIH_DCL_INPUT_SGV */ NULL, /* WINED3DSIH_DCL_OUTPUT */ NULL, + /* WINED3DSIH_DCL_OUTPUT_SIV */ NULL, /* WINED3DSIH_DCL_OUTPUT_TOPOLOGY */ shader_hw_nop, /* WINED3DSIH_DCL_SAMPLER */ NULL, /* WINED3DSIH_DCL_TEMPS */ NULL, diff --git a/dlls/wined3d/glsl_shader.c b/dlls/wined3d/glsl_shader.c index 5220a22503d..926c1e33a41 100644 --- a/dlls/wined3d/glsl_shader.c +++ b/dlls/wined3d/glsl_shader.c @@ -8023,6 +8023,7 @@ static const SHADER_HANDLER shader_glsl_instruction_handler_table[WINED3DSIH_TAB /* WINED3DSIH_DCL_INPUT_PS_SIV */ NULL, /* WINED3DSIH_DCL_INPUT_SGV */ shader_glsl_nop, /* WINED3DSIH_DCL_OUTPUT */ shader_glsl_nop, + /* WINED3DSIH_DCL_OUTPUT_SIV */ shader_glsl_nop, /* WINED3DSIH_DCL_OUTPUT_TOPOLOGY */ shader_glsl_nop, /* WINED3DSIH_DCL_SAMPLER */ NULL, /* WINED3DSIH_DCL_TEMPS */ shader_glsl_nop, diff --git a/dlls/wined3d/shader.c b/dlls/wined3d/shader.c index 8f36fc696f2..6315bf54eb1 100644 --- a/dlls/wined3d/shader.c +++ b/dlls/wined3d/shader.c @@ -63,6 +63,7 @@ static const char * const shader_opcode_names[] = /* WINED3DSIH_DCL_INPUT_PS_SIV */ "dcl_input_ps_siv", /* WINED3DSIH_DCL_INPUT_SGV */ "dcl_input_sgv", /* WINED3DSIH_DCL_OUTPUT */ "dcl_output", + /* WINED3DSIH_DCL_OUTPUT_SIV */ "dcl_output_siv", /* WINED3DSIH_DCL_OUTPUT_TOPOLOGY */ "dcl_outputTopology", /* WINED3DSIH_DCL_SAMPLER */ "dcl_sampler", /* WINED3DSIH_DCL_TEMPS */ "dcl_temps", @@ -1918,7 +1919,8 @@ static void shader_trace_init(const struct wined3d_shader_frontend *fe, void *fe shader_dump_dst_param(&ins.declaration.dst, &shader_version); } else if (ins.handler_idx == WINED3DSIH_DCL_INPUT_PS_SGV - || ins.handler_idx == WINED3DSIH_DCL_INPUT_SGV) + || ins.handler_idx == WINED3DSIH_DCL_INPUT_SGV + || ins.handler_idx == WINED3DSIH_DCL_OUTPUT_SIV) { TRACE("%s ", shader_opcode_names[ins.handler_idx]); shader_dump_dst_param(&ins.declaration.register_semantic.reg, &shader_version); diff --git a/dlls/wined3d/shader_sm4.c b/dlls/wined3d/shader_sm4.c index 5b50889b108..11c0494b7e1 100644 --- a/dlls/wined3d/shader_sm4.c +++ b/dlls/wined3d/shader_sm4.c @@ -167,6 +167,7 @@ enum wined3d_sm4_opcode 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_OUTPUT_SIV = 0x67, WINED3D_SM4_OP_DCL_TEMPS = 0x68, }; @@ -375,6 +376,7 @@ static const struct wined3d_sm4_opcode_info opcode_table[] = {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_OUTPUT_SIV, WINED3DSIH_DCL_OUTPUT_SIV, "", ""}, {WINED3D_SM4_OP_DCL_TEMPS, WINED3DSIH_DCL_TEMPS, "", ""}, }; @@ -992,7 +994,8 @@ 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.dst); } else if (opcode == WINED3D_SM4_OP_DCL_INPUT_PS_SGV - || opcode == WINED3D_SM4_OP_DCL_INPUT_SGV) + || opcode == WINED3D_SM4_OP_DCL_INPUT_SGV + || opcode == WINED3D_SM4_OP_DCL_OUTPUT_SIV) { shader_sm4_read_dst_param(priv, &p, WINED3D_DATA_FLOAT, &ins->declaration.register_semantic.reg); ins->declaration.register_semantic.sysval_semantic = *p++; diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h index 73b4d1412b1..624a0e955e3 100644 --- a/dlls/wined3d/wined3d_private.h +++ b/dlls/wined3d/wined3d_private.h @@ -507,6 +507,7 @@ enum WINED3D_SHADER_INSTRUCTION_HANDLER WINED3DSIH_DCL_INPUT_PS_SIV, WINED3DSIH_DCL_INPUT_SGV, WINED3DSIH_DCL_OUTPUT, + WINED3DSIH_DCL_OUTPUT_SIV, WINED3DSIH_DCL_OUTPUT_TOPOLOGY, WINED3DSIH_DCL_SAMPLER, WINED3DSIH_DCL_TEMPS,