Module: Mesa Branch: master Commit: a49738290c01a8e7db6d4053b1ab5c13e685c1bc URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=a49738290c01a8e7db6d4053b1ab5c13e685c1bc
Author: Eric Anholt <e...@anholt.net> Date: Wed Feb 7 11:16:12 2018 +0000 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(-) diff --git a/src/gallium/drivers/vc4/vc4_state.c b/src/gallium/drivers/vc4/vc4_state.c index ed8d404a4f..b4696ed798 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; _______________________________________________ mesa-commit mailing list mesa-commit@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-commit