wined3d: Recognize SM5 dcl_resource_structured opcode.
Signed-off-by: Józef Kucia <jkucia@codeweavers.com> Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
463980431f
commit
f294f56a5a
@ -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
|
|||||||
/* 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[] =
|
|||||||
/* 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
|
|||||||
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]);
|
||||||
|
@ -188,6 +188,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_RESOURCE_STRUCTURED = 0xa2,
|
||||||
WINED3D_SM5_OP_LD_STRUCTURED = 0xa7,
|
WINED3D_SM5_OP_LD_STRUCTURED = 0xa7,
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -395,6 +396,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_RESOURCE_STRUCTURED, WINED3DSIH_DCL_RESOURCE_STRUCTURED, "R", "U"},
|
||||||
{WINED3D_SM5_OP_LD_STRUCTURED, WINED3DSIH_LD_STRUCTURED, "U", "UUR"},
|
{WINED3D_SM5_OP_LD_STRUCTURED, WINED3DSIH_LD_STRUCTURED, "U", "UUR"},
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -968,6 +970,11 @@ static void shader_sm4_read_instruction(void *data, const DWORD **ptr, struct wi
|
|||||||
ins->declaration.semantic.resource_data_type = data_type_table[data_type];
|
ins->declaration.semantic.resource_data_type = data_type_table[data_type];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else if (opcode == WINED3D_SM5_OP_DCL_RESOURCE_STRUCTURED)
|
||||||
|
{
|
||||||
|
shader_sm4_read_dst_param(priv, &p, WINED3D_DATA_RESOURCE, &ins->declaration.structured_resource.reg);
|
||||||
|
ins->declaration.structured_resource.byte_stride = *p++;
|
||||||
|
}
|
||||||
else if (opcode == WINED3D_SM4_OP_DCL_CONSTANT_BUFFER)
|
else if (opcode == WINED3D_SM4_OP_DCL_CONSTANT_BUFFER)
|
||||||
{
|
{
|
||||||
shader_sm4_read_src_param(priv, &p, WINED3D_DATA_FLOAT, &ins->declaration.src);
|
shader_sm4_read_src_param(priv, &p, WINED3D_DATA_FLOAT, &ins->declaration.src);
|
||||||
|
@ -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
|
|||||||
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
|
|||||||
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;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user