[Mesa-dev] [PATCH] radeonsi: avoid crash when a sampler state is bound for a buffer texture

Laurent Carlier lordheavym at gmail.com
Sat Mar 12 20:42:17 UTC 2016


Le vendredi 11 mars 2016, 11:17:21 CET Nicolai Hähnle a écrit :
> From: Nicolai Hähnle <nicolai.haehnle at amd.com>
> 
> Sampler states don't really make sense with buffer textures, but the PBO
> upload code sets one because apparently nouveau needs it. It would be
> nice to work that out at some point, but in any case being defensive
> here is a good idea.
> 
> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=94284
> Cc: mesa-stable at lists.freedesktop.org
> ---
>  src/gallium/drivers/radeonsi/si_descriptors.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/src/gallium/drivers/radeonsi/si_descriptors.c
> b/src/gallium/drivers/radeonsi/si_descriptors.c index 9aa4877..f5ad113
> 100644
> --- a/src/gallium/drivers/radeonsi/si_descriptors.c
> +++ b/src/gallium/drivers/radeonsi/si_descriptors.c
> @@ -324,6 +324,7 @@ static void si_bind_sampler_states(struct pipe_context
> *ctx, unsigned shader, */
>  		if (samplers->views.views[i] &&
>  		    samplers->views.views[i]->texture &&
> +		    samplers->views.views[i]->texture->target != PIPE_BUFFER &&
>  		    ((struct
> r600_texture*)samplers->views.views[i]->texture)->fmask.size) continue;

That fixed bug 94284, thanks

-- 
Laurent Carlier
http://www.archlinux.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 473 bytes
Desc: This is a digitally signed message part.
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20160312/c9a6fc62/attachment.sig>


More information about the mesa-dev mailing list