radeonsi: set si_shader_context::input_decls for ranged decls correctly
authorMarek Olšák <marek.olsak@amd.com>
Tue, 3 Jan 2017 19:03:37 +0000 (20:03 +0100)
committerMarek Olšák <marek.olsak@amd.com>
Mon, 9 Jan 2017 11:01:30 +0000 (12:01 +0100)
This has no effect because no code uses those members with ranged decls.

Tested-by: Edmondo Tommasina <edmondo.tommasina@gmail.com>
Acked-by: Edward O'Callaghan <funfunctor@folklore1984.net>
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
src/gallium/drivers/radeonsi/si_shader_tgsi_setup.c

index 2f38949b88ab4daef7498e84fb3e4181c6789526..996a458835e7f4450a6f82f14efd64f486d8359a 100644 (file)
@@ -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]);
                        }
                }