Commit 107c6f07 authored by Guillaume Charifi's avatar Guillaume Charifi Committed by Alexandre Julliard

wined3d: Recognize SM5 dcl_resource_raw instruction.

parent 363d70ab
......@@ -5066,6 +5066,7 @@ static const SHADER_HANDLER shader_arb_instruction_handler_table[WINED3DSIH_TABL
/* WINED3DSIH_DCL_OUTPUT_CONTROL_POINT_COUNT */ NULL,
/* WINED3DSIH_DCL_OUTPUT_SIV */ NULL,
/* WINED3DSIH_DCL_OUTPUT_TOPOLOGY */ shader_hw_nop,
/* WINED3DSIH_DCL_RESOURCE_RAW */ NULL,
/* WINED3DSIH_DCL_RESOURCE_STRUCTURED */ NULL,
/* WINED3DSIH_DCL_SAMPLER */ NULL,
/* WINED3DSIH_DCL_STREAM */ NULL,
......
......@@ -8926,6 +8926,7 @@ static const SHADER_HANDLER shader_glsl_instruction_handler_table[WINED3DSIH_TAB
/* WINED3DSIH_DCL_OUTPUT_CONTROL_POINT_COUNT */ NULL,
/* WINED3DSIH_DCL_OUTPUT_SIV */ shader_glsl_nop,
/* WINED3DSIH_DCL_OUTPUT_TOPOLOGY */ shader_glsl_nop,
/* WINED3DSIH_DCL_RESOURCE_RAW */ NULL,
/* WINED3DSIH_DCL_RESOURCE_STRUCTURED */ NULL,
/* WINED3DSIH_DCL_SAMPLER */ shader_glsl_nop,
/* WINED3DSIH_DCL_STREAM */ NULL,
......
......@@ -91,6 +91,7 @@ static const char * const shader_opcode_names[] =
/* WINED3DSIH_DCL_OUTPUT_CONTROL_POINT_COUNT */ "dcl_output_control_point_count",
/* WINED3DSIH_DCL_OUTPUT_SIV */ "dcl_output_siv",
/* WINED3DSIH_DCL_OUTPUT_TOPOLOGY */ "dcl_outputTopology",
/* WINED3DSIH_DCL_RESOURCE_RAW */ "dcl_resource_raw",
/* WINED3DSIH_DCL_RESOURCE_STRUCTURED */ "dcl_resource_structured",
/* WINED3DSIH_DCL_SAMPLER */ "dcl_sampler",
/* WINED3DSIH_DCL_STREAM */ "dcl_stream",
......@@ -2442,6 +2443,11 @@ static void shader_trace_init(const struct wined3d_shader_frontend *fe, void *fe
shader_opcode_names[ins.handler_idx], ins.declaration.fp.index,
ins.declaration.fp.array_size, ins.declaration.fp.body_count);
}
else if (ins.handler_idx == WINED3DSIH_DCL_RESOURCE_RAW)
{
shader_addline(&buffer, "%s ", shader_opcode_names[ins.handler_idx]);
shader_dump_dst_param(&buffer, &ins.declaration.dst, &shader_version);
}
else if (ins.handler_idx == WINED3DSIH_DCL_RESOURCE_STRUCTURED)
{
shader_addline(&buffer, "%s ", shader_opcode_names[ins.handler_idx]);
......
......@@ -258,6 +258,7 @@ enum wined3d_sm4_opcode
WINED3D_SM5_OP_DCL_UAV_STRUCTURED = 0x9e,
WINED3D_SM5_OP_DCL_TGSM_RAW = 0x9f,
WINED3D_SM5_OP_DCL_TGSM_STRUCTURED = 0xa0,
WINED3D_SM5_OP_DCL_RESOURCE_RAW = 0xa1,
WINED3D_SM5_OP_DCL_RESOURCE_STRUCTURED = 0xa2,
WINED3D_SM5_OP_LD_UAV_TYPED = 0xa3,
WINED3D_SM5_OP_STORE_UAV_TYPED = 0xa4,
......@@ -774,6 +775,13 @@ static void shader_sm5_read_dcl_resource_structured(struct wined3d_shader_instru
ins->declaration.structured_resource.byte_stride = *tokens;
}
static void shader_sm5_read_dcl_resource_raw(struct wined3d_shader_instruction *ins,
DWORD opcode, DWORD opcode_token, const DWORD *tokens, unsigned int token_count,
struct wined3d_sm4_data *priv)
{
shader_sm4_read_dst_param(priv, &tokens, WINED3D_DATA_RESOURCE, &ins->declaration.dst);
}
static void shader_sm5_read_sync(struct wined3d_shader_instruction *ins,
DWORD opcode, DWORD opcode_token, const DWORD *tokens, unsigned int token_count,
struct wined3d_sm4_data *priv)
......@@ -971,6 +979,8 @@ static const struct wined3d_sm4_opcode_info opcode_table[] =
shader_sm5_read_dcl_tgsm_raw},
{WINED3D_SM5_OP_DCL_TGSM_STRUCTURED, WINED3DSIH_DCL_TGSM_STRUCTURED, "", "",
shader_sm5_read_dcl_tgsm_structured},
{WINED3D_SM5_OP_DCL_RESOURCE_RAW, WINED3DSIH_DCL_RESOURCE_RAW, "", "",
shader_sm5_read_dcl_resource_raw},
{WINED3D_SM5_OP_DCL_RESOURCE_STRUCTURED, WINED3DSIH_DCL_RESOURCE_STRUCTURED, "", "",
shader_sm5_read_dcl_resource_structured},
{WINED3D_SM5_OP_LD_UAV_TYPED, WINED3DSIH_LD_UAV_TYPED, "u", "iU"},
......
......@@ -621,6 +621,7 @@ enum WINED3D_SHADER_INSTRUCTION_HANDLER
WINED3DSIH_DCL_OUTPUT_CONTROL_POINT_COUNT,
WINED3DSIH_DCL_OUTPUT_SIV,
WINED3DSIH_DCL_OUTPUT_TOPOLOGY,
WINED3DSIH_DCL_RESOURCE_RAW,
WINED3DSIH_DCL_RESOURCE_STRUCTURED,
WINED3DSIH_DCL_SAMPLER,
WINED3DSIH_DCL_STREAM,
......
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