=?UTF-8?Q?J=C3=B3zef=20Kucia=20?=: wined3d: Recognize SM4 dcl_output opcode.
Alexandre Julliard
julliard at wine.codeweavers.com
Mon Feb 1 09:24:46 CST 2016
Module: wine
Branch: master
Commit: 479051060f58d143915b9f7753ed3e2ea30ab22a
URL: http://source.winehq.org/git/wine.git/?a=commit;h=479051060f58d143915b9f7753ed3e2ea30ab22a
Author: Józef Kucia <jkucia at codeweavers.com>
Date: Mon Feb 1 00:14:37 2016 +0100
wined3d: Recognize SM4 dcl_output opcode.
Signed-off-by: Józef Kucia <jkucia at codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/wined3d/arb_program_shader.c | 1 +
dlls/wined3d/glsl_shader.c | 1 +
dlls/wined3d/shader.c | 6 ++++++
dlls/wined3d/shader_sm4.c | 6 ++++++
dlls/wined3d/wined3d_private.h | 2 ++
5 files changed, 16 insertions(+)
diff --git a/dlls/wined3d/arb_program_shader.c b/dlls/wined3d/arb_program_shader.c
index 58c4c12..a6db262 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_IMMEDIATE_CONSTANT_BUFFER */ NULL,
/* WINED3DSIH_DCL_INPUT_PRIMITIVE */ shader_hw_nop,
+ /* WINED3DSIH_DCL_OUTPUT */ NULL,
/* WINED3DSIH_DCL_OUTPUT_TOPOLOGY */ shader_hw_nop,
/* WINED3DSIH_DCL_TEMPS */ NULL,
/* WINED3DSIH_DCL_VERTICES_OUT */ shader_hw_nop,
diff --git a/dlls/wined3d/glsl_shader.c b/dlls/wined3d/glsl_shader.c
index dd8e68b..04f8ab4 100644
--- a/dlls/wined3d/glsl_shader.c
+++ b/dlls/wined3d/glsl_shader.c
@@ -8012,6 +8012,7 @@ static const SHADER_HANDLER shader_glsl_instruction_handler_table[WINED3DSIH_TAB
/* WINED3DSIH_DCL_CONSTANT_BUFFER */ shader_glsl_nop,
/* WINED3DSIH_DCL_IMMEDIATE_CONSTANT_BUFFER */ NULL,
/* WINED3DSIH_DCL_INPUT_PRIMITIVE */ shader_glsl_nop,
+ /* WINED3DSIH_DCL_OUTPUT */ shader_glsl_nop,
/* WINED3DSIH_DCL_OUTPUT_TOPOLOGY */ shader_glsl_nop,
/* WINED3DSIH_DCL_TEMPS */ shader_glsl_nop,
/* WINED3DSIH_DCL_VERTICES_OUT */ shader_glsl_nop,
diff --git a/dlls/wined3d/shader.c b/dlls/wined3d/shader.c
index 77e8ab4..88c1330 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_IMMEDIATE_CONSTANT_BUFFER */ "dcl_immediateConstantBuffer",
/* WINED3DSIH_DCL_INPUT_PRIMITIVE */ "dcl_inputPrimitive",
+ /* WINED3DSIH_DCL_OUTPUT */ "dcl_output",
/* WINED3DSIH_DCL_OUTPUT_TOPOLOGY */ "dcl_outputTopology",
/* WINED3DSIH_DCL_TEMPS */ "dcl_temps",
/* WINED3DSIH_DCL_VERTICES_OUT */ "dcl_maxOutputVertexCount",
@@ -1842,6 +1843,11 @@ static void shader_trace_init(const struct wined3d_shader_frontend *fe, void *fe
}
TRACE("}");
}
+ else if (ins.handler_idx == WINED3DSIH_DCL_OUTPUT)
+ {
+ TRACE("%s ", shader_opcode_names[ins.handler_idx]);
+ shader_dump_dst_param(&ins.declaration.dst, &shader_version);
+ }
else if (ins.handler_idx == WINED3DSIH_DCL_INPUT_PRIMITIVE
|| ins.handler_idx == WINED3DSIH_DCL_OUTPUT_TOPOLOGY)
{
diff --git a/dlls/wined3d/shader_sm4.c b/dlls/wined3d/shader_sm4.c
index e7c92d2..d9535a5 100644
--- a/dlls/wined3d/shader_sm4.c
+++ b/dlls/wined3d/shader_sm4.c
@@ -154,6 +154,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_OUTPUT = 0x65,
WINED3D_SM4_OP_DCL_TEMPS = 0x68,
};
@@ -349,6 +350,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_OUTPUT, WINED3DSIH_DCL_OUTPUT, "", ""},
{WINED3D_SM4_OP_DCL_TEMPS, WINED3DSIH_DCL_TEMPS, "", ""},
};
@@ -953,6 +955,10 @@ 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_OUTPUT)
+ {
+ shader_sm4_read_dst_param(priv, &p, WINED3D_DATA_FLOAT, &ins->declaration.dst);
+ }
else if (opcode == WINED3D_SM4_OP_DCL_VERTICES_OUT
|| opcode == WINED3D_SM4_OP_DCL_TEMPS)
{
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
index 50a9e65..9960685 100644
--- a/dlls/wined3d/wined3d_private.h
+++ b/dlls/wined3d/wined3d_private.h
@@ -489,6 +489,7 @@ enum WINED3D_SHADER_INSTRUCTION_HANDLER
WINED3DSIH_DCL_CONSTANT_BUFFER,
WINED3DSIH_DCL_IMMEDIATE_CONSTANT_BUFFER,
WINED3DSIH_DCL_INPUT_PRIMITIVE,
+ WINED3DSIH_DCL_OUTPUT,
WINED3DSIH_DCL_OUTPUT_TOPOLOGY,
WINED3DSIH_DCL_TEMPS,
WINED3DSIH_DCL_VERTICES_OUT,
@@ -780,6 +781,7 @@ struct wined3d_shader_instruction
{
struct wined3d_shader_semantic semantic;
enum wined3d_primitive_type primitive_type;
+ struct wined3d_shader_dst_param dst;
struct wined3d_shader_src_param src;
UINT count;
struct wined3d_shader_immediate_constant_buffer *icb;
More information about the wine-cvs
mailing list