summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/gallium/drivers/vc4/vc4_state.c4
1 files changed, 2 insertions, 2 deletions
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;