From: Eric Anholt Date: Wed, 7 Feb 2018 11:16:12 +0000 (+0000) Subject: broadcom/vc4: Use pipe_resource_reference in sampler views. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=a49738290c01a8e7db6d4053b1ab5c13e685c1bc;p=mesa.git broadcom/vc4: Use pipe_resource_reference in sampler views. Improves u_debug_refcount output. --- diff --git a/src/gallium/drivers/vc4/vc4_state.c b/src/gallium/drivers/vc4/vc4_state.c index ed8d404a4f3..b4696ed7981 100644 --- a/src/gallium/drivers/vc4/vc4_state.c +++ b/src/gallium/drivers/vc4/vc4_state.c @@ -567,8 +567,8 @@ vc4_create_sampler_view(struct pipe_context *pctx, struct pipe_resource *prsc, so->base = *cso; - pipe_reference(NULL, &prsc->reference); - so->base.texture = prsc; + so->base.texture = NULL; + pipe_resource_reference(&so->base.texture, prsc); so->base.reference.count = 1; so->base.context = pctx;