From: Marek Olšák Date: Tue, 3 Jan 2017 19:03:37 +0000 (+0100) Subject: radeonsi: set si_shader_context::input_decls for ranged decls correctly X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=5b85a6b3f7195080a1b8255bb527c16a1d8ba581;p=mesa.git radeonsi: set si_shader_context::input_decls for ranged decls correctly 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 --- 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]); } }