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

wined3d: Recognize SM5 dcl_resource_structured opcode.

parent 46398043
...@@ -5239,6 +5239,7 @@ static const SHADER_HANDLER shader_arb_instruction_handler_table[WINED3DSIH_TABL ...@@ -5239,6 +5239,7 @@ static const SHADER_HANDLER shader_arb_instruction_handler_table[WINED3DSIH_TABL
/* WINED3DSIH_DCL_OUTPUT */ NULL, /* WINED3DSIH_DCL_OUTPUT */ NULL,
/* WINED3DSIH_DCL_OUTPUT_SIV */ NULL, /* WINED3DSIH_DCL_OUTPUT_SIV */ NULL,
/* WINED3DSIH_DCL_OUTPUT_TOPOLOGY */ shader_hw_nop, /* WINED3DSIH_DCL_OUTPUT_TOPOLOGY */ shader_hw_nop,
/* WINED3DSIH_DCL_RESOURCE_STRUCTURED */ NULL,
/* WINED3DSIH_DCL_SAMPLER */ NULL, /* WINED3DSIH_DCL_SAMPLER */ NULL,
/* WINED3DSIH_DCL_TEMPS */ NULL, /* WINED3DSIH_DCL_TEMPS */ NULL,
/* WINED3DSIH_DCL_VERTICES_OUT */ shader_hw_nop, /* WINED3DSIH_DCL_VERTICES_OUT */ shader_hw_nop,
......
...@@ -8125,6 +8125,7 @@ static const SHADER_HANDLER shader_glsl_instruction_handler_table[WINED3DSIH_TAB ...@@ -8125,6 +8125,7 @@ static const SHADER_HANDLER shader_glsl_instruction_handler_table[WINED3DSIH_TAB
/* WINED3DSIH_DCL_OUTPUT */ shader_glsl_nop, /* WINED3DSIH_DCL_OUTPUT */ shader_glsl_nop,
/* WINED3DSIH_DCL_OUTPUT_SIV */ shader_glsl_nop, /* WINED3DSIH_DCL_OUTPUT_SIV */ shader_glsl_nop,
/* WINED3DSIH_DCL_OUTPUT_TOPOLOGY */ shader_glsl_nop, /* WINED3DSIH_DCL_OUTPUT_TOPOLOGY */ shader_glsl_nop,
/* WINED3DSIH_DCL_RESOURCE_STRUCTURED */ NULL,
/* WINED3DSIH_DCL_SAMPLER */ shader_glsl_nop, /* WINED3DSIH_DCL_SAMPLER */ shader_glsl_nop,
/* WINED3DSIH_DCL_TEMPS */ shader_glsl_nop, /* WINED3DSIH_DCL_TEMPS */ shader_glsl_nop,
/* WINED3DSIH_DCL_VERTICES_OUT */ shader_glsl_nop, /* WINED3DSIH_DCL_VERTICES_OUT */ shader_glsl_nop,
......
...@@ -67,6 +67,7 @@ static const char * const shader_opcode_names[] = ...@@ -67,6 +67,7 @@ static const char * const shader_opcode_names[] =
/* WINED3DSIH_DCL_OUTPUT */ "dcl_output", /* WINED3DSIH_DCL_OUTPUT */ "dcl_output",
/* WINED3DSIH_DCL_OUTPUT_SIV */ "dcl_output_siv", /* WINED3DSIH_DCL_OUTPUT_SIV */ "dcl_output_siv",
/* WINED3DSIH_DCL_OUTPUT_TOPOLOGY */ "dcl_outputTopology", /* WINED3DSIH_DCL_OUTPUT_TOPOLOGY */ "dcl_outputTopology",
/* WINED3DSIH_DCL_RESOURCE_STRUCTURED */ "dcl_resource_structured",
/* WINED3DSIH_DCL_SAMPLER */ "dcl_sampler", /* WINED3DSIH_DCL_SAMPLER */ "dcl_sampler",
/* WINED3DSIH_DCL_TEMPS */ "dcl_temps", /* WINED3DSIH_DCL_TEMPS */ "dcl_temps",
/* WINED3DSIH_DCL_VERTICES_OUT */ "dcl_maxOutputVertexCount", /* WINED3DSIH_DCL_VERTICES_OUT */ "dcl_maxOutputVertexCount",
...@@ -2022,6 +2023,12 @@ static void shader_trace_init(const struct wined3d_shader_frontend *fe, void *fe ...@@ -2022,6 +2023,12 @@ static void shader_trace_init(const struct wined3d_shader_frontend *fe, void *fe
shader_addline(&buffer, "%s ", shader_opcode_names[ins.handler_idx]); shader_addline(&buffer, "%s ", shader_opcode_names[ins.handler_idx]);
shader_dump_primitive_type(&buffer, ins.declaration.primitive_type); shader_dump_primitive_type(&buffer, ins.declaration.primitive_type);
} }
else if (ins.handler_idx == WINED3DSIH_DCL_RESOURCE_STRUCTURED)
{
shader_addline(&buffer, "%s ", shader_opcode_names[ins.handler_idx]);
shader_dump_dst_param(&buffer, &ins.declaration.structured_resource.reg, &shader_version);
shader_addline(&buffer, ", %u", ins.declaration.structured_resource.byte_stride);
}
else if (ins.handler_idx == WINED3DSIH_DCL_SAMPLER) else if (ins.handler_idx == WINED3DSIH_DCL_SAMPLER)
{ {
shader_addline(&buffer, "%s ", shader_opcode_names[ins.handler_idx]); shader_addline(&buffer, "%s ", shader_opcode_names[ins.handler_idx]);
......
...@@ -519,6 +519,7 @@ enum WINED3D_SHADER_INSTRUCTION_HANDLER ...@@ -519,6 +519,7 @@ enum WINED3D_SHADER_INSTRUCTION_HANDLER
WINED3DSIH_DCL_OUTPUT, WINED3DSIH_DCL_OUTPUT,
WINED3DSIH_DCL_OUTPUT_SIV, WINED3DSIH_DCL_OUTPUT_SIV,
WINED3DSIH_DCL_OUTPUT_TOPOLOGY, WINED3DSIH_DCL_OUTPUT_TOPOLOGY,
WINED3DSIH_DCL_RESOURCE_STRUCTURED,
WINED3DSIH_DCL_SAMPLER, WINED3DSIH_DCL_SAMPLER,
WINED3DSIH_DCL_TEMPS, WINED3DSIH_DCL_TEMPS,
WINED3DSIH_DCL_VERTICES_OUT, WINED3DSIH_DCL_VERTICES_OUT,
...@@ -809,6 +810,12 @@ struct wined3d_shader_register_semantic ...@@ -809,6 +810,12 @@ struct wined3d_shader_register_semantic
enum wined3d_sysval_semantic sysval_semantic; enum wined3d_sysval_semantic sysval_semantic;
}; };
struct wined3d_shader_structured_resource
{
struct wined3d_shader_dst_param reg;
unsigned int byte_stride;
};
struct wined3d_shader_texel_offset struct wined3d_shader_texel_offset
{ {
signed char u, v, w; signed char u, v, w;
...@@ -835,6 +842,7 @@ struct wined3d_shader_instruction ...@@ -835,6 +842,7 @@ struct wined3d_shader_instruction
struct wined3d_shader_src_param src; struct wined3d_shader_src_param src;
UINT count; UINT count;
const struct wined3d_shader_immediate_constant_buffer *icb; const struct wined3d_shader_immediate_constant_buffer *icb;
struct wined3d_shader_structured_resource structured_resource;
} declaration; } 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