[Mesa-dev] [PATCH 1/4] radeon: move streamout buffer config to streamout enable function. (v2)
Marek Olšák
maraeo at gmail.com
Wed Jul 29 02:05:11 PDT 2015
On Wed, Jul 29, 2015 at 1:01 AM, Dave Airlie <airlied at gmail.com> wrote:
> From: Dave Airlie <airlied at redhat.com>
>
> This will be used here later.
>
> v2: update atom sizes
> add check for old vs new enabled mask
>
> Signed-off-by: Dave Airlie <airlied at redhat.com>
> ---
> src/gallium/drivers/radeon/r600_pipe_common.h | 3 +++
> src/gallium/drivers/radeon/r600_streamout.c | 21 ++++++++++++---------
> 2 files changed, 15 insertions(+), 9 deletions(-)
>
> diff --git a/src/gallium/drivers/radeon/r600_pipe_common.h b/src/gallium/drivers/radeon/r600_pipe_common.h
> index d225f25..74d747f 100644
> --- a/src/gallium/drivers/radeon/r600_pipe_common.h
> +++ b/src/gallium/drivers/radeon/r600_pipe_common.h
> @@ -329,6 +329,9 @@ struct r600_streamout {
> * it must be set explicitly when binding a shader. */
> unsigned *stride_in_dw;
>
> + /* The state of VGT_STRMOUT_BUFFER_(CONFIG|EN). */
> + unsigned hw_enabled_mask;
> +
> /* The state of VGT_STRMOUT_(CONFIG|EN). */
> struct r600_atom enable_atom;
> bool streamout_enabled;
> diff --git a/src/gallium/drivers/radeon/r600_streamout.c b/src/gallium/drivers/radeon/r600_streamout.c
> index bc8bf97..9f75486 100644
> --- a/src/gallium/drivers/radeon/r600_streamout.c
> +++ b/src/gallium/drivers/radeon/r600_streamout.c
> @@ -88,8 +88,7 @@ void r600_streamout_buffers_dirty(struct r600_common_context *rctx)
> 12 + /* flush_vgt_streamout */
> num_bufs * 11; /* STRMOUT_BUFFER_UPDATE, BUFFER_SIZE */
>
> - begin->num_dw = 12 + /* flush_vgt_streamout */
> - 3; /* VGT_STRMOUT_BUFFER_CONFIG */
> + begin->num_dw = 12; /* flush_vgt_streamout */
>
> if (rctx->chip_class >= SI) {
> begin->num_dw += num_bufs * 4; /* SET_CONTEXT_REG */
> @@ -192,11 +191,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;
> @@ -328,6 +322,12 @@ static void r600_emit_streamout_enable(struct r600_common_context *rctx,
> {
> 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);
It looks like this should use hw_enabled_mask. With that fixed, this is:
Reviewed-by: Marek Olšák <marek.olsak at amd.com>
Marek
More information about the mesa-dev
mailing list