[Mesa-dev] [PATCH 07/53] r600: move clip misc and streamout stream updates to a single place

Oded Gabbay oded.gabbay at gmail.com
Tue Dec 1 01:01:29 PST 2015


On Mon, Nov 30, 2015 at 8:20 AM, Dave Airlie <airlied at gmail.com> wrote:
> From: Dave Airlie <airlied at redhat.com>
>
> This will be updated in a macro later.
>
> Signed-off-by: Dave Airlie <airlied at redhat.com>
> ---
>  src/gallium/drivers/r600/r600_state_common.c | 17 +++++++++++------
>  1 file changed, 11 insertions(+), 6 deletions(-)
>
> diff --git a/src/gallium/drivers/r600/r600_state_common.c b/src/gallium/drivers/r600/r600_state_common.c
> index 6042976..b107f8a 100644
> --- a/src/gallium/drivers/r600/r600_state_common.c
> +++ b/src/gallium/drivers/r600/r600_state_common.c
> @@ -1300,6 +1300,8 @@ static bool r600_update_derived_state(struct r600_context *rctx)
>         bool ps_dirty = false, vs_dirty = false, gs_dirty = false;
>         bool blend_disable;
>         bool need_buf_const;
> +       struct r600_pipe_shader *clip_so_current = NULL;
> +
>         if (!rctx->blitter->running) {
>                 unsigned i;
>
> @@ -1334,9 +1336,8 @@ static bool r600_update_derived_state(struct r600_context *rctx)
>                 if (unlikely(rctx->hw_shader_stages[R600_HW_STAGE_GS].shader != rctx->gs_shader->current)) {
>                         update_shader_atom(ctx, &rctx->hw_shader_stages[R600_HW_STAGE_GS], rctx->gs_shader->current);
>                         update_shader_atom(ctx, &rctx->hw_shader_stages[R600_HW_STAGE_VS], rctx->gs_shader->current->gs_copy_shader);
> -                       /* Update clip misc state. */
> -                       r600_update_clip_state(rctx, rctx->gs_shader->current->gs_copy_shader);
> -                       rctx->b.streamout.enabled_stream_buffers_mask = rctx->gs_shader->current->gs_copy_shader->enabled_stream_buffers_mask;
> +
> +                       clip_so_current = rctx->gs_shader->current->gs_copy_shader;
>                 }
>
>                 /* vs_shader is used as ES */
> @@ -1354,12 +1355,16 @@ static bool r600_update_derived_state(struct r600_context *rctx)
>                 if (unlikely(vs_dirty || rctx->hw_shader_stages[R600_HW_STAGE_VS].shader != rctx->vs_shader->current)) {
>                         update_shader_atom(ctx, &rctx->hw_shader_stages[R600_HW_STAGE_VS], rctx->vs_shader->current);
>
> -                       /* Update clip misc state. */
> -                       r600_update_clip_state(rctx, rctx->vs_shader->current);
> -                       rctx->b.streamout.enabled_stream_buffers_mask = rctx->vs_shader->current->enabled_stream_buffers_mask;
> +                       clip_so_current = rctx->vs_shader->current;
>                 }
>         }
>
> +       /* Update clip misc state. */
> +       if (clip_so_current) {
> +               r600_update_clip_state(rctx, clip_so_current);
> +               rctx->b.streamout.enabled_stream_buffers_mask = clip_so_current->enabled_stream_buffers_mask;
> +       }
> +
>         if (unlikely(ps_dirty || rctx->hw_shader_stages[R600_HW_STAGE_PS].shader != rctx->ps_shader->current ||
>                 rctx->rasterizer->sprite_coord_enable != rctx->ps_shader->current->sprite_coord_enable ||
>                 rctx->rasterizer->flatshade != rctx->ps_shader->current->flatshade)) {
> --
> 2.5.0
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reviewed-by: Oded Gabbay <oded.gabbay at gmail.com>


More information about the mesa-dev mailing list