[Mesa-dev] [PATCH 3/6] radeon: move streamout buffer config to streamout enable function.

Marek Olšák maraeo at gmail.com
Tue Jul 28 11:06:56 PDT 2015


On Mon, Jul 27, 2015 at 3:50 AM, Dave Airlie <airlied at gmail.com> wrote:
> From: Dave Airlie <airlied at redhat.com>
>
> This will be used here later.
>
> Signed-off-by: Dave Airlie <airlied at redhat.com>
> ---
>  src/gallium/drivers/radeon/r600_streamout.c | 10 +++++-----
>  1 file changed, 5 insertions(+), 5 deletions(-)
>
> diff --git a/src/gallium/drivers/radeon/r600_streamout.c b/src/gallium/drivers/radeon/r600_streamout.c
> index bc8bf97..0688397 100644
> --- a/src/gallium/drivers/radeon/r600_streamout.c
> +++ b/src/gallium/drivers/radeon/r600_streamout.c
> @@ -192,11 +192,6 @@ static void r600_emit_streamout_begin(struct r600_common_context *rctx, struct r
>
>         r600_flush_vgt_streamout(rctx);
>
> -       r600_write_context_reg(cs, rctx->chip_class >= EVERGREEN ?
> -                                      R_028B98_VGT_STRMOUT_BUFFER_CONFIG :
> -                                      R_028B20_VGT_STRMOUT_BUFFER_EN,
> -                              rctx->streamout.enabled_mask);
> -
>         for (i = 0; i < rctx->streamout.num_targets; i++) {
>                 if (!t[i])
>                         continue;
> @@ -326,6 +321,11 @@ static bool r600_get_strmout_en(struct r600_common_context *rctx)
>  static void r600_emit_streamout_enable(struct r600_common_context *rctx,
>                                        struct r600_atom *atom)
>  {
> +       r600_write_context_reg(rctx->rings.gfx.cs, rctx->chip_class >= EVERGREEN ?
> +                                      R_028B98_VGT_STRMOUT_BUFFER_CONFIG :
> +                                      R_028B20_VGT_STRMOUT_BUFFER_EN,
> +                              rctx->streamout.enabled_mask);
> +

A few things are missing here:
- increasing the atom size in r600_streamout_init
- decreasing the atom size in r600_streamout_buffers_dirty
- r600_set_streamout_enable should take this register into account
when it's changed (probably just use r600_set_streamout_enable and set
it there)

Marek


More information about the mesa-dev mailing list