wined3d: Store stream index in shader signature elements.

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:
Józef Kucia 2017-04-06 11:47:46 +02:00 committed by Alexandre Julliard
parent 20ed82860a
commit 18e5bbe6f0
4 changed files with 12 additions and 2 deletions

View file

@ -201,6 +201,7 @@ HRESULT shader_parse_signature(const char *data, DWORD data_size, struct wined3d
{
UINT name_offset;
e[i].stream_idx = 0;
read_dword(&ptr, &name_offset);
if (!(e[i].semantic_name = shader_get_string(data, data_size, name_offset)))
{

View file

@ -6647,6 +6647,9 @@ static void shader_glsl_setup_sm4_shader_output(struct shader_glsl_priv *priv,
if (!(reg_maps_out->output_registers & (1u << output->register_idx)))
continue;
if (output->stream_idx)
continue;
if (output->register_idx >= input_count)
continue;
@ -6702,6 +6705,9 @@ static void shader_glsl_setup_sm3_rasterizer_input(struct shader_glsl_priv *priv
if (!(reg_maps_out->output_registers & (1u << output->register_idx)))
continue;
if (output->stream_idx)
continue;
semantic_name = output->semantic_name;
semantic_idx = output->semantic_idx;
shader_glsl_write_mask_to_str(output->mask, reg_mask);

View file

@ -379,6 +379,7 @@ static void shader_signature_from_semantic(struct wined3d_shader_signature_eleme
{
e->semantic_name = shader_semantic_name_from_usage(s->usage);
e->semantic_idx = s->usage_idx;
e->stream_idx = 0;
e->sysval_semantic = shader_sysval_semantic_from_usage(s->usage);
e->component_type = WINED3D_TYPE_FLOAT;
e->register_idx = s->reg.reg.idx[0].offset;
@ -390,6 +391,7 @@ static void shader_signature_from_usage(struct wined3d_shader_signature_element
{
e->semantic_name = shader_semantic_name_from_usage(usage);
e->semantic_idx = usage_idx;
e->stream_idx = 0;
e->sysval_semantic = shader_sysval_semantic_from_usage(usage);
e->component_type = WINED3D_TYPE_FLOAT;
e->register_idx = reg_idx;

View file

@ -1953,10 +1953,11 @@ struct wined3d_sampler_desc
struct wined3d_shader_signature_element
{
const char *semantic_name;
UINT semantic_idx;
unsigned int semantic_idx;
unsigned int stream_idx;
enum wined3d_sysval_semantic sysval_semantic;
enum wined3d_component_type component_type;
UINT register_idx;
unsigned int register_idx;
DWORD mask;
};