[Mesa-dev] [PATCH] st/atifs: remove unrequired initialisation of gl_program fields

Marek Olšák maraeo at gmail.com
Fri Nov 10 12:52:24 UTC 2017


Reviewed-by: Marek Olšák <marek.olsak at amd.com>

Marek

On Fri, Nov 10, 2017 at 9:49 AM, Timothy Arceri <tarceri at itsqueeze.com> wrote:
> As far as I can tell these fields are only used to query arb
> program info and are not related to ATI_fragment_shader.
>
> Cc: Miklós Máté <mtmkls at gmail.com>
> ---
>
>  src/mesa/state_tracker/st_atifs_to_tgsi.c | 4 ----
>  1 file changed, 4 deletions(-)
>
> diff --git a/src/mesa/state_tracker/st_atifs_to_tgsi.c b/src/mesa/state_tracker/st_atifs_to_tgsi.c
> index 9650ccc478..0bd082e6ff 100644
> --- a/src/mesa/state_tracker/st_atifs_to_tgsi.c
> +++ b/src/mesa/state_tracker/st_atifs_to_tgsi.c
> @@ -592,24 +592,20 @@ st_init_atifs_prog(struct gl_context *ctx, struct gl_program *prog)
>     /* we may need fog */
>     prog->info.inputs_read |= BITFIELD64_BIT(VARYING_SLOT_FOGC);
>
>     /* we always have the ATI_fs constants, and the fog params */
>     for (i = 0; i < MAX_NUM_FRAGMENT_CONSTANTS_ATI; i++) {
>        _mesa_add_parameter(prog->Parameters, PROGRAM_UNIFORM,
>                            NULL, 4, GL_FLOAT, NULL, NULL);
>     }
>     _mesa_add_state_reference(prog->Parameters, fog_params_state);
>     _mesa_add_state_reference(prog->Parameters, fog_color);
> -
> -   prog->arb.NumInstructions = 0;
> -   prog->arb.NumTemporaries = MAX_NUM_FRAGMENT_REGISTERS_ATI + 3; /* 3 input temps for arith ops */
> -   prog->arb.NumParameters = MAX_NUM_FRAGMENT_CONSTANTS_ATI + 2; /* 2 state variables for fog */
>  }
>
>
>  struct tgsi_atifs_transform {
>     struct tgsi_transform_context base;
>     struct tgsi_shader_info info;
>     const struct st_fp_variant_key *key;
>     bool first_instruction_emitted;
>     unsigned fog_factor_temp;
>  };
> --
> 2.14.3
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev


More information about the mesa-dev mailing list