diff options
author | Lucas Stach <[email protected]> | 2017-05-10 18:01:07 +0200 |
---|---|---|
committer | Christian Gmeiner <[email protected]> | 2017-05-16 21:07:51 +0200 |
commit | ba0b7de7e36a5032c709ce1f9b36706bdbba5097 (patch) | |
tree | 4355ffcb1feab75a2b2887007d0e9e3e45120f83 /src/gallium/drivers/etnaviv/etnaviv_texture.c | |
parent | f8a39914586de004759ea9cbda1335bdf0790cdc (diff) |
etnaviv: clean up sampler view reference counting
Use the proper pipe_resource_reference function instead of
rolling our own.
Signed-off-by: Lucas Stach <[email protected]>
Reviewed-by: Christian Gmeiner <[email protected]>
Diffstat (limited to 'src/gallium/drivers/etnaviv/etnaviv_texture.c')
-rw-r--r-- | src/gallium/drivers/etnaviv/etnaviv_texture.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/gallium/drivers/etnaviv/etnaviv_texture.c b/src/gallium/drivers/etnaviv/etnaviv_texture.c index 3a842381ac2..6f77af286f2 100644 --- a/src/gallium/drivers/etnaviv/etnaviv_texture.c +++ b/src/gallium/drivers/etnaviv/etnaviv_texture.c @@ -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 */ |