[Mesa-dev] [PATCH 7/7] r600g: set pipe_context::priv = NULL

Nicolai Hähnle nhaehnle at gmail.com
Thu Jun 8 07:53:38 UTC 2017


On 07.06.2017 21:50, Marek Olšák wrote:
> From: Marek Olšák <marek.olsak at amd.com>
> 
> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=101254
> ---
>   src/gallium/drivers/r600/r600_pipe.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/src/gallium/drivers/r600/r600_pipe.c b/src/gallium/drivers/r600/r600_pipe.c
> index 957431a..b938208 100644
> --- a/src/gallium/drivers/r600/r600_pipe.c
> +++ b/src/gallium/drivers/r600/r600_pipe.c
> @@ -123,21 +123,21 @@ static struct pipe_context *r600_create_context(struct pipe_screen *screen,
>                                                   void *priv, unsigned flags)
>   {
>   	struct r600_context *rctx = CALLOC_STRUCT(r600_context);
>   	struct r600_screen* rscreen = (struct r600_screen *)screen;
>   	struct radeon_winsys *ws = rscreen->b.ws;
>   
>   	if (!rctx)
>   		return NULL;
>   
>   	rctx->b.b.screen = screen;
> -	rctx->b.b.priv = priv;
> +	rctx->b.b.priv = NULL; /* for threaded_context_unwrap_sync */

Probably best to add an

assert(!priv);

and only push this after the state tracker patch has landed.

Apart from that, patches 2-7 are:

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


>   	rctx->b.b.destroy = r600_destroy_context;
>   	rctx->b.set_atom_dirty = (void *)r600_set_atom_dirty;
>   
>   	if (!r600_common_context_init(&rctx->b, &rscreen->b, flags))
>   		goto fail;
>   
>   	rctx->screen = rscreen;
>   	LIST_INITHEAD(&rctx->texture_buffers);
>   
>   	r600_init_blit_functions(rctx);
> 


-- 
Lerne, wie die Welt wirklich ist,
Aber vergiss niemals, wie sie sein sollte.


More information about the mesa-dev mailing list