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

wined3d: Recognize SM4 dcl_indexableTemp opcode.

parent 50c090dc
......@@ -5232,6 +5232,7 @@ static const SHADER_HANDLER shader_arb_instruction_handler_table[WINED3DSIH_TABL
/* WINED3DSIH_DCL_HS_FORK_PHASE_INSTANCE_COUNT */ NULL,
/* WINED3DSIH_DCL_HS_MAX_TESSFACTOR */ NULL,
/* WINED3DSIH_DCL_IMMEDIATE_CONSTANT_BUFFER */ NULL,
/* WINED3DSIH_DCL_INDEXABLE_TEMP */ NULL,
/* WINED3DSIH_DCL_INPUT */ NULL,
/* WINED3DSIH_DCL_INPUT_CONTROL_POINT_COUNT */ NULL,
/* WINED3DSIH_DCL_INPUT_PRIMITIVE */ shader_hw_nop,
......
......@@ -8567,6 +8567,7 @@ static const SHADER_HANDLER shader_glsl_instruction_handler_table[WINED3DSIH_TAB
/* WINED3DSIH_DCL_HS_FORK_PHASE_INSTANCE_COUNT */ NULL,
/* WINED3DSIH_DCL_HS_MAX_TESSFACTOR */ NULL,
/* WINED3DSIH_DCL_IMMEDIATE_CONSTANT_BUFFER */ NULL,
/* WINED3DSIH_DCL_INDEXABLE_TEMP */ NULL,
/* WINED3DSIH_DCL_INPUT */ shader_glsl_nop,
/* WINED3DSIH_DCL_INPUT_CONTROL_POINT_COUNT */ NULL,
/* WINED3DSIH_DCL_INPUT_PRIMITIVE */ shader_glsl_nop,
......
......@@ -62,6 +62,7 @@ static const char * const shader_opcode_names[] =
/* 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_INDEXABLE_TEMP */ "dcl_indexableTemp",
/* WINED3DSIH_DCL_INPUT */ "dcl_input",
/* WINED3DSIH_DCL_INPUT_CONTROL_POINT_COUNT */ "dcl_input_control_point_count",
/* WINED3DSIH_DCL_INPUT_PRIMITIVE */ "dcl_inputPrimitive",
......@@ -2205,6 +2206,13 @@ static void shader_trace_init(const struct wined3d_shader_frontend *fe, void *fe
}
shader_addline(&buffer, "}");
}
else if (ins.handler_idx == WINED3DSIH_DCL_INDEXABLE_TEMP)
{
shader_addline(&buffer, "%s x[%u][%u], %u", shader_opcode_names[ins.handler_idx],
ins.declaration.indexable_temp.register_idx,
ins.declaration.indexable_temp.register_size,
ins.declaration.indexable_temp.component_count);
}
else if (ins.handler_idx == WINED3DSIH_DCL_INPUT_PS)
{
shader_addline(&buffer, "%s ", shader_opcode_names[ins.handler_idx]);
......
......@@ -199,6 +199,7 @@ enum wined3d_sm4_opcode
WINED3D_SM4_OP_DCL_OUTPUT = 0x65,
WINED3D_SM4_OP_DCL_OUTPUT_SIV = 0x67,
WINED3D_SM4_OP_DCL_TEMPS = 0x68,
WINED3D_SM4_OP_DCL_INDEXABLE_TEMP = 0x69,
WINED3D_SM4_OP_DCL_GLOBAL_FLAGS = 0x6a,
WINED3D_SM4_OP_GATHER4 = 0x6d,
WINED3D_SM5_OP_HS_DECLS = 0x71,
......@@ -576,6 +577,15 @@ static void shader_sm4_read_dcl_input_ps_siv(struct wined3d_shader_instruction *
ins->declaration.register_semantic.sysval_semantic = *tokens;
}
static void shader_sm4_read_dcl_indexable_temp(struct wined3d_shader_instruction *ins,
DWORD opcode, DWORD opcode_token, const DWORD *tokens, unsigned int token_count,
struct wined3d_sm4_data *priv)
{
ins->declaration.indexable_temp.register_idx = *tokens++;
ins->declaration.indexable_temp.register_size = *tokens++;
ins->declaration.indexable_temp.component_count = *tokens;
}
static void shader_sm4_read_dcl_global_flags(struct wined3d_shader_instruction *ins,
DWORD opcode, DWORD opcode_token, const DWORD *tokens, unsigned int token_count,
struct wined3d_sm4_data *priv)
......@@ -776,6 +786,8 @@ static const struct wined3d_sm4_opcode_info opcode_table[] =
shader_sm4_read_declaration_register_semantic},
{WINED3D_SM4_OP_DCL_TEMPS, WINED3DSIH_DCL_TEMPS, "", "",
shader_sm4_read_declaration_count},
{WINED3D_SM4_OP_DCL_INDEXABLE_TEMP, WINED3DSIH_DCL_INDEXABLE_TEMP, "", "",
shader_sm4_read_dcl_indexable_temp},
{WINED3D_SM4_OP_DCL_GLOBAL_FLAGS, WINED3DSIH_DCL_GLOBAL_FLAGS, "", "",
shader_sm4_read_dcl_global_flags},
{WINED3D_SM4_OP_GATHER4, WINED3DSIH_GATHER4, "u", "fRS"},
......
......@@ -577,6 +577,7 @@ enum WINED3D_SHADER_INSTRUCTION_HANDLER
WINED3DSIH_DCL_HS_FORK_PHASE_INSTANCE_COUNT,
WINED3DSIH_DCL_HS_MAX_TESSFACTOR,
WINED3DSIH_DCL_IMMEDIATE_CONSTANT_BUFFER,
WINED3DSIH_DCL_INDEXABLE_TEMP,
WINED3DSIH_DCL_INPUT,
WINED3DSIH_DCL_INPUT_CONTROL_POINT_COUNT,
WINED3DSIH_DCL_INPUT_PRIMITIVE,
......@@ -895,6 +896,13 @@ struct wined3d_shader_src_param
enum wined3d_shader_src_modifier modifiers;
};
struct wined3d_shader_indexable_temp
{
unsigned int register_idx;
unsigned int register_size;
unsigned int component_count;
};
struct wined3d_shader_semantic
{
enum wined3d_decl_usage usage;
......@@ -968,6 +976,7 @@ struct wined3d_shader_instruction
enum wined3d_tessellator_output_primitive tessellator_output_primitive;
enum wined3d_tessellator_partitioning tessellator_partitioning;
float max_tessellation_factor;
struct wined3d_shader_indexable_temp indexable_temp;
} 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