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

wined3d: Recognize SM5 dcl_hs_max_tessfactor opcode.

parent a87f09bb
......@@ -5231,6 +5231,7 @@ static const SHADER_HANDLER shader_arb_instruction_handler_table[WINED3DSIH_TABL
/* WINED3DSIH_DCL_CONSTANT_BUFFER */ shader_hw_nop,
/* WINED3DSIH_DCL_GLOBAL_FLAGS */ NULL,
/* WINED3DSIH_DCL_HS_FORK_PHASE_INSTANCE_COUNT */ NULL,
/* WINED3DSIH_DCL_HS_MAX_TESSFACTOR */ NULL,
/* WINED3DSIH_DCL_IMMEDIATE_CONSTANT_BUFFER */ NULL,
/* WINED3DSIH_DCL_INPUT */ NULL,
/* WINED3DSIH_DCL_INPUT_CONTROL_POINT_COUNT */ NULL,
......
......@@ -8125,6 +8125,7 @@ static const SHADER_HANDLER shader_glsl_instruction_handler_table[WINED3DSIH_TAB
/* WINED3DSIH_DCL_CONSTANT_BUFFER */ shader_glsl_nop,
/* WINED3DSIH_DCL_GLOBAL_FLAGS */ shader_glsl_nop,
/* WINED3DSIH_DCL_HS_FORK_PHASE_INSTANCE_COUNT */ NULL,
/* WINED3DSIH_DCL_HS_MAX_TESSFACTOR */ NULL,
/* WINED3DSIH_DCL_IMMEDIATE_CONSTANT_BUFFER */ NULL,
/* WINED3DSIH_DCL_INPUT */ shader_glsl_nop,
/* WINED3DSIH_DCL_INPUT_CONTROL_POINT_COUNT */ NULL,
......
......@@ -57,6 +57,7 @@ static const char * const shader_opcode_names[] =
/* WINED3DSIH_DCL_CONSTANT_BUFFER */ "dcl_constantBuffer",
/* WINED3DSIH_DCL_GLOBAL_FLAGS */ "dcl_globalFlags",
/* WINED3DSIH_DCL_HS_FORK_PHASE_INSTANCE_COUNT */ "dcl_hs_fork_phase_instance_count",
/* WINED3DSIH_DCL_HS_MAX_TESSFACTOR */ "dcl_hs_max_tessfactor",
/* WINED3DSIH_DCL_IMMEDIATE_CONSTANT_BUFFER */ "dcl_immediateConstantBuffer",
/* WINED3DSIH_DCL_INPUT */ "dcl_input",
/* WINED3DSIH_DCL_INPUT_CONTROL_POINT_COUNT */ "dcl_input_control_point_count",
......@@ -2011,6 +2012,11 @@ static void shader_trace_init(const struct wined3d_shader_frontend *fe, void *fe
shader_addline(&buffer, "%s ", shader_opcode_names[ins.handler_idx]);
shader_dump_global_flags(&buffer, ins.flags);
}
else if (ins.handler_idx == WINED3DSIH_DCL_HS_MAX_TESSFACTOR)
{
shader_addline(&buffer, "%s %.8e", shader_opcode_names[ins.handler_idx],
ins.declaration.max_tessellation_factor);
}
else if (ins.handler_idx == WINED3DSIH_DCL_IMMEDIATE_CONSTANT_BUFFER)
{
shader_addline(&buffer, "%s {\n", shader_opcode_names[ins.handler_idx]);
......
......@@ -195,6 +195,7 @@ enum wined3d_sm4_opcode
WINED3D_SM5_OP_DERIV_RTY_FINE = 0x7d,
WINED3D_SM5_OP_DCL_INPUT_CONTROL_POINT_COUNT = 0x93,
WINED3D_SM5_OP_DCL_OUTPUT_CONTROL_POINT_COUNT = 0x94,
WINED3D_SM5_OP_DCL_HS_MAX_TESSFACTOR = 0x98,
WINED3D_SM5_OP_DCL_HS_FORK_PHASE_INSTANCE_COUNT = 0x99,
WINED3D_SM5_OP_DCL_UAV_TYPED = 0x9c,
WINED3D_SM5_OP_DCL_RESOURCE_STRUCTURED = 0xa2,
......@@ -412,6 +413,7 @@ static const struct wined3d_sm4_opcode_info opcode_table[] =
{WINED3D_SM5_OP_DERIV_RTY_FINE, WINED3DSIH_DSY_FINE, "f", "f"},
{WINED3D_SM5_OP_DCL_INPUT_CONTROL_POINT_COUNT, WINED3DSIH_DCL_INPUT_CONTROL_POINT_COUNT, "", ""},
{WINED3D_SM5_OP_DCL_OUTPUT_CONTROL_POINT_COUNT, WINED3DSIH_DCL_OUTPUT_CONTROL_POINT_COUNT, "", ""},
{WINED3D_SM5_OP_DCL_HS_MAX_TESSFACTOR, WINED3DSIH_DCL_HS_MAX_TESSFACTOR, "", ""},
{WINED3D_SM5_OP_DCL_HS_FORK_PHASE_INSTANCE_COUNT, WINED3DSIH_DCL_HS_FORK_PHASE_INSTANCE_COUNT, "", ""},
{WINED3D_SM5_OP_DCL_UAV_TYPED, WINED3DSIH_DCL_UAV_TYPED, "", ""},
{WINED3D_SM5_OP_DCL_RESOURCE_STRUCTURED, WINED3DSIH_DCL_RESOURCE_STRUCTURED, "", ""},
......@@ -1009,6 +1011,10 @@ static void shader_sm4_read_instruction(void *data, const DWORD **ptr, struct wi
if (opcode_token & WINED3D_SM4_INDEX_TYPE_MASK)
ins->flags |= WINED3DSI_INDEXED_DYNAMIC;
}
else if (opcode == WINED3D_SM5_OP_DCL_HS_MAX_TESSFACTOR)
{
ins->declaration.max_tessellation_factor = *(float *)p++;
}
else if (opcode == WINED3D_SM4_OP_DCL_SAMPLER)
{
ins->flags = (opcode_token & WINED3D_SM4_SAMPLER_MODE_MASK) >> WINED3D_SM4_SAMPLER_MODE_SHIFT;
......
......@@ -513,6 +513,7 @@ enum WINED3D_SHADER_INSTRUCTION_HANDLER
WINED3DSIH_DCL_CONSTANT_BUFFER,
WINED3DSIH_DCL_GLOBAL_FLAGS,
WINED3DSIH_DCL_HS_FORK_PHASE_INSTANCE_COUNT,
WINED3DSIH_DCL_HS_MAX_TESSFACTOR,
WINED3DSIH_DCL_IMMEDIATE_CONSTANT_BUFFER,
WINED3DSIH_DCL_INPUT,
WINED3DSIH_DCL_INPUT_CONTROL_POINT_COUNT,
......@@ -855,6 +856,7 @@ struct wined3d_shader_instruction
UINT count;
const struct wined3d_shader_immediate_constant_buffer *icb;
struct wined3d_shader_structured_resource structured_resource;
float max_tessellation_factor;
} declaration;
};
......
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