Mesa (main): v3d: use function to initialize refcount

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Mon Jun 6 16:45:49 UTC 2022


Module: Mesa
Branch: main
Commit: 92474951a3c2c6584038b4d30f72b7d98e442abe
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=92474951a3c2c6584038b4d30f72b7d98e442abe

Author: Juan A. Suarez Romero <jasuarez at igalia.com>
Date:   Thu Jun  2 17:05:07 2022 +0200

v3d: use function to initialize refcount

Call proper pipe reference function to initialize the reference
counting.

Signed-off-by: Juan A. Suarez Romero <jasuarez at igalia.com>
Reviewed-by: Iago Toral Quiroga <itoral at igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16837>

---

 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 &&



More information about the mesa-commit mailing list