[Mesa-dev] [PATCH] r600g: Simplify out a couple of unnecessary branches

Marek Olšák maraeo at gmail.com
Tue Sep 1 12:57:10 PDT 2015


Please stop using a non-existent email address. alterapraxis.com doesn't exist.

Marek

On Tue, Sep 1, 2015 at 10:38 AM, Edward O'Callaghan
<edward.ocallaghan at koparo.com> wrote:
> From: Edward O'Callaghan <eocallaghan at alterapraxis.com>
>
> Signed-off-by: Edward O'Callaghan <eocallaghan at alterapraxis.com>
> ---
>  src/gallium/drivers/r600/r600_shader.c | 8 ++------
>  1 file changed, 2 insertions(+), 6 deletions(-)
>
> diff --git a/src/gallium/drivers/r600/r600_shader.c b/src/gallium/drivers/r600/r600_shader.c
> index b7d7828..1ab389c 100644
> --- a/src/gallium/drivers/r600/r600_shader.c
> +++ b/src/gallium/drivers/r600/r600_shader.c
> @@ -1966,13 +1966,9 @@ static int r600_shader_from_tgsi(struct r600_context *rctx,
>
>         ctx.nliterals = 0;
>         ctx.literals = NULL;
> -       shader->fs_write_all = FALSE;
> -       if (ctx.info.properties[TGSI_PROPERTY_FS_COLOR0_WRITES_ALL_CBUFS])
> -               shader->fs_write_all = TRUE;
>
> -       shader->vs_position_window_space = FALSE;
> -       if (ctx.info.properties[TGSI_PROPERTY_VS_WINDOW_SPACE_POSITION])
> -               shader->vs_position_window_space = TRUE;
> +       shader->fs_write_all = ctx.info.properties[TGSI_PROPERTY_FS_COLOR0_WRITES_ALL_CBUFS];
> +       shader->vs_position_window_space = ctx.info.properties[TGSI_PROPERTY_VS_WINDOW_SPACE_POSITION];
>
>         if (shader->vs_as_gs_a)
>                 vs_add_primid_output(&ctx, key.vs.prim_id_out);
> --
> 2.4.3
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/mesa-dev


More information about the mesa-dev mailing list