[Mesa-dev] [PATCH 2/3] radeonsi: set si_shader_context::input_decls for ranged decls correctly
Nicolai Hähnle
nhaehnle at gmail.com
Mon Jan 9 08:41:09 UTC 2017
Patches 1 & 2:
Reviewed-by: Nicolai Hähnle <nicolai.haehnle at amd.com>
On 03.01.2017 20:17, Marek Olšák wrote:
> From: Marek Olšák <marek.olsak at amd.com>
>
> This has no effect because no code uses those members with ranged decls.
> ---
> 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 2f38949..996a458 100644
> --- a/src/gallium/drivers/radeonsi/si_shader_tgsi_setup.c
> +++ b/src/gallium/drivers/radeonsi/si_shader_tgsi_setup.c
> @@ -870,23 +870,26 @@ static void emit_declaration(struct lp_build_tgsi_context *bld_base,
> }
> break;
> }
> case TGSI_FILE_INPUT:
> {
> unsigned idx;
> for (idx = decl->Range.First; idx <= decl->Range.Last; idx++) {
> 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]);
> }
> }
> }
> break;
>
> case TGSI_FILE_SYSTEM_VALUE:
> {
> unsigned idx;
> for (idx = decl->Range.First; idx <= decl->Range.Last; idx++) {
>
More information about the mesa-dev
mailing list