From 18e5bbe6f0f4bcbbcb109636035a74e6466b1b2f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B3zef=20Kucia?= Date: Thu, 6 Apr 2017 11:47:46 +0200 Subject: [PATCH] wined3d: Store stream index in shader signature elements. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Józef Kucia Signed-off-by: Henri Verbeet Signed-off-by: Alexandre Julliard --- dlls/d3d11/shader.c | 1 + dlls/wined3d/glsl_shader.c | 6 ++++++ dlls/wined3d/shader.c | 2 ++ include/wine/wined3d.h | 5 +++-- 4 files changed, 12 insertions(+), 2 deletions(-) diff --git a/dlls/d3d11/shader.c b/dlls/d3d11/shader.c index 22b8bbf33b5..d1b3e38e48a 100644 --- a/dlls/d3d11/shader.c +++ b/dlls/d3d11/shader.c @@ -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))) { diff --git a/dlls/wined3d/glsl_shader.c b/dlls/wined3d/glsl_shader.c index 8bb8a27a517..3a84a432d93 100644 --- a/dlls/wined3d/glsl_shader.c +++ b/dlls/wined3d/glsl_shader.c @@ -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); diff --git a/dlls/wined3d/shader.c b/dlls/wined3d/shader.c index e96c15feef4..3783006c75c 100644 --- a/dlls/wined3d/shader.c +++ b/dlls/wined3d/shader.c @@ -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; diff --git a/include/wine/wined3d.h b/include/wine/wined3d.h index f5755472de8..4f373925018 100644 --- a/include/wine/wined3d.h +++ b/include/wine/wined3d.h @@ -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; };