[Mesa-dev] [PATCH 5/6] rbug: fix a crash in sampler_view_destroy caused by incorrect context

Roland Scheidegger sroland at vmware.com
Mon Aug 18 16:04:03 PDT 2014


Am 18.08.2014 23:24, schrieb Marek Olšák:
> From: Marek Olšák <marek.olsak at amd.com>
> 
> ---
>  src/gallium/drivers/rbug/rbug_objects.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/src/gallium/drivers/rbug/rbug_objects.c b/src/gallium/drivers/rbug/rbug_objects.c
> index c64b14c..2d80164 100644
> --- a/src/gallium/drivers/rbug/rbug_objects.c
> +++ b/src/gallium/drivers/rbug/rbug_objects.c
> @@ -137,7 +137,7 @@ rbug_sampler_view_create(struct rbug_context *rb_context,
>     rb_view->base.reference.count = 1;
>     rb_view->base.texture = NULL;
>     pipe_resource_reference(&rb_view->base.texture, &rb_resource->base);
> -   rb_view->base.context = rb_context->pipe;
> +   rb_view->base.context = &rb_context->base;
>     rb_view->sampler_view = view;
>  
>     return &rb_view->base;
> 
The whole sampler_view_create / sampler_view_destroy functions here look
also a bit asymmetric (especially wrt reference counts) compared to
surface_create / surface_destroy which sounds fishy but in any case

1/6, 4/6, 5/6 are
Reviewed-by: Roland Scheidegger <sroland at vmware.com>


More information about the mesa-dev mailing list