Commit cee0c364 authored by Józef Kucia's avatar Józef Kucia Committed by Alexandre Julliard

wined3d: Recognize SM5 dcl_input_control_point_count opcode.

parent 87bef12e
...@@ -5232,6 +5232,7 @@ static const SHADER_HANDLER shader_arb_instruction_handler_table[WINED3DSIH_TABL ...@@ -5232,6 +5232,7 @@ static const SHADER_HANDLER shader_arb_instruction_handler_table[WINED3DSIH_TABL
/* WINED3DSIH_DCL_GLOBAL_FLAGS */ NULL, /* WINED3DSIH_DCL_GLOBAL_FLAGS */ NULL,
/* WINED3DSIH_DCL_IMMEDIATE_CONSTANT_BUFFER */ NULL, /* WINED3DSIH_DCL_IMMEDIATE_CONSTANT_BUFFER */ NULL,
/* WINED3DSIH_DCL_INPUT */ NULL, /* WINED3DSIH_DCL_INPUT */ NULL,
/* WINED3DSIH_DCL_INPUT_CONTROL_POINT_COUNT */ NULL,
/* WINED3DSIH_DCL_INPUT_PRIMITIVE */ shader_hw_nop, /* WINED3DSIH_DCL_INPUT_PRIMITIVE */ shader_hw_nop,
/* WINED3DSIH_DCL_INPUT_PS */ NULL, /* WINED3DSIH_DCL_INPUT_PS */ NULL,
/* WINED3DSIH_DCL_INPUT_PS_SGV */ NULL, /* WINED3DSIH_DCL_INPUT_PS_SGV */ NULL,
......
...@@ -8126,6 +8126,7 @@ static const SHADER_HANDLER shader_glsl_instruction_handler_table[WINED3DSIH_TAB ...@@ -8126,6 +8126,7 @@ static const SHADER_HANDLER shader_glsl_instruction_handler_table[WINED3DSIH_TAB
/* WINED3DSIH_DCL_GLOBAL_FLAGS */ shader_glsl_nop, /* WINED3DSIH_DCL_GLOBAL_FLAGS */ shader_glsl_nop,
/* WINED3DSIH_DCL_IMMEDIATE_CONSTANT_BUFFER */ NULL, /* WINED3DSIH_DCL_IMMEDIATE_CONSTANT_BUFFER */ NULL,
/* WINED3DSIH_DCL_INPUT */ shader_glsl_nop, /* WINED3DSIH_DCL_INPUT */ shader_glsl_nop,
/* WINED3DSIH_DCL_INPUT_CONTROL_POINT_COUNT */ NULL,
/* WINED3DSIH_DCL_INPUT_PRIMITIVE */ shader_glsl_nop, /* WINED3DSIH_DCL_INPUT_PRIMITIVE */ shader_glsl_nop,
/* WINED3DSIH_DCL_INPUT_PS */ NULL, /* WINED3DSIH_DCL_INPUT_PS */ NULL,
/* WINED3DSIH_DCL_INPUT_PS_SGV */ NULL, /* WINED3DSIH_DCL_INPUT_PS_SGV */ NULL,
......
...@@ -58,6 +58,7 @@ static const char * const shader_opcode_names[] = ...@@ -58,6 +58,7 @@ static const char * const shader_opcode_names[] =
/* WINED3DSIH_DCL_GLOBAL_FLAGS */ "dcl_globalFlags", /* WINED3DSIH_DCL_GLOBAL_FLAGS */ "dcl_globalFlags",
/* WINED3DSIH_DCL_IMMEDIATE_CONSTANT_BUFFER */ "dcl_immediateConstantBuffer", /* WINED3DSIH_DCL_IMMEDIATE_CONSTANT_BUFFER */ "dcl_immediateConstantBuffer",
/* WINED3DSIH_DCL_INPUT */ "dcl_input", /* 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_PRIMITIVE */ "dcl_inputPrimitive",
/* WINED3DSIH_DCL_INPUT_PS */ "dcl_input_ps", /* WINED3DSIH_DCL_INPUT_PS */ "dcl_input_ps",
/* WINED3DSIH_DCL_INPUT_PS_SGV */ "dcl_input_ps_sgv", /* 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 ...@@ -2061,7 +2062,8 @@ static void shader_trace_init(const struct wined3d_shader_frontend *fe, void *fe
shader_addline(&buffer, ", comparisonMode"); shader_addline(&buffer, ", comparisonMode");
} }
else if (ins.handler_idx == WINED3DSIH_DCL_TEMPS 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); shader_addline(&buffer, "%s %u", shader_opcode_names[ins.handler_idx], ins.declaration.count);
} }
......
...@@ -61,6 +61,9 @@ WINE_DECLARE_DEBUG_CHANNEL(d3d_bytecode); ...@@ -61,6 +61,9 @@ WINE_DECLARE_DEBUG_CHANNEL(d3d_bytecode);
#define WINED3D_SM4_GLOBAL_FLAGS_SHIFT 11 #define WINED3D_SM4_GLOBAL_FLAGS_SHIFT 11
#define WINED3D_SM4_GLOBAL_FLAGS_MASK (0xffu << WINED3D_SM4_GLOBAL_FLAGS_SHIFT) #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_OPCODE_MASK 0xff
#define WINED3D_SM4_REGISTER_MODIFIER (0x1u << 31) #define WINED3D_SM4_REGISTER_MODIFIER (0x1u << 31)
...@@ -190,6 +193,7 @@ enum wined3d_sm4_opcode ...@@ -190,6 +193,7 @@ enum wined3d_sm4_opcode
WINED3D_SM5_OP_DERIV_RTX_FINE = 0x7b, WINED3D_SM5_OP_DERIV_RTX_FINE = 0x7b,
WINED3D_SM5_OP_DERIV_RTY_COARSE = 0x7c, WINED3D_SM5_OP_DERIV_RTY_COARSE = 0x7c,
WINED3D_SM5_OP_DERIV_RTY_FINE = 0x7d, 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_UAV_TYPED = 0x9c,
WINED3D_SM5_OP_DCL_RESOURCE_STRUCTURED = 0xa2, WINED3D_SM5_OP_DCL_RESOURCE_STRUCTURED = 0xa2,
WINED3D_SM5_OP_STORE_UAV_TYPED = 0xa4, WINED3D_SM5_OP_STORE_UAV_TYPED = 0xa4,
...@@ -404,6 +408,7 @@ static const struct wined3d_sm4_opcode_info opcode_table[] = ...@@ -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_RTX_FINE, WINED3DSIH_DSX_FINE, "f", "f"},
{WINED3D_SM5_OP_DERIV_RTY_COARSE, WINED3DSIH_DSY_COARSE, "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_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_UAV_TYPED, WINED3DSIH_DCL_UAV_TYPED, "", ""},
{WINED3D_SM5_OP_DCL_RESOURCE_STRUCTURED, WINED3DSIH_DCL_RESOURCE_STRUCTURED, "", ""}, {WINED3D_SM5_OP_DCL_RESOURCE_STRUCTURED, WINED3DSIH_DCL_RESOURCE_STRUCTURED, "", ""},
{WINED3D_SM5_OP_STORE_UAV_TYPED, WINED3DSIH_STORE_UAV_TYPED, "", "Uif"}, {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 ...@@ -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]; 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) else if (opcode == WINED3D_SM4_OP_DCL_INPUT_PRIMITIVE)
{ {
enum wined3d_sm4_input_primitive_type primitive_type; enum wined3d_sm4_input_primitive_type primitive_type;
......
...@@ -514,6 +514,7 @@ enum WINED3D_SHADER_INSTRUCTION_HANDLER ...@@ -514,6 +514,7 @@ enum WINED3D_SHADER_INSTRUCTION_HANDLER
WINED3DSIH_DCL_GLOBAL_FLAGS, WINED3DSIH_DCL_GLOBAL_FLAGS,
WINED3DSIH_DCL_IMMEDIATE_CONSTANT_BUFFER, WINED3DSIH_DCL_IMMEDIATE_CONSTANT_BUFFER,
WINED3DSIH_DCL_INPUT, WINED3DSIH_DCL_INPUT,
WINED3DSIH_DCL_INPUT_CONTROL_POINT_COUNT,
WINED3DSIH_DCL_INPUT_PRIMITIVE, WINED3DSIH_DCL_INPUT_PRIMITIVE,
WINED3DSIH_DCL_INPUT_PS, WINED3DSIH_DCL_INPUT_PS,
WINED3DSIH_DCL_INPUT_PS_SGV, WINED3DSIH_DCL_INPUT_PS_SGV,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment