From ee77e1789cea7e419cee03ad41992b40e683bdf9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B3zef=20Kucia?= Date: Tue, 26 Jan 2016 00:34:04 +0100 Subject: [PATCH] wined3d: Recognize SM4 dcl_temps 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 84b85c40cd1..834780231e7 100644 --- a/dlls/wined3d/arb_program_shader.c +++ b/dlls/wined3d/arb_program_shader.c @@ -5229,6 +5229,7 @@ static const SHADER_HANDLER shader_arb_instruction_handler_table[WINED3DSIH_TABL /* WINED3DSIH_DCL_CONSTANT_BUFFER */ shader_hw_nop, /* WINED3DSIH_DCL_INPUT_PRIMITIVE */ shader_hw_nop, /* WINED3DSIH_DCL_OUTPUT_TOPOLOGY */ shader_hw_nop, + /* WINED3DSIH_DCL_TEMPS */ NULL, /* WINED3DSIH_DCL_VERTICES_OUT */ shader_hw_nop, /* WINED3DSIH_DEF */ shader_hw_nop, /* WINED3DSIH_DEFB */ shader_hw_nop, diff --git a/dlls/wined3d/glsl_shader.c b/dlls/wined3d/glsl_shader.c index 4d8cac14480..623469901ad 100644 --- a/dlls/wined3d/glsl_shader.c +++ b/dlls/wined3d/glsl_shader.c @@ -7975,6 +7975,7 @@ static const SHADER_HANDLER shader_glsl_instruction_handler_table[WINED3DSIH_TAB /* WINED3DSIH_DCL_CONSTANT_BUFFER */ shader_glsl_nop, /* WINED3DSIH_DCL_INPUT_PRIMITIVE */ shader_glsl_nop, /* WINED3DSIH_DCL_OUTPUT_TOPOLOGY */ shader_glsl_nop, + /* WINED3DSIH_DCL_TEMPS */ shader_glsl_nop, /* WINED3DSIH_DCL_VERTICES_OUT */ shader_glsl_nop, /* WINED3DSIH_DEF */ shader_glsl_nop, /* WINED3DSIH_DEFB */ shader_glsl_nop, diff --git a/dlls/wined3d/shader.c b/dlls/wined3d/shader.c index 952b9f98bb5..f2c3e7426df 100644 --- a/dlls/wined3d/shader.c +++ b/dlls/wined3d/shader.c @@ -57,6 +57,7 @@ static const char * const shader_opcode_names[] = /* WINED3DSIH_DCL_CONSTANT_BUFFER */ "dcl_constantBuffer", /* WINED3DSIH_DCL_INPUT_PRIMITIVE */ "dcl_inputPrimitive", /* WINED3DSIH_DCL_OUTPUT_TOPOLOGY */ "dcl_outputTopology", + /* WINED3DSIH_DCL_TEMPS */ "dcl_temps", /* WINED3DSIH_DCL_VERTICES_OUT */ "dcl_maxOutputVertexCount", /* WINED3DSIH_DEF */ "def", /* WINED3DSIH_DEFB */ "defb", @@ -1816,7 +1817,8 @@ static void shader_trace_init(const struct wined3d_shader_frontend *fe, void *fe TRACE("%s ", shader_opcode_names[ins.handler_idx]); shader_dump_primitive_type(ins.declaration.primitive_type); } - else if (ins.handler_idx == WINED3DSIH_DCL_VERTICES_OUT) + else if (ins.handler_idx == WINED3DSIH_DCL_TEMPS + || ins.handler_idx == WINED3DSIH_DCL_VERTICES_OUT) { TRACE("%s %u", shader_opcode_names[ins.handler_idx], ins.declaration.count); } diff --git a/dlls/wined3d/shader_sm4.c b/dlls/wined3d/shader_sm4.c index d2759231edd..35f62015195 100644 --- a/dlls/wined3d/shader_sm4.c +++ b/dlls/wined3d/shader_sm4.c @@ -144,6 +144,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_TEMPS = 0x68, }; enum wined3d_sm4_register_type @@ -323,6 +324,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_TEMPS, WINED3DSIH_DCL_TEMPS, "", ""}, }; static const enum wined3d_shader_register_type register_type_table[] = @@ -896,7 +898,8 @@ static void shader_sm4_read_instruction(void *data, const DWORD **ptr, struct wi ins->declaration.primitive_type = input_primitive_type_table[primitive_type]; } } - else if (opcode == WINED3D_SM4_OP_DCL_VERTICES_OUT) + else if (opcode == WINED3D_SM4_OP_DCL_VERTICES_OUT + || opcode == WINED3D_SM4_OP_DCL_TEMPS) { ins->declaration.count = *p++; } diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h index 48074ba2242..ed285074196 100644 --- a/dlls/wined3d/wined3d_private.h +++ b/dlls/wined3d/wined3d_private.h @@ -474,6 +474,7 @@ enum WINED3D_SHADER_INSTRUCTION_HANDLER WINED3DSIH_DCL_CONSTANT_BUFFER, WINED3DSIH_DCL_INPUT_PRIMITIVE, WINED3DSIH_DCL_OUTPUT_TOPOLOGY, + WINED3DSIH_DCL_TEMPS, WINED3DSIH_DCL_VERTICES_OUT, WINED3DSIH_DEF, WINED3DSIH_DEFB,