etnaviv: clean up sampler view reference counting

Use the proper pipe_resource_reference function instead of
rolling our own.

Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com>
This commit is contained in:
Lucas Stach 2017-05-10 18:01:07 +02:00 committed by Christian Gmeiner
parent f8a3991458
commit ba0b7de7e3

View file

@ -182,9 +182,9 @@ etna_create_sampler_view(struct pipe_context *pctx, struct pipe_resource *prsc,
}
sv->base = *so;
pipe_reference(NULL, &prsc->reference);
sv->base.texture = prsc;
sv->base.reference.count = 1;
pipe_reference_init(&sv->base.reference, 1);
sv->base.texture = NULL;
pipe_resource_reference(&sv->base.texture, prsc);
sv->base.context = pctx;
/* merged with sampler state */