wined3d: Recognize SM4 dcl_input_sgv opcode.
authorJózef Kucia <jkucia@codeweavers.com>
Tue, 2 Feb 2016 10:32:31 +0000 (11:32 +0100)
committerAlexandre Julliard <julliard@winehq.org>
Tue, 2 Feb 2016 12:47:57 +0000 (21:47 +0900)
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
dlls/wined3d/glsl_shader.c
dlls/wined3d/shader.c
dlls/wined3d/shader_sm4.c
dlls/wined3d/wined3d_private.h

index aef1bc5e6229c98818994b625bbc0ef849c62f97..2be7c88608cbcbae26917f5fe6747964fec02a21 100644 (file)
@@ -5233,6 +5233,7 @@ static const SHADER_HANDLER shader_arb_instruction_handler_table[WINED3DSIH_TABL
     /* WINED3DSIH_DCL_INPUT_PS                  */ NULL,
     /* WINED3DSIH_DCL_INPUT_PS_SGV              */ NULL,
     /* WINED3DSIH_DCL_INPUT_PS_SIV              */ NULL,
+    /* WINED3DSIH_DCL_INPUT_SGV                 */ NULL,
     /* WINED3DSIH_DCL_OUTPUT                    */ NULL,
     /* WINED3DSIH_DCL_OUTPUT_TOPOLOGY           */ shader_hw_nop,
     /* WINED3DSIH_DCL_SAMPLER                   */ NULL,
index 3efac8208c4fdd85fac360eb2cebfedd75fb9ae7..5220a22503d20773c154b70b5418e9557f8be744 100644 (file)
@@ -8021,6 +8021,7 @@ static const SHADER_HANDLER shader_glsl_instruction_handler_table[WINED3DSIH_TAB
     /* WINED3DSIH_DCL_INPUT_PS                  */ NULL,
     /* WINED3DSIH_DCL_INPUT_PS_SGV              */ NULL,
     /* WINED3DSIH_DCL_INPUT_PS_SIV              */ NULL,
+    /* WINED3DSIH_DCL_INPUT_SGV                 */ shader_glsl_nop,
     /* WINED3DSIH_DCL_OUTPUT                    */ shader_glsl_nop,
     /* WINED3DSIH_DCL_OUTPUT_TOPOLOGY           */ shader_glsl_nop,
     /* WINED3DSIH_DCL_SAMPLER                   */ NULL,
index 4c570a4e8c4146cc3b3d6ec5a2aeea8faad0a5df..8f36fc696f272a3b0a99eb7e5097c6d5f4957674 100644 (file)
@@ -61,6 +61,7 @@ static const char * const shader_opcode_names[] =
     /* 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_INPUT_SGV                 */ "dcl_input_sgv",
     /* WINED3DSIH_DCL_OUTPUT                    */ "dcl_output",
     /* WINED3DSIH_DCL_OUTPUT_TOPOLOGY           */ "dcl_outputTopology",
     /* WINED3DSIH_DCL_SAMPLER                   */ "dcl_sampler",
@@ -1916,7 +1917,8 @@ static void shader_trace_init(const struct wined3d_shader_frontend *fe, void *fe
             TRACE(" ");
             shader_dump_dst_param(&ins.declaration.dst, &shader_version);
         }
-        else if (ins.handler_idx == WINED3DSIH_DCL_INPUT_PS_SGV)
+        else if (ins.handler_idx == WINED3DSIH_DCL_INPUT_PS_SGV
+                || ins.handler_idx == WINED3DSIH_DCL_INPUT_SGV)
         {
             TRACE("%s ", shader_opcode_names[ins.handler_idx]);
             shader_dump_dst_param(&ins.declaration.register_semantic.reg, &shader_version);
index 6d3acaeeff4504e34118381b4a050add3bae7082..5b50889b108595fa45736e98f9274101acf50d94 100644 (file)
@@ -162,6 +162,7 @@ enum wined3d_sm4_opcode
     WINED3D_SM4_OP_DCL_INPUT_PRIMITIVE  = 0x5d,
     WINED3D_SM4_OP_DCL_VERTICES_OUT     = 0x5e,
     WINED3D_SM4_OP_DCL_INPUT            = 0x5f,
+    WINED3D_SM4_OP_DCL_INPUT_SGV        = 0x60,
     WINED3D_SM4_OP_DCL_INPUT_PS         = 0x62,
     WINED3D_SM4_OP_DCL_INPUT_PS_SGV     = 0x63,
     WINED3D_SM4_OP_DCL_INPUT_PS_SIV     = 0x64,
@@ -369,6 +370,7 @@ static const struct wined3d_sm4_opcode_info opcode_table[] =
     {WINED3D_SM4_OP_DCL_INPUT_PRIMITIVE,    WINED3DSIH_DCL_INPUT_PRIMITIVE,           "",     ""},
     {WINED3D_SM4_OP_DCL_VERTICES_OUT,       WINED3DSIH_DCL_VERTICES_OUT,              "",     ""},
     {WINED3D_SM4_OP_DCL_INPUT,              WINED3DSIH_DCL_INPUT,                     "",     ""},
+    {WINED3D_SM4_OP_DCL_INPUT_SGV,          WINED3DSIH_DCL_INPUT_SGV,                 "",     ""},
     {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,              "",     ""},
@@ -989,7 +991,8 @@ static void shader_sm4_read_instruction(void *data, const DWORD **ptr, struct wi
         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.dst);
     }
-    else if (opcode == WINED3D_SM4_OP_DCL_INPUT_PS_SGV)
+    else if (opcode == WINED3D_SM4_OP_DCL_INPUT_PS_SGV
+            || opcode == WINED3D_SM4_OP_DCL_INPUT_SGV)
     {
         shader_sm4_read_dst_param(priv, &p, WINED3D_DATA_FLOAT, &ins->declaration.register_semantic.reg);
         ins->declaration.register_semantic.sysval_semantic = *p++;
index 3997aaa330d58996602079372a96eb4c90370b4c..73b4d1412b1f5d3aec193bc20355d6e49785513e 100644 (file)
@@ -505,6 +505,7 @@ enum WINED3D_SHADER_INSTRUCTION_HANDLER
     WINED3DSIH_DCL_INPUT_PS,
     WINED3DSIH_DCL_INPUT_PS_SGV,
     WINED3DSIH_DCL_INPUT_PS_SIV,
+    WINED3DSIH_DCL_INPUT_SGV,
     WINED3DSIH_DCL_OUTPUT,
     WINED3DSIH_DCL_OUTPUT_TOPOLOGY,
     WINED3DSIH_DCL_SAMPLER,