[Mesa-dev] [PATCH] radeonsi: Synchronize a streamout write after read hazard.

Nicolai Hähnle nhaehnle at gmail.com
Mon Apr 11 17:12:52 UTC 2016


Sounds right to me. Do you have a test case that fails without it?

Reviewed-by: Nicolai Hähnle <nicolai.haehnle at amd.com>

On 11.04.2016 09:04, Bas Nieuwenhuizen wrote:
> Signed-off-by: Bas Nieuwenhuizen <bas at basnieuwenhuizen.nl>
> ---
>   src/gallium/drivers/radeonsi/si_descriptors.c | 6 ++++++
>   1 file changed, 6 insertions(+)
>
> diff --git a/src/gallium/drivers/radeonsi/si_descriptors.c b/src/gallium/drivers/radeonsi/si_descriptors.c
> index cf898fd..a2c096f 100644
> --- a/src/gallium/drivers/radeonsi/si_descriptors.c
> +++ b/src/gallium/drivers/radeonsi/si_descriptors.c
> @@ -936,6 +936,12 @@ static void si_set_streamout_targets(struct pipe_context *ctx,
>   				 SI_CONTEXT_VS_PARTIAL_FLUSH;
>   	}
>
> +	/* All readers of the streamout targets need to be finished before we can
> +	 * start writing to the targets.
> +	 */
> +	if (num_targets)
> +		sctx->b.flags |= SI_CONTEXT_PS_PARTIAL_FLUSH;
> +
>   	/* Streamout buffers must be bound in 2 places:
>   	 * 1) in VGT by setting the VGT_STRMOUT registers
>   	 * 2) as shader resources
>


More information about the mesa-dev mailing list