From a49738290c01a8e7db6d4053b1ab5c13e685c1bc Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Wed, 7 Feb 2018 11:16:12 +0000 Subject: broadcom/vc4: Use pipe_resource_reference in sampler views. Improves u_debug_refcount output. --- src/gallium/drivers/vc4/vc4_state.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/gallium') 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; -- cgit v1.2.3