[Mesa-dev] [PATCH 06/23] radeonsi: update all GSVS ring descriptors for new buffer allocations

Edward O'Callaghan funfunctor at folklore1984.net
Fri Dec 2 23:42:47 UTC 2016



On 12/01/2016 12:35 AM, Nicolai Hähnle wrote:
> From: Nicolai Hähnle <nicolai.haehnle at amd.com>
> 
> Fixes GL45-CTS.gtf40.GL3Tests.transform_feedback3.transform_feedback3_geometry_instanced.
Reviewed-by: Edward O'Callaghan <funfunctor at folklore1984.net>

> 
> Cc: mesa-stable at lists.freedesktop.org
> ---
>  src/gallium/drivers/radeonsi/si_state_shaders.c | 7 ++++++-
>  1 file changed, 6 insertions(+), 1 deletion(-)
> 
> diff --git a/src/gallium/drivers/radeonsi/si_state_shaders.c b/src/gallium/drivers/radeonsi/si_state_shaders.c
> index 0afc3b4..ea71569 100644
> --- a/src/gallium/drivers/radeonsi/si_state_shaders.c
> +++ b/src/gallium/drivers/radeonsi/si_state_shaders.c
> @@ -2031,24 +2031,29 @@ static bool si_update_gs_ring_buffers(struct si_context *sctx)
>  
>  	/* Set ring bindings. */
>  	if (sctx->esgs_ring) {
>  		si_set_ring_buffer(&sctx->b.b, SI_ES_RING_ESGS,
>  				   sctx->esgs_ring, 0, sctx->esgs_ring->width0,
>  				   true, true, 4, 64, 0);
>  		si_set_ring_buffer(&sctx->b.b, SI_GS_RING_ESGS,
>  				   sctx->esgs_ring, 0, sctx->esgs_ring->width0,
>  				   false, false, 0, 0, 0);
>  	}
> -	if (sctx->gsvs_ring)
> +	if (sctx->gsvs_ring) {
>  		si_set_ring_buffer(&sctx->b.b, SI_VS_RING_GSVS,
>  				   sctx->gsvs_ring, 0, sctx->gsvs_ring->width0,
>  				   false, false, 0, 0, 0);
> +
> +		/* Also update SI_GS_RING_GSVSi descriptors. */
> +		sctx->last_gsvs_itemsize = 0;
> +	}
> +
>  	return true;
>  }
>  
>  static void si_update_gsvs_ring_bindings(struct si_context *sctx)
>  {
>  	unsigned gsvs_itemsize = sctx->gs_shader.cso->max_gsvs_emit_size;
>  	uint64_t offset;
>  
>  	if (!sctx->gsvs_ring || gsvs_itemsize == sctx->last_gsvs_itemsize)
>  		return;
> 

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: OpenPGP digital signature
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20161203/f15e5b3f/attachment.sig>


More information about the mesa-dev mailing list