Re: [Mesa-dev] [PATCH 03/14] gallium/radeon: remove redundant null-pointer check
On Fri, Jul 1, 2016 at 4:25 PM, Nicolai Hähnle wrote: > From: Nicolai Hähnle > > --- > src/gallium/drivers/radeon/r600_texture.c | 3 +-- > 1 file changed, 1 insertion(+), 2 deletions(-) > > diff --git a/src/gallium/drivers/radeon/r600_texture.c > b/src/gallium/drivers/radeon/r600_texture.c > index 0a25dbe..b3920d7 100644 > --- a/src/gallium/drivers/radeon/r600_texture.c > +++ b/src/gallium/drivers/radeon/r600_texture.c > @@ -560,8 +560,7 @@ static void r600_texture_destroy(struct pipe_screen > *screen, > struct r600_texture *rtex = (struct r600_texture*)ptex; > struct r600_resource *resource = &rtex->resource; > > - if (rtex->flushed_depth_texture) > - r600_texture_reference(&rtex->flushed_depth_texture, NULL); > + pipe_resource_reference((struct pipe_resource > **)&rtex->flushed_depth_texture, NULL); The code can keep using r600_texture_reference. Marek ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev
[Mesa-dev] [PATCH 03/14] gallium/radeon: remove redundant null-pointer check
From: Nicolai Hähnle --- src/gallium/drivers/radeon/r600_texture.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/gallium/drivers/radeon/r600_texture.c b/src/gallium/drivers/radeon/r600_texture.c index 0a25dbe..b3920d7 100644 --- a/src/gallium/drivers/radeon/r600_texture.c +++ b/src/gallium/drivers/radeon/r600_texture.c @@ -560,8 +560,7 @@ static void r600_texture_destroy(struct pipe_screen *screen, struct r600_texture *rtex = (struct r600_texture*)ptex; struct r600_resource *resource = &rtex->resource; - if (rtex->flushed_depth_texture) - r600_texture_reference(&rtex->flushed_depth_texture, NULL); + pipe_resource_reference((struct pipe_resource **)&rtex->flushed_depth_texture, NULL); r600_resource_reference(&rtex->htile_buffer, NULL); if (rtex->cmask_buffer != &rtex->resource) { -- 2.7.4 ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev