From 92474951a3c2c6584038b4d30f72b7d98e442abe Mon Sep 17 00:00:00 2001 From: "Juan A. Suarez Romero" Date: Thu, 2 Jun 2022 17:05:07 +0200 Subject: [PATCH] v3d: use function to initialize refcount Call proper pipe reference function to initialize the reference counting. Signed-off-by: Juan A. Suarez Romero Reviewed-by: Iago Toral Quiroga Part-of: --- src/gallium/drivers/v3d/v3dx_state.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gallium/drivers/v3d/v3dx_state.c b/src/gallium/drivers/v3d/v3dx_state.c index a3f9f7b0470..249910ed606 100644 --- a/src/gallium/drivers/v3d/v3dx_state.c +++ b/src/gallium/drivers/v3d/v3dx_state.c @@ -1073,8 +1073,8 @@ v3d_create_sampler_view(struct pipe_context *pctx, struct pipe_resource *prsc, v3d_get_format_swizzle(&screen->devinfo, so->base.format); util_format_compose_swizzles(fmt_swizzle, view_swizzle, so->swizzle); + pipe_reference_init(&so->base.reference, 1); so->base.texture = prsc; - so->base.reference.count = 1; so->base.context = pctx; if (rsc->separate_stencil &&