From 5b85a6b3f7195080a1b8255bb527c16a1d8ba581 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Marek=20Ol=C5=A1=C3=A1k?= Date: Tue, 3 Jan 2017 20:03:37 +0100 Subject: [PATCH] radeonsi: set si_shader_context::input_decls for ranged decls correctly MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit This has no effect because no code uses those members with ranged decls. Tested-by: Edmondo Tommasina Acked-by: Edward O'Callaghan Reviewed-by: Nicolai Hähnle --- src/gallium/drivers/radeonsi/si_shader_tgsi_setup.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/gallium/drivers/radeonsi/si_shader_tgsi_setup.c b/src/gallium/drivers/radeonsi/si_shader_tgsi_setup.c index 2f38949b88a..996a458835e 100644 --- a/src/gallium/drivers/radeonsi/si_shader_tgsi_setup.c +++ b/src/gallium/drivers/radeonsi/si_shader_tgsi_setup.c @@ -877,9 +877,12 @@ static void emit_declaration(struct lp_build_tgsi_context *bld_base, if (ctx->load_input && ctx->input_decls[idx].Declaration.File != TGSI_FILE_INPUT) { ctx->input_decls[idx] = *decl; + ctx->input_decls[idx].Range.First = idx; + ctx->input_decls[idx].Range.Last = idx; + ctx->input_decls[idx].Semantic.Index += idx - decl->Range.First; if (bld_base->info->processor != PIPE_SHADER_FRAGMENT) - ctx->load_input(ctx, idx, decl, + ctx->load_input(ctx, idx, &ctx->input_decls[idx], &ctx->inputs[idx * 4]); } } -- 2.30.2