Module: wine Branch: master Commit: 0de89fd1bfe424fe4de206eb0f3919f6dc04ff47 URL: http://source.winehq.org/git/wine.git/?a=commit;h=0de89fd1bfe424fe4de206eb0f...
Author: Józef Kucia jkucia@codeweavers.com Date: Tue Feb 2 11:32:28 2016 +0100
wined3d: Recognize SM4 dcl_input 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 | 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 825a771..9999a6c 100644 --- a/dlls/wined3d/arb_program_shader.c +++ b/dlls/wined3d/arb_program_shader.c @@ -5228,6 +5228,7 @@ static const SHADER_HANDLER shader_arb_instruction_handler_table[WINED3DSIH_TABL /* WINED3DSIH_DCL */ shader_hw_nop, /* WINED3DSIH_DCL_CONSTANT_BUFFER */ shader_hw_nop, /* WINED3DSIH_DCL_IMMEDIATE_CONSTANT_BUFFER */ NULL, + /* WINED3DSIH_DCL_INPUT */ NULL, /* WINED3DSIH_DCL_INPUT_PRIMITIVE */ shader_hw_nop, /* WINED3DSIH_DCL_INPUT_PS */ NULL, /* WINED3DSIH_DCL_OUTPUT */ NULL, diff --git a/dlls/wined3d/glsl_shader.c b/dlls/wined3d/glsl_shader.c index e679ae5..b3952f9 100644 --- a/dlls/wined3d/glsl_shader.c +++ b/dlls/wined3d/glsl_shader.c @@ -8016,6 +8016,7 @@ static const SHADER_HANDLER shader_glsl_instruction_handler_table[WINED3DSIH_TAB /* WINED3DSIH_DCL */ shader_glsl_nop, /* WINED3DSIH_DCL_CONSTANT_BUFFER */ shader_glsl_nop, /* WINED3DSIH_DCL_IMMEDIATE_CONSTANT_BUFFER */ NULL, + /* WINED3DSIH_DCL_INPUT */ shader_glsl_nop, /* WINED3DSIH_DCL_INPUT_PRIMITIVE */ shader_glsl_nop, /* WINED3DSIH_DCL_INPUT_PS */ NULL, /* WINED3DSIH_DCL_OUTPUT */ shader_glsl_nop, diff --git a/dlls/wined3d/shader.c b/dlls/wined3d/shader.c index cab6335..867ca96 100644 --- a/dlls/wined3d/shader.c +++ b/dlls/wined3d/shader.c @@ -56,6 +56,7 @@ static const char * const shader_opcode_names[] = /* WINED3DSIH_DCL */ "dcl", /* WINED3DSIH_DCL_CONSTANT_BUFFER */ "dcl_constantBuffer", /* WINED3DSIH_DCL_IMMEDIATE_CONSTANT_BUFFER */ "dcl_immediateConstantBuffer", + /* WINED3DSIH_DCL_INPUT */ "dcl_input", /* WINED3DSIH_DCL_INPUT_PRIMITIVE */ "dcl_inputPrimitive", /* WINED3DSIH_DCL_INPUT_PS */ "dcl_input_ps", /* WINED3DSIH_DCL_OUTPUT */ "dcl_output", @@ -1883,7 +1884,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_OUTPUT) + else if (ins.handler_idx == WINED3DSIH_DCL_INPUT + || ins.handler_idx == WINED3DSIH_DCL_OUTPUT) { TRACE("%s ", shader_opcode_names[ins.handler_idx]); shader_dump_dst_param(&ins.declaration.dst, &shader_version); diff --git a/dlls/wined3d/shader_sm4.c b/dlls/wined3d/shader_sm4.c index 3babd4e..88231e0 100644 --- a/dlls/wined3d/shader_sm4.c +++ b/dlls/wined3d/shader_sm4.c @@ -161,6 +161,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_INPUT = 0x5f, WINED3D_SM4_OP_DCL_INPUT_PS = 0x62, WINED3D_SM4_OP_DCL_OUTPUT = 0x65, WINED3D_SM4_OP_DCL_TEMPS = 0x68, @@ -365,6 +366,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_INPUT, WINED3DSIH_DCL_INPUT, "", ""}, {WINED3D_SM4_OP_DCL_INPUT_PS, WINED3DSIH_DCL_INPUT_PS, "", ""}, {WINED3D_SM4_OP_DCL_OUTPUT, WINED3DSIH_DCL_OUTPUT, "", ""}, {WINED3D_SM4_OP_DCL_TEMPS, WINED3DSIH_DCL_TEMPS, "", ""}, @@ -983,7 +985,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_OUTPUT) + else if (opcode == WINED3D_SM4_OP_DCL_INPUT + || opcode == WINED3D_SM4_OP_DCL_OUTPUT) { shader_sm4_read_dst_param(priv, &p, WINED3D_DATA_FLOAT, &ins->declaration.dst); } diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h index cda6c39..e8355cc 100644 --- a/dlls/wined3d/wined3d_private.h +++ b/dlls/wined3d/wined3d_private.h @@ -500,6 +500,7 @@ enum WINED3D_SHADER_INSTRUCTION_HANDLER WINED3DSIH_DCL, WINED3DSIH_DCL_CONSTANT_BUFFER, WINED3DSIH_DCL_IMMEDIATE_CONSTANT_BUFFER, + WINED3DSIH_DCL_INPUT, WINED3DSIH_DCL_INPUT_PRIMITIVE, WINED3DSIH_DCL_INPUT_PS, WINED3DSIH_DCL_OUTPUT,