[PATCH 7/8] wined3d: Recognize SM5 dcl_input_control_point_count opcode.
Józef Kucia
jkucia at codeweavers.com
Tue Mar 29 05:14:57 CDT 2016
Signed-off-by: Józef Kucia <jkucia at codeweavers.com>
---
dlls/wined3d/arb_program_shader.c | 1 +
dlls/wined3d/glsl_shader.c | 1 +
dlls/wined3d/shader.c | 4 +++-
dlls/wined3d/shader_sm4.c | 9 +++++++++
dlls/wined3d/wined3d_private.h | 1 +
5 files changed, 15 insertions(+), 1 deletion(-)
diff --git a/dlls/wined3d/arb_program_shader.c b/dlls/wined3d/arb_program_shader.c
index 2c745d7..a765b8d 100644
--- a/dlls/wined3d/arb_program_shader.c
+++ b/dlls/wined3d/arb_program_shader.c
@@ -5232,6 +5232,7 @@ static const SHADER_HANDLER shader_arb_instruction_handler_table[WINED3DSIH_TABL
/* WINED3DSIH_DCL_GLOBAL_FLAGS */ NULL,
/* WINED3DSIH_DCL_IMMEDIATE_CONSTANT_BUFFER */ NULL,
/* WINED3DSIH_DCL_INPUT */ NULL,
+ /* WINED3DSIH_DCL_INPUT_CONTROL_POINT_COUNT */ NULL,
/* WINED3DSIH_DCL_INPUT_PRIMITIVE */ shader_hw_nop,
/* WINED3DSIH_DCL_INPUT_PS */ NULL,
/* WINED3DSIH_DCL_INPUT_PS_SGV */ NULL,
diff --git a/dlls/wined3d/glsl_shader.c b/dlls/wined3d/glsl_shader.c
index 0f27cbd..ad3369e 100644
--- a/dlls/wined3d/glsl_shader.c
+++ b/dlls/wined3d/glsl_shader.c
@@ -8126,6 +8126,7 @@ static const SHADER_HANDLER shader_glsl_instruction_handler_table[WINED3DSIH_TAB
/* WINED3DSIH_DCL_GLOBAL_FLAGS */ shader_glsl_nop,
/* WINED3DSIH_DCL_IMMEDIATE_CONSTANT_BUFFER */ NULL,
/* WINED3DSIH_DCL_INPUT */ shader_glsl_nop,
+ /* WINED3DSIH_DCL_INPUT_CONTROL_POINT_COUNT */ NULL,
/* WINED3DSIH_DCL_INPUT_PRIMITIVE */ shader_glsl_nop,
/* WINED3DSIH_DCL_INPUT_PS */ NULL,
/* WINED3DSIH_DCL_INPUT_PS_SGV */ NULL,
diff --git a/dlls/wined3d/shader.c b/dlls/wined3d/shader.c
index 3e76592..1bb587f 100644
--- a/dlls/wined3d/shader.c
+++ b/dlls/wined3d/shader.c
@@ -58,6 +58,7 @@ static const char * const shader_opcode_names[] =
/* WINED3DSIH_DCL_GLOBAL_FLAGS */ "dcl_globalFlags",
/* WINED3DSIH_DCL_IMMEDIATE_CONSTANT_BUFFER */ "dcl_immediateConstantBuffer",
/* WINED3DSIH_DCL_INPUT */ "dcl_input",
+ /* WINED3DSIH_DCL_INPUT_CONTROL_POINT_COUNT */ "dcl_input_control_point_count",
/* WINED3DSIH_DCL_INPUT_PRIMITIVE */ "dcl_inputPrimitive",
/* WINED3DSIH_DCL_INPUT_PS */ "dcl_input_ps",
/* WINED3DSIH_DCL_INPUT_PS_SGV */ "dcl_input_ps_sgv",
@@ -2061,7 +2062,8 @@ static void shader_trace_init(const struct wined3d_shader_frontend *fe, void *fe
shader_addline(&buffer, ", comparisonMode");
}
else if (ins.handler_idx == WINED3DSIH_DCL_TEMPS
- || ins.handler_idx == WINED3DSIH_DCL_VERTICES_OUT)
+ || ins.handler_idx == WINED3DSIH_DCL_VERTICES_OUT
+ || ins.handler_idx == WINED3DSIH_DCL_INPUT_CONTROL_POINT_COUNT)
{
shader_addline(&buffer, "%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 e00ea9b..a19fd21 100644
--- a/dlls/wined3d/shader_sm4.c
+++ b/dlls/wined3d/shader_sm4.c
@@ -61,6 +61,9 @@ WINE_DECLARE_DEBUG_CHANNEL(d3d_bytecode);
#define WINED3D_SM4_GLOBAL_FLAGS_SHIFT 11
#define WINED3D_SM4_GLOBAL_FLAGS_MASK (0xffu << WINED3D_SM4_GLOBAL_FLAGS_SHIFT)
+#define WINED3D_SM5_CPOINT_COUNT_SHIFT 11
+#define WINED3D_SM5_CPOINT_COUNT_MASK (0xffu << WINED3D_SM5_CPOINT_COUNT_SHIFT)
+
#define WINED3D_SM4_OPCODE_MASK 0xff
#define WINED3D_SM4_REGISTER_MODIFIER (0x1u << 31)
@@ -190,6 +193,7 @@ enum wined3d_sm4_opcode
WINED3D_SM5_OP_DERIV_RTX_FINE = 0x7b,
WINED3D_SM5_OP_DERIV_RTY_COARSE = 0x7c,
WINED3D_SM5_OP_DERIV_RTY_FINE = 0x7d,
+ WINED3D_SM5_OP_DCL_INPUT_CPOINT_COUNT = 0x93,
WINED3D_SM5_OP_DCL_UAV_TYPED = 0x9c,
WINED3D_SM5_OP_DCL_RESOURCE_STRUCTURED = 0xa2,
WINED3D_SM5_OP_STORE_UAV_TYPED = 0xa4,
@@ -404,6 +408,7 @@ static const struct wined3d_sm4_opcode_info opcode_table[] =
{WINED3D_SM5_OP_DERIV_RTX_FINE, WINED3DSIH_DSX_FINE, "f", "f"},
{WINED3D_SM5_OP_DERIV_RTY_COARSE, WINED3DSIH_DSY_COARSE, "f", "f"},
{WINED3D_SM5_OP_DERIV_RTY_FINE, WINED3DSIH_DSY_FINE, "f", "f"},
+ {WINED3D_SM5_OP_DCL_INPUT_CPOINT_COUNT, WINED3DSIH_DCL_INPUT_CONTROL_POINT_COUNT, "", ""},
{WINED3D_SM5_OP_DCL_UAV_TYPED, WINED3DSIH_DCL_UAV_TYPED, "", ""},
{WINED3D_SM5_OP_DCL_RESOURCE_STRUCTURED, WINED3DSIH_DCL_RESOURCE_STRUCTURED, "", ""},
{WINED3D_SM5_OP_STORE_UAV_TYPED, WINED3DSIH_STORE_UAV_TYPED, "", "Uif"},
@@ -1022,6 +1027,10 @@ static void shader_sm4_read_instruction(void *data, const DWORD **ptr, struct wi
ins->declaration.primitive_type = output_primitive_type_table[primitive_type];
}
}
+ else if (opcode == WINED3D_SM5_OP_DCL_INPUT_CPOINT_COUNT)
+ {
+ ins->declaration.count = (opcode_token & WINED3D_SM5_CPOINT_COUNT_MASK) >> WINED3D_SM5_CPOINT_COUNT_SHIFT;
+ }
else if (opcode == WINED3D_SM4_OP_DCL_INPUT_PRIMITIVE)
{
enum wined3d_sm4_input_primitive_type primitive_type;
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
index 1492392..648287f 100644
--- a/dlls/wined3d/wined3d_private.h
+++ b/dlls/wined3d/wined3d_private.h
@@ -514,6 +514,7 @@ enum WINED3D_SHADER_INSTRUCTION_HANDLER
WINED3DSIH_DCL_GLOBAL_FLAGS,
WINED3DSIH_DCL_IMMEDIATE_CONSTANT_BUFFER,
WINED3DSIH_DCL_INPUT,
+ WINED3DSIH_DCL_INPUT_CONTROL_POINT_COUNT,
WINED3DSIH_DCL_INPUT_PRIMITIVE,
WINED3DSIH_DCL_INPUT_PS,
WINED3DSIH_DCL_INPUT_PS_SGV,
--
2.4.10
More information about the wine-patches
mailing list