[PATCH 2/5] wined3d: Recognize SM4 dcl_output opcode.
Józef Kucia
jkucia at codeweavers.com
Sun Jan 31 17:14:37 CST 2016
Signed-off-by: Józef Kucia <jkucia at codeweavers.com>
---
resend
---
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 c0ee360..be6e105 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;
--
2.4.10
More information about the wine-patches
mailing list